Conversation
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
src/dune_rules/ocaml_flags.ml
Outdated
| and+ native = field_oslu "ocamlopt_flags" in | ||
| let specific = Mode.Dict.make ~native ~byte in | ||
| and+ native = field_oslu "ocamlopt_flags" | ||
| and+ melange = field_oslu "melc_flags" in |
There was a problem hiding this comment.
This should be guarded behind the melange syntax. And the name should be melange.flags or melange.melc_flags
There was a problem hiding this comment.
Actually, never mind. We have a strange situation here:
- For the library stanza, we want the
melange.prefix for the flags - For the emit stanza, this prefix is redundant.
Let me think a bit.
There was a problem hiding this comment.
Okay, so indeed we should have a melange. prefix in the library field and in the env field. In the emit stanza, we don't need such a prefix. I'd personally vote for the names melange.compile_flags and compile_flags in library & emit respectively.
| > (target output) | ||
| > (entries main) | ||
| > (module_system commonjs) | ||
| > (ocamlc_flags -w -14-26)) |
There was a problem hiding this comment.
I don't think we should even accept this field in melange.emit.
|
One more thing to think about, melange compilation has two stages, (.ml -> .cmj, .cmj -> .js). We should have a way to provide compilation options to both stages. Finally, we should also add melange support to the env stanza. |
I'm not sure that there are currently any interesting flags to be passed to the
Opened #6572 to track this. |
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
8043ed0 to
3f5d9e6
Compare
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
|
I think I tackled the comments mentioned above. The PR now:
For now there's no support for flags configuration in the .cmj -> .js stage, following @anmonteiro guidance above. Once we see it's useful to add it, we could use |
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
|
Some tests need to be updated: |
|
Oops. Checked the test failures, but saw the whitespace diffs and was too quick to assume everything else was ok. Fixed in c7d0dc0. |
Signed-off-by: Javier Chavarri <javier.chavarri@gmail.com>
* main: (54 commits) doc: how we write `to_dyn` and `equal` (ocaml#6621) test(cache): test output of man pages test: dune utop for (subdir ..) (ocaml#6629) refactor: improve style of utop rules (ocaml#6628) test: depend on utop (ocaml#6627) refactor(stdune): Add Appendable_list.cons (ocaml#6624) doc: tighten wording in README.md test: add a repro case for ocaml#6607 (ocaml#6612) doc: cleanup status badges in README.md (ocaml#6618) doc(README): rewrap paragraphs and cleanup links coq: more resilient config query fix: link time code gen (ocaml#6606) fix(melange): run melc ppx with merlin (ocaml#6476) feature(melange): add compile_flags (ocaml#6569) refactor: move `modules: Modules.t` from `Dune_package.Lib` to `Lib_info` (ocaml#6605) Set CLICOLOR_FORCE=0 (ocaml#6608) fix: declare deps for ccomp detection (ocaml#6610) refactor: assume Cmdliner.Arg.conv is abstract (ocaml#6609) refactor: gen_rules pattern matching (ocaml#6604) Add CI for MSVC using dkml-workflows (ocaml#6540) ...
Fixes #6470.