[dylan-lang/opendylan] 0bccd4: [dfmc-conversion] Improve serious warnings which u...

GitHub <[email protected]> Tue, 04 Aug 2015 17:27:34 -0700
Newsgroups gmane.comp.lang.dylan.gwydion.cvs
Message-ID <55c158763ba4e_6b163faccadef2b84756f@hookshot-fe3-cp1-prd.iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/dylan-lang/opendylan
  Commit: 0bccd4d351ab5d5e8569b132228ffefd08070b9f
      https://github.com/dylan-lang/opendylan/commit/0bccd4d351ab5d5e8569b132228ffefd08070b9f
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-08-03 (Mon, 03 Aug 2015)

  Changed paths:
    M sources/dfmc/conversion/define-domain-mop.dylan
    M sources/dfmc/conversion/define-generic-mop.dylan

  Log Message:
  -----------
  [dfmc-conversion] Improve serious warnings which used reasons.

Some warnings had 'reasons' that explained in greater detail. These
resulted in extraneous double quotes being embedded in the warning
message.

We fix this by creating a warning subclass for each reason so that
they can be written individually and correctly.

In the future, we can extend these with further information as well
so that the causes for the warning can be laid out more clearly,
rather than saying something abstract like "something didn't match."

* sources/dfmc/conversion/define-domain-mop.dylan
  (<domain-types-not-valid>): Make abstract.
  (<domain-types-not-valid-required-argument-count>,
   <domain-types-not-valid-required-argument-type>): New subclasses.
  (^domain-types-match-generic?): Return a subclass which represents the
    correct warning rather than a reason string which was embedded in a
    generic warning.
  (check-model on <&domain>): Switch to using the returned subclass
    to create the warning.

* sources/dfmc/conversion/define-generic-mop.dylan
  (<method-not-congruent>): Make abstract.
  (<method-not-congruent-required-argument-count>,
   <method-not-congruent-required-argument-type>,
   <method-not-congruent-not-both-keyword>,
   <method-not-congruent-not-both-variable>,
   <method-not-congruent-mandatory-keyword>,
   <method-not-congruent-required-values-count>,
   <method-not-congruent-required-values-type>,
   <method-not-congruent-generic-values-not-variable>,
   <method-not-congruent-required-values-count-too-small>,
   <method-not-congruent-no-required-values>,
   <method-not-congruent-rest-values-type>): Replace similarly named
    string constants with new subclasses.
  (^signatures-congruent?): Return a subclass which represents the
    correct warning rather than a reason string which was embedded
    in a generic warning.
  (check-congruence): Switch to using the returned subclass to create
    the warning.


  Commit: 62aef869094fb88e14b4a20f99796bcca26560b2
      https://github.com/dylan-lang/opendylan/commit/62aef869094fb88e14b4a20f99796bcca26560b2
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-08-05 (Wed, 05 Aug 2015)

  Changed paths:
    M sources/dfmc/conversion/define-domain-mop.dylan
    M sources/dfmc/conversion/define-generic-mop.dylan

  Log Message:
  -----------
  Merge pull request #951 from waywardmonkeys/reason-based-warning-subclasses

[dfmc-conversion] Improve serious warnings which used reasons.


Compare: https://github.com/dylan-lang/opendylan/compare/2c54db89e347...62aef869094f

_______________________________________________
chatter mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/chatter