-
Notifications
You must be signed in to change notification settings - Fork 2.7k
WIP: wrote 3 tests about improving the error message in the path dependency #16138
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
Draft
ibilalkayy
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
ibilalkayy:path_dependency_msg_improvement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP: wrote 3 tests about improving the error message in the path dependency #16138
ibilalkayy
wants to merge
1
commit into
rust-lang:master
from
ibilalkayy:path_dependency_msg_improvement
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
epage
reviewed
Oct 22, 2025
epage
reviewed
Oct 22, 2025
epage
reviewed
Oct 22, 2025
2a4dc4d to
2bf90ff
Compare
epage
reviewed
Oct 29, 2025
2bf90ff to
4d041ea
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@epage I noticed that there were 7 spaces missing on both lines. So I added them and the test got passed. I have squashed and pushed the code, but these spaces are not showing. Maybe it's a GitHub thing. There is a conflict that came after your changes. Should I resolve the error by keeping this function or remove it?
|
82b2079 to
a12c57e
Compare
…directory and invalid_manifest_in_path made the tests pass by showing the current behaviour added generate-lockfile in the remaining two tests added the 7 spaces in the invalid_base to pass it and it got matched with the test before added 7 spaces to make the test pass
a12c57e to
9c538bb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cli-help
Area: built-in command-line help
A-completions
Area: shell completions
A-documenting-cargo-itself
Area: Cargo's documentation
A-timings
Area: timings
Command-test
S-waiting-on-author
Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
This PR is trying to improve the error message when the wrong package is found in the path dependency. Currently the PR started from the tests.
How to test and review this PR?
There are 3 tests added that cover each case that is brought up in this issue.
invalid_package_name_in_path()definitely_not_barexists in thecrates/barand it goes to thecrates/barto find that it is not present there and it gives the error.invalid_package_in_subdirectory()definitely_not_barexists in thecrates/barand after going there, it does not find it. Then it goes more deeper in thedefinitely_not_barto find that the manifest file exists there and give use the helpful message.invalid_manifest_in_path()definitely_not_barexists in thecrates/barbut after going there, it finds that there are other two packages butdefinitely_not_baris not present and it gives the message.