-
Notifications
You must be signed in to change notification settings - Fork 437
Add rule for bc-for-jsoo target only when performing whole program compilation #10693
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
Conversation
let modes = | ||
if Mode_conf.Set.mem info.modes Javascript | ||
then Mode_conf.Set.add info.modes Byte | ||
else info.modes |
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.
I guess this logic has been wrong for a while
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.
Can we add a test demonstrating the effects of this removal ?
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.
File "test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t", line 1, characters 0-0:
------ test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t
++++++ test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t.corrected
File "test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t", line 8, characters 0-1:
|Run inline tests using node js
|
| $ cat >dune-project <<EOF
| > (lang dune 2.6)
| > EOF
|
+| $ dune build js/.inline_tests_js.inline-tests/inline_test_runner_inline_tests_js.bc --display short
+| Error: Don't know how to build
+| js/.inline_tests_js.inline-tests/inline_test_runner_inline_tests_js.bc
+| [1]
|
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.
Thanks for the test. I have added it.
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.
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.
Looks good, just requesting an extra test.
52aad68
to
88acc3d
Compare
src/dune_rules/exe_rules.ml
Outdated
then Exe.Linkage.byte_for_jsoo :: modes | ||
then ( | ||
match jsoo_compilation_mode with | ||
| Js_of_ocaml.Compilation_mode.Whole_program -> Exe.Linkage.byte_for_jsoo :: modes |
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.
Could we use type disambiguation to avoid the Js_of_ocaml.Compilation_mode
prefix.
- ~jsoo_compilation_mode
+ ~(jsoo_compilation_mode : Js_of_ocaml.Compilation_mode.t)
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.
Indeed. I have made the change.
…mpilation Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
…mpilation (ocaml#10693) Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
@hhugo Can you have a look?