- 
                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
base: master
Are you sure you want to change the base?
WIP: wrote 3 tests about improving the error message in the path dependency #16138
Conversation
2a4dc4d    to
    2bf90ff      
    Compare
  
            
          
                tests/testsuite/path.rs
              
                Outdated
          
        
      | --> Cargo.toml:10:23 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed? this seems unrelated
`--no-capture` was added in 1.88, with `--nocapture` being soft-deprecated.
…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
2bf90ff    to
    4d041ea      
    Compare
  
    | ☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts. | 
| @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? 
 | 
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.