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

Issue on page /chapters/basics/expressions.html #53

Closed
alweiss282 opened this issue Mar 6, 2022 · 4 comments
Closed

Issue on page /chapters/basics/expressions.html #53

alweiss282 opened this issue Mar 6, 2022 · 4 comments

Comments

@alweiss282
Copy link

In 2.2, it says that running dune build hello.exe will automatically create another dune-project. However, when I ran this command I received the following error:
"Error: I cannot find the root of the current workspace/project. If you would like to create a new dune project, you can type: dune init project NAME Otherwise, please make sure to run dune inside an existing project or workspace. For more information about how dune identifies the root of the current workspace/project, please refer to https://dune.readthedocs.io/en/stable/usage.html#finding-the-root".
Dune seemed to work correctly, when I manually created the project though (i.e. used dune init project NAME). Not sure if this is old syntax or something is wrong on my end?

@jnfoster
Copy link
Contributor

jnfoster commented Mar 7, 2022

It worked flawlessly for me...

[nate@jnf-cayuga:~> mkdir dunetest
[nate@jnf-cayuga:~> cd dunetest/
[nate@jnf-cayuga:~/dunetest> ls
[nate@jnf-cayuga:~/dunetest> cat > hello.ml
let () = ()
[nate@jnf-cayuga:~/dunetest> cat > dune
(executable
 (name hello))
[nate@jnf-cayuga:~/dunetest> dune build hello.exe
Info: Creating file dune-project with this contents:
| (lang dune 2.9)
[nate@jnf-cayuga:~/dunetest> ls
_build		dune		dune-project	hello.ml
[nate@jnf-cayuga:~/dunetest> 

@jnfoster jnfoster closed this as completed Mar 7, 2022
@alweiss282
Copy link
Author

alweiss282 commented Mar 7, 2022

I believe that (as per dune's github) in dune 3.0 the automatic addition of dune-project may no longer occur (which explains why I have this issue while you do not, since it looks like you are running dune 2.9). Apologies if I am wrong, I am just trying to understand why following the textbook line-by-line didn't work for me.

@clarksmr
Copy link
Contributor

clarksmr commented Mar 7, 2022

Dune 3.0 appears to have been released 23 days ago. I can commit to updating the textbook (probably by omitting details, given how Dune is breaking my book!) the next time I teach the course, but mid-semester updates for this reason seem premature.

@alweiss282
Copy link
Author

I'm guessing that explains it! Thank you both for your patience/help.

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