Conversation
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
src/js_of_ocaml_rules.ml
Outdated
| let separate_compilation_enabled = dev_mode | ||
| let pretty sctx ~dir = | ||
| match jsoo_compilation sctx ~dir with | ||
| | Separate -> ["--pretty"] |
There was a problem hiding this comment.
--pretty and --sourcemap have no relationship with separate compilation. They should be enabled with the dev profile.
There was a problem hiding this comment.
Yup that is true. I just kept the old behavior to keep things simple for an initial PR. As I said in my ticket, the plan is to treat these as normal default flags for dev profile
|
@diml when you're back, can you add hhugo to the team of maintainers as the jsoo maintainer? I could not select him from the list of reviewers. @hhugo What do you think about splitting the jsoo flags field into links and compile flags in analogy to the regular compile flags. This way we'll be able to set |
|
Depends on #1048 |
|
@rgrinberg, |
|
Understood, but we still need separate fields for compilation and linking. Otherwise there won't be a way to set the defaults such that |
|
Well, it's a bit more complicated.
|
|
I added @hhugo |
|
Thanks for clarifying @hhugo, this does complicate things a little bit. Essentially, the link flags would be entirely useless separate compilation was turned on. I see possibilities such as:
These flags would only be consumed in separate compilation mode of course.
Any other ideas you have in mind? Or a preference to any of the above? |
|
ping @hhugo. Not urgent, but I would like this in for 1.3 |
|
@rgrinberg asked me to comment on this proposal as I have a related request in #1613. I think it's good. I tried to use this functionality without realizing it didn't exist, and the thing I tried looks a lot like this. The one comment I have is on the naming of the |
|
Has this been considered a go or no go? Setting |
|
I'm looking at this now. |
|
Superseded by #5049 |
WIP to address #970
I've added the basic functionality that
--devenabled via the singlejsoo_compilationfield. However, the old mode is a bit more involved than just separate compilation and also involved some flag switching. The flags thing I think is best handled the same way we handleocaml_flags. So either include the profile dependant jsoo flags inOcaml_flags.tor make something similar.I'm also taking suggestions for naming. What I think would be ideal if we had a field for env that looked like this:
Btw:
js_of_ocamlis kind of a mouthful, I'd be in favor of deprecating it and adoptingjsooinstead in the dune lang.