-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(melange): demonstrate melange.emit doesn't respect -p
#7849
test(melange): demonstrate melange.emit doesn't respect -p
#7849
Conversation
c5362d9
to
53640ad
Compare
f96856f
to
f38e1f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that how it works for private executables? Given that there's no way to mark melange.emit as "public", this behavior seems consistent. |
So what’s the package field in the emit stanza for? |
@rgrinberg FWIW this was found in a real world use case (reason-react). The setup works like this:
|
No idea tbh. For executables, it's used to attach those executables with public names to packages.
Is it because you're building |
The test in this PR still fails if I change the command to Is the issue that |
Actually, it's just an issue with rule loading. The failure comes from the rule loading stage rather than rule execution stage. The issue is that the melange rules use |
Interesting. What's the best way to address this? |
|
OK, I pushed an alternative fix that also satisfies the test. I'm not sure 1. what to name the dummy target 2. what to write inside |
in | ||
setup_js_rules_libraries ~dir ~scope ~target_dir ~sctx ~requires_link ~mode | ||
mel | ||
match Resolve.is_ok requires_link_resolve with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve.to_result
can be used here.
I would pick some target names that match what we would setup if the dependencies weren't absent. So for melange.emit, that could be the entry point .js files. The intent is to convert "missing rule for target" errors into "missing dependency" errors. |
b71cb13
to
9b6e227
Compare
Thank you. The latest push follows that approach. |
9b6e227
to
7db23be
Compare
eabd40f
to
02b0af4
Compare
c10e959
to
eb7bda9
Compare
Weird that thr Coq tests have lost some location info in the trace. |
Mystery is solved |
6d5f0fe
to
5222d32
Compare
Thanks, Rudi. |
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
5222d32
to
6d52a64
Compare
@emillon can you port this for 3.8.2 please? |
Will do, but this needs a changelog entry. |
I don’t think it needs a changes entry since melange support is still 0.1 (we haven’t included melange anywhere in the change log previously) |
I don't think it's a hard rule. mdx is 0.x but is present in the changelog for example. Given it's documented now I think future melange changes should get a changelog entry now (and for backports it helps knowing what's been backported) |
Didn't we announce melange support in dune? If we did, I think we should include updates in CHANGES. They're informative to users and allow them to follow the development of the feature more easily - even if we aren't yet obligated to maintain backwards compatibility. |
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Co-authored-by: Etienne Millon <me@emillon.org>
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Co-authored-by: Etienne Millon <me@emillon.org>
* test(melange): demonstrate melange.emit doesn't respect `-p` Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> * fix(melange): resolve libraries lazily for melange.emit Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Signed-off-by: Rudi Grinberg <me@rgrinberg.com> * chore: add changelog entry for #7849 (#7925) Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Co-authored-by: Etienne Millon <me@emillon.org> --------- Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com> Signed-off-by: Rudi Grinberg <me@rgrinberg.com> Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
CHANGES: - Switch back to threaded console for all systems; fix unresponsive console on Windows (ocaml/dune#7906, @nojb) - Respect `-p` / `--only-packages` for `melange.emit` artifacts (ocaml/dune#7849, @anmonteiro) - Fix scanning of Coq installed files (@ejgallego, reported by @palmskog, ocaml/dune#7895 , fixes ocaml/dune#7893) - Fix RPC buffer corruption issues due to multi threading. This issue was only reproducible with large RPC payloads (ocaml/dune#7418) - Fix printing errors from excerpts whenever character offsets span multiple lines (ocaml/dune#7950, fixes ocaml/dune#7905, @rgrinberg)
so that ocaml/dune#7849 is used
so that ocaml/dune#7849 is used
dune build -p some-package
was trying to buildmelange.emit
stanzas belonging to other packagesstanza_package
function about the melange package field