Make -strict-formats the default, but have -no-strict-formats to disable it#514
Make -strict-formats the default, but have -no-strict-formats to disable it#514DemiMarie wants to merge 6 commits intoocaml:trunkfrom
Conversation
|
Unfortunately it is unreasonable to merge both options in the same release, because that means that people will have no backward-compatible way to disable the feature. I'm sorry for this glaring omission of the format work. We should merge Thanks a lof for the PR though; this is a glaring omission. Would you be ready to rebase the PR with just support for @damiendoligez would you agree with a (We should think of adding |
|
@gasche Should I issue that PR against 4.03? If so, it might be possible to add |
|
Don't both with the 4.03/4.04 thing, I can change it at merge time. We can make |
I generally agree with this line of thoughts ( and this is actually why I opened http://caml.inria.fr/mantis/view.php?id=7184 ). But for this specific case, fixing invalid formats should be rather straightforward and would give an easy way to make the code base compatible with whatever release. |
|
I think this is a good argument, thanks. Thinking about it in this way, I would be ready to always enable strict formats (making the configuration option a legacy, ignored option) in trunk (4.04+dev). ( |
Agreed. Here is a list of other flags to think about: |
|
We can have all of them for the pleasure of completeness, but I don't see OCaml switching to ambiant recursive types by the time 4.03 hits Debian stable. All the others definitely make sense. Do I understand correctly that you ( @damiendoligez ) would be interested in a patch implementing all these (trivial) flags? What is your inclination for |
|
Implement them all (including |
|
@drbo |
6d21909 to
7e8c001
Compare
|
@damiendoligez Fixed and pushed |
| Tools: | ||
| ====== | ||
|
|
||
| - GPR#514: Added several flags: |
There was a problem hiding this comment.
"compiler flags" would be more explicit. You may want to mention that we should always have both the -foo and -no-foo options, so that people can always explicitly express their intent and be robust if the default setting changes.
|
I reviewed the proposed patch and it looked fine. |
|
I'm about to merge the branch in 4.03 and trunk. @drbo it appears to me that, despite what the Changes entry says, you do not support |
This was meant for GPR ocaml#514, but I forgot to include it.
This was meant for GPR #514, but I forgot to include it.
This was meant for GPR #514, but I forgot to include it.
…#514) PR ocaml#470 propagates substitutions down into lambdas, which works when the RHS is a constant or symbol but not if it's a variable, since that variable is now out of scope. This was breaking ocaml#485, which produces variable-for-variable substitutions often. Fortunately, variable-for-variable substitution under a lambda is also unnecessary (we already dealt with the free occurrences by making a closure element), so we can happily just filter out any such bindings.
Update instructions in ocaml-variants.opam
The middleware was only applied when a match was found for the route in the defined scope, which defeats the purpose of handling unknown routes ending with a slash to the correct routes. This commit makes the trailing slash middleware global to every request.
This makes
-strict-formatsthe default. It can be disabled with the (deprecated)-no-strict-formats.