-
Notifications
You must be signed in to change notification settings - Fork 415
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
usability bug: dune runtest -promote
behaves in surprising/unexpected/annoying ways
#4101
Comments
Regarding not parsing Regarding not creating the |
Thanks for the prompt feedback. When are |
The intent is that Dune "remembers" what version of Dune you are using to work on some code. This way, when you come back to it later with a new version of Dune, things still work the same. Dune can work outside of a project, so the project creating step is not mandatory. That's why Dune doesn't rely on it. |
I introduced the idea of Dune creating and editing the We discussed this feature today at the Dune meeting and unanimously agreed it was a bad idea, so we will remove it in Dune 3.0.0. |
I created an issue to remember to do it: #4108 |
Is this issue still relevant? I think that the |
Here it was interpreted as
which is really about the On the other hand,
works fine. I think before the Therefore I think this issue has been resolved by the removal of the autocreation of dune-project. |
I typed
dune runtest -promote
instead ofdune promote
in thebin/
subdirectory of a project with cram tests.Expected Behavior
I would expect some error message suggesting that
-promote
is not a valid option.Actual Behavior
Dune displays a weird message that I promptly ignored:
At this point, further attempts to run
dune runtest
fail:the reason is that a
dune-project
file was created in thebin/
subdirectory, which is wrong. (Note: the first message said so exactly, but then who reads error messages? I took me a couple minutes to figure out what the issue was.) Removing the spuriousdune-project
file fixes the issue, anddune
can be used again.I suspect that the problematic behavior comes from an interaction with the
-p <packages>
option. Parsing-promote
as-p romote
is not-useful (but then maybe it's important for consistency with other single-letter options?), but doing weird stuff when trying to build a package that does not exist, effectively getting the user repository in a broken state, is probably the core issue. (I don't know when this behavior is useful, but maybe it's not possible to keep the useful behavior without also allowing this annoying behavior, in which case feel free to say so and close the issue.)Note
dune runtest --promote
does not have such a negative side-effect, but the--promote
option appears to be silently ignored and dropped.Specifications
dune
: v2.7.1Additional information
dune
with the--verbose
flag):The text was updated successfully, but these errors were encountered: