-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
include version requirements in path for resolver error messages #5452
Conversation
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
This looks pretty awesome, a great idea! I wonder though if we may want to tweak the wording slightly? It may be slightly redundant to have the name of the package like It may also be worth avoiding printing a |
☔ The latest upstream changes (presumably #5432) made this pull request unmergeable. Please resolve the merge conflicts. |
I am open to changing the wording. Repeating the name is definitely redundant, what frazing is unambiguous and clearer? You are correct the Is there an easy way to distinguish git/path dependencies, so as to remove A fix for CI and a rebase on its way. |
Oh sorry when I meant "written in the manifest" I meant moreso Oh for sure yeah, the |
d448829
to
aff01ae
Compare
Rebase took a couple of tries, but doing it manually worked. I removed the redundant use of |
Nah this looks reasonable to me! If the version requirement is @matklad wanted to cc you as well, you think the new output is alright? |
☔ The latest upstream changes (presumably #5473) made this pull request unmergeable. Please resolve the merge conflicts. |
I definitely like the information that is presented, however all these
As alternative, what about this more line oriented and tabular presentation:
I am not really attached to this format, but I like some of its properties:
|
As this is hard to rebase, I suggest to merge this ASAP, and tweak rendering details in subsequent PR though, if we want to tweak them (I actually quite like the current rendering, I just think it could be even better). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
as pointed out in #5484, we should mention that precise requirements may be caused by lock files and suggest using update or generate lock file to fix it. |
119bc0f
to
d2ed993
Compare
Oh dear it looks like this may have fallen off the radar by accident! @Eh2406 was there any other blockers on this or did you feel this was good to go? |
It fell off my radar as well. What was left to do:
|
Ah ok, no worries! |
☔ The latest upstream changes (presumably #5691) made this pull request unmergeable. Please resolve the merge conflicts. |
Ok I'm gonna close this for now due to inactivity, but we can of course reopen and/or resubmit! |
Improve resolver message to include dependency requirements Resolves #6199. Thanks for previous efforts: #5452, #6374, #6665, which are great but somehow outdated, so I tweak them and create this PR. This will also be obsolete if we ship pubgrub-rs with cargo in the future 😃 But before that happens, IMO these changes are still helpful. --- This PR changes the resolver error message from https://github.com/rust-lang/cargo/blob/216f915c46b8ada2323423d049314ba18247ef95/tests/testsuite/build.rs#L1104-L1106 to https://github.com/rust-lang/cargo/blob/0afd40b4de17a5c45145a0762beb4ef001720fe1/tests/testsuite/build.rs#L1104-L1106 Also provide different message for different source kinds, such like: https://github.com/rust-lang/cargo/blob/0afd40b4de17a5c45145a0762beb4ef001720fe1/tests/testsuite/build.rs#L2810-L2812 ## TODO? From #5452 (comment), there shall be at least one task left behind: > 3. Special case pind by a lock file and not a `"=1.1.2"` in a dependency. Also add a "note: try cargo update" to the end. In this PR, `validate_links` also faces this issue that a dependency requirement is locked into a precise version `=0.1.0`. https://github.com/rust-lang/cargo/blob/a5f8bc94f5d38539dd127f735ea4d3a515c230fd/tests/testsuite/build_script.rs#L1002-L1004 I am uncertain about how to resolve this. Besides the function`validate_links`, is this problem really a thing that may happen? If not, since `validate_links` only handles old validation logic, it may be ok to drop the commit a5f8bc9 and leave it as is.
This is a follow up to #5428 (comment). It changes the error messages from:
cargo/tests/testsuite/build.rs
Lines 1356 to 1358 in 0b530c3
to:
https://github.com/rust-lang/cargo/blob/499340a81624eaef77d969a3e9fd2cf94f933a2e/tests/testsuite/build.rs#L1356-L1358
Sorry for the big diff, this includes a
cargo +stable fmt
commit before my changes.