Skip to content
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

dune passes jsoo compile flags as link flags #5563

Closed
ulugbekna opened this issue Apr 8, 2022 · 2 comments
Closed

dune passes jsoo compile flags as link flags #5563

ulugbekna opened this issue Apr 8, 2022 · 2 comments

Comments

@ulugbekna
Copy link
Contributor

Expected Behavior

A jsoo project compiles with (js_of_ocaml (flags --pretty))

Actual Behavior

One gets an error

File "src/_unknown_", line 1, characters 0-0:
js_of_ocaml: unknown option '--pretty'.
Usage: js_of_ocaml link [OPTION]… [JS_FILES]…
Try 'js_of_ocaml link --help' or 'js_of_ocaml --help' for more information.

Reproduction

Try compiling a jsoo project with (js_of_ocaml (flags --pretty)

Specifications

  • Version of dune (output of dune --version): 3.0.3
  • Version of ocaml (output of ocamlc --version): 4.14.0
  • Operating system (distribution and version): macOS Monterey 12.2.1 (21D62)
  • Js_of_ocaml 4.0.0

Additional information

The documentation says that (flags ...) is passed to js_of_ocaml compile but actually it is passed to js_of_ocaml link as well. See this line

Thanks,
Ulugbek

ulugbekna pushed a commit to ulugbekna/vscode-ocaml-platform that referenced this issue Apr 8, 2022
due to a dune bug, we remove `--pretty` flag
 bug: ocaml/dune#5563
@hhugo
Copy link
Collaborator

hhugo commented Apr 8, 2022

This is because your are using dune lang 2.*. You should update to dune lang 3.0

@ulugbekna
Copy link
Contributor Author

Indeed, thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants