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

Cannot run this project in MacOS with Nix #97

Closed
r17x opened this issue Nov 9, 2023 · 5 comments
Closed

Cannot run this project in MacOS with Nix #97

r17x opened this issue Nov 9, 2023 · 5 comments

Comments

@r17x
Copy link

r17x commented Nov 9, 2023

Reproduces

  • clone this repository
  • run command nix develop -c $SHELL
  • run command dune build
  • Error
server-reason-react  main via 🐫 v5.1.1+dev0-2023-09-14  ❄️  impure
❯ dune build
File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Location, and its interface was not compiled with -opaque
File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Stdppx, and its interface was not compiled with -opaque
File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Compmisc, and its interface was not compiled with -opaque

File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Location, and its interface was not compiled with -opaque
File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Alcotest_engine__Test, and its interface was not compiled with -opaque

File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Alcotest_engine__Core, and its interface was not compiled with -opaque

File "_none_", line 1:
Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Alcotest_engine__Config, and its interface was not compiled with -opaque

Thank you

@joprice
Copy link
Collaborator

joprice commented Nov 9, 2023

You can modify the dune file to exclude the cmx warning (-warn-error +A-d-58 -alert ++browser_only)))). @davesnx Maybe that can be the default. Not sure if having this warning be promoted to an error is useful.

@davesnx
Copy link
Member

davesnx commented Nov 9, 2023

I don't maintain the nix flake, and I'm unsure how to help here @r17x.

In the opam setup, running dune build works fine, you can take a look here: https://github.com/ml-in-barcelona/server-reason-react/actions/runs/6765284900/job/18384737801#step:8:2

@davesnx
Copy link
Member

davesnx commented Nov 10, 2023

But why does even happen? @joprice

@joprice
Copy link
Collaborator

joprice commented Nov 10, 2023

I spoke to @anmonteiro about this and he said it's due to these repos using (implicit_transitive_deps false). Both Ppxlib and Alcotest set these. I'm not sure if we can modify the nix rules to add the propagated dependencies or if this is something that just has to be treated as an ignorable warning.

@davesnx
Copy link
Member

davesnx commented Nov 10, 2023

Right, if you want to build this locally with nix you might need to fix ppxlib and alcotest, or disable the warning.

There's no code change related with server-reason-react, so I will close this, feel free to re-open if I miss anything

@davesnx davesnx closed this as completed Nov 10, 2023
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

3 participants