-
Notifications
You must be signed in to change notification settings - Fork 217
Support for old versions of the compiler. #633
Description
Extracted from #630:
This makes me think that we might need a flag to specify the targeted version of the OCaml compiler.
For instance, it would be incorrect to use the following syntax in 4.07.
module M(_:S) = struct end
My position has always been to try to support the latest released version and the one preceding for "a while" to make it possible to upgrade non-atomically. That's not very generous, I know. But I'm not sure of the cost:value ratio for supporting old versions for dev tools, especially when they are so closely tied to compiler internals. Also, I don't know if it makes sense to commit/try to ensure that everyone can use the same compiler version to build ocamlformat as to build the code they are formatting. I'm definitely open to alternative, but just to say that I haven't already been convinced that something like dune's approach to legacy support is the right choice here.
For examples like the particular case of
module M(_:S) = struct end, would it make more sense wrt community-wide effort to make a ppx that could be used with eg 407 that would convert the 408 ast to the expanded form that 407 can handle?