8000 Add rule for bc-for-jsoo target only when performing whole program compilation by vouillon · Pull Request #10693 · ocaml/dune · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

vouillon
Copy link
Member
@vouillon vouillon commented Jul 3, 2024

@hhugo Can you have a look?

@rgrinberg rgrinberg requested a review from hhugo July 3, 2024 20:31
@rgrinberg rgrinberg added the jsoo label Jul 3, 2024
@hhugo hhugo self-assigned this Jul 4, 2024
let modes =
if Mode_conf.Set.mem info.modes Javascript
then Mode_conf.Set.add info.modes Byte
else info.modes
Copy link
Collaborator

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

Copy link
Collaborator

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 ?

Copy link
Collaborator

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]
 |

Copy link
Member Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this incorrect logic was introduced in #5049+#6645

Copy link
Collaborator
@hhugo hhugo left a 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.

@vouillon vouillon force-pushed the bc-for-jsoo branch 2 times, most recently from 52aad68 to 88acc3d Compare July 5, 2024 15:53
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
Copy link
Collaborator

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)

Copy link
Member Author

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>
@rgrinberg rgrinberg merged commit 2d3d1dc into ocaml:main Jul 6, 2024
28 checks passed
@rgrinberg rgrinberg added this to the 3.17.0 milestone Jul 6, 2024
anmonteiro pushed a commit to anmonteiro/dune that referenced this pull request Nov 17, 2024
…mpilation (ocaml#10693)

Signed-off-by: Jérôme Vouillon <jerome.vouillon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0