ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.62k stars 401 forks source link

Versioning melange CLI flags #8371

Open anmonteiro opened 1 year ago

anmonteiro commented 1 year ago

Desired Behavior

Melange has some command line flags inherited from BuckleScript that start with the -bs-* prefix.

In Melange v2, we're looking to either remove that prefix or prefix them with -mel-* instead.

@rgrinberg what's the best path to do that in dune? A few alternatives I can think of:

  1. call melc --version in dune to decide which prefix to use in CLI flags
  2. bump the melange extension to 0.2 and use -mel-* flags when 0.2 is selected

Any other thoughts?

jchavarri commented 1 year ago

my 2c: I think option 2 sounds easier to implement? On the other hand, it means we will have to update all existing projects (melange opam and esy templates, etc) and documentation to reflect that, but it doesn't look like a big deal.

I am not sure if leveraging the melange lang versioning for that has any downside though.

rgrinberg commented 1 year ago

Both options can be ok. We'll be running melc to fetch various information for merlin, standard libray, etc. so getting the version out isn't much more effort.

Are there any users that are going to need to support both melange v1 and v2? What's going to be the solution for them if we go with 2.?