-
Notifications
You must be signed in to change notification settings - Fork 27
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
Better candidate rejection info for exact constraints #170
Comments
We definitely need to do something about the error messages but I'm unsure what should and/or can be done by opam-monorepo and what needs to go in |
I have a similar kind of unhelpful error message:
(when trying to lock a tagged version of patdiff) I see two possible improvements:
|
CC @Leonidas-from-XIV, I think the proper fix for this would also benefit from the upstream changes to 0install we mentioned while looking at #215 last week. @raphael-proust indeed we'd ideally like to filter out the irrelevant versions here. Note that you should be able to run |
@raphael-proust The reason why you're seeing so many complaints about dune buildability is because as I learned while investigating #215 (leading to #248) is that the rejection on version is done after we reject on grounds of dune-buildability. So when rejecting for dune we'd need to know what version is requested, test whether it would violate the version constraint and then decide to not reject it, so it will later get rejected by 0install. Recovering the version constraint is quite tricky since the solver doesn't pass it along so my best bet so far has been parsing it out of the OPAM file which is rather fragile. Honestly, I am not quite sure why 0install solves the dependencies in a way where it first excludes custom predicates and only then applies the version filtering - given even if we decide that a candidate is fine it might still get rejected on version grounds, so it seems like the candidate filtering is done on an unnecessarily big set of candidates and could make more sense to do in reverse: first filter versions and then run custom candidate filters. But I have no insight into the solver - I assume there is a reason for the current behavior that is probably quite apparent. |
I guess that monorepo simply reports the errors as returned by the solver. So the issue could either be fixed by changing the solver (or at least the output of the solver) or post-processing that output (although depending on the output that might be too brittle to do). I admit I don't know how monorepo manages things in the background so I can't make concrete suggestions or comment meaningfully on different approaches. |
Here's an example of an error from
opam monorepo lock
:In this case, I have a local
opam
file that's specifying an exact requirement onocamlformat.0.10
. That requirement can't be met, but this error message doesn't tell me why because it's hidden in the ellipses...
.If there's an exact local constraint on the version of a project, and that version can't be installed, then as a user that's the one I'm interested in fixing. Perhaps the error message could be changed to highlight that case? I'm thinking of something like:
The text was updated successfully, but these errors were encountered: