Can not build newly generated "bin" or "hello" project
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?
Thanks for the report @yeryomenkom 🙂 I'll try to have a look at it soon
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.