Skip to content

Support for old versions of the compiler. #633

@hhugo

Description

@hhugo

Extracted from #630:

@hhugo:

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

@jberdine:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions