Mentions légales du service

Skip to content
  • Guillaume Melquiond's avatar
    Remove handcrafted error messages (fix issues #150 and #172). · ce21b6c1
    Guillaume Melquiond authored
    Short story: it was a source of bugs, there was only one handcrafted
    message over 650, and, to quote François Pottier, "you seem to have
    misunderstood what the various commands do".
    
    Long story: the proper steps to update the error messages after modifying
    the parser are
    
    1. update the old states with --update-errors
    2. generate the new states with --list-errors
    3. compare the old and new states with --compare-errors
    4. manually reconcile the differences between the old and new states
    5. write error messages for the new states
    6. add %on_error_reduce and go back to step 1, if step 5 is too hard
    7. check that the error messages for the old states are still meaningful
    8. check that the set of states is both correct (--compile-errors) and
       complete (--compare-errors)
    
    We were doing only step 1 and half of step 8. Doing the other half of
    step 8 would have prevented issue #172 from occurring. But that would have
    meant doing step 4 after each parser modification, which was never done.
    Note that step 2 is so expensive that it is impossible to perform step 8
    during continuous integration.
    
    Given the work needed to update the error messages after a syntax change,
    I don't think we can reliably use them until WhyML no longer evolves.
    ce21b6c1