-
Notifications
You must be signed in to change notification settings - Fork 414
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 init project
is broken due to project/workspace root detection
#4960
Comments
Must be because of #4921. The solution here should be to move root detection to later on in
It's a bit tedious indeed. Dune detects when it is run from inside dune (via the environment variable |
Sorry @bobot: afaict the breakage here is unrelated to any changes I made and I don't have the bandwidth to pick up the bug fix. From my brief look, the root detection mechanism will need to non-trivial reworking. In order not to break the project initialization, the root detection in https://github.com/ocaml/dune/blob/main/bin/workspace_root.ml#L65-L94 will need some way of communicating an override that is determined after CLI parsing (afaik, since the parser is applicative, we don't have access to intermediate values until the entire command has been parsed). |
Dune init is only calling |
No problem, thanks for the analysis! |
Expected Behavior
dune init proj foo
should initialize a new project in the directoryfoo
.Actual Behavior
A workaround is
but, obviously, this is broken behavior.
Reproduction
I don't know how we can test this in our current CI/cram set up, since those all exist within a dune project.
Specifications
dune
(output ofdune --version
):3.0+alpha-867-gf22e56c
ocaml
(output ofocamlc --version
):version 4.11.1
Ubuntu 21.04
The text was updated successfully, but these errors were encountered: