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

Can not build newly generated "bin" or "hello" project #125

Open
yeryomenkom opened this issue Dec 20, 2021 · 2 comments
Open

Can not build newly generated "bin" or "hello" project #125

yeryomenkom opened this issue Dec 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@yeryomenkom
Copy link

Hi!

I can not build a newly generated "bin" project. Tried also with the "hello" type of project - the same error.

Details:
OS: macos

❯ opam spin new bin my_ocaml_app

⚠️ No config file found. To save some time in the future, create one with spin config
? Project name: my_ocaml_app
? Project slug: myocamlapp
? Description: A short, but powerful statement about your project
? Name of the author: yeryomenkom
? Which test framework do you prefer? Alcotest
? Which CI/CD do you use? GitHub

🏗️  Creating a new project from bin in my_ocaml_app
Done!

🎁  Installing packages in a switch. This might take a couple minutes.
opam-spin: [ERROR] The template generation failed:
The command make build did not run successfully: exited with code 2
❯ opam --version
2.1.2
❯ opam spin --version
0.8.3

If I try to run make build I get the following:

❯ make build
opam exec -- dune build --root .
File "test/myocamlapp_test.ml", line 1:
Error (warning 70 [missing-mli]): Cannot find interface file.
make: *** [build] Error 1

I tried to adjust dune flags for the project in an attempt to disable the above warning but it also didn't help.
Here is my dune file after those adjustments:

(env
 (dev
  (flags
   (:standard -w +A-48-42-44-70 -warn-error +A-3-70))))

Can somebody help with this, please?

@tmattio tmattio added the bug Something isn't working label Dec 20, 2021
@tmattio
Copy link
Owner

tmattio commented Dec 20, 2021

Thanks for the report @yeryomenkom 🙂 I'll try to have a look at it soon

@yeryomenkom
Copy link
Author

Update.
Actually, dune flags adjustments do the trick. I am just new to VSCode and didn't save the file before building the project.

here are the flags I am currently using:

(env
 (dev
  (flags
   (:standard -w +A-48-42-44 -warn-error +A-3-70))))

an the output I get:

❯ make build
opam exec -- dune build --root .
File "test/myocamlapp_test.ml", line 1:
Warning 70 [missing-mli]: Cannot find interface file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants