-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo <1.60 failed to select a version of a dependency due to either ?
(weak) or dep:
(namespaced) features
#10623
Comments
Looks like I missed that libgit2-sys uses a weak dependency (really hard to see that My guess is that this is expected behavior when loading this into old versions of cargo. |
Considering the usability issue of this, re-opening for us providing better errors. |
From #10688 |
See also #7929 which discusses some related issues to the resolver not telling you why something wasn't picked. I took a quick peek, and it seems like it will be quite difficult to thread the information through. There are many layers of abstractions between where the filtering happens and where the resolver fetches it. Also, the resolver API doesn't look like it is designed to funnel partial errors out of the I'd love to see the error messages improved, but it looks like it could be a big undertaking. |
?
(weak) or dep:
(namespaced) features
Due to rust-lang/cargo#10623, cargo-bitbake needs at least cargo 1.60 to be built.
Looking into this as rust-lang/rfcs#3416 could end up requiring a new index entry version. The first step in this process is dealing with the Index Index It looks like the version is all we need to extract for the IndexIndex, so we could reparse with a smaller set of We then need to track the failed state through the rest of Sources up to the resolver and report the error. I'm tempted to say we should wrap For me, the big question is how to report errors in the resolver. Could we make the resolver work off of @Eh2406 I'm assuming you are going to say there is nothing we can do in the current resolver to report these errors even if we tunnel the information up. Is that right? |
I am not as pessimistic as you imagined me to be. I think there is a lot of value in the project you outlined. Providing this information to the resolver allows improvements or replacements of the resolver to use that information, without providing information it's hard to imagine where to start. The current design of the resolver can only report on the last thing it tried when it ran out of options. Many problems are direct and simple. For simple cases even this will be a huge improvement. " |
This reproduces the problem in rust-lang#10623.
This reproduces the problem in rust-lang#10623.
This reproduces the problem in rust-lang#10623.
This reproduces the problem in rust-lang#10623.
This reproduces the problem in rust-lang#10623.
This reproduces the problem in rust-lang#10623.
Below examples are a bit verbose, but may provide some value? 🤷♂️ (I'm mostly documenting the experience) The
I don't really use such old toolchain releases, but was contributing to a crate which did where I encountered this resolver confusion (later discovering
I'm not sure if this sort of incompatibility has also been introduced again in newer toolchain releases since too? (It was definitely unexpected 😅 ) Example - Resolving
|
Bad error messages with |
Not quite the same error but a related problem with us showing an unrelated error that is rooted in MSRV can be found at rust-cli/env_logger#304. I haven't created a separate issue for this yet as I'm still not sure what I'd be asking for moving forward (since we can't time travel to <1.71). |
Problem
I did a
cargo update
and my CI broke when verifying MSRV.The error being from the resolver and being cargo-version specific is why I am posting here rather than on the git2 repo.
Steps
Possible Solution(s)
Track parse bad candidates when resolving and report them to the user if they are relevant
Notes
Old cargo cannot see crates in the registry that use weak or namespaced features (or similar new index data).
Version
The text was updated successfully, but these errors were encountered: