Skip to content

Conversation

@ibilalkayy
Copy link
Contributor

@ibilalkayy ibilalkayy commented Oct 22, 2025

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()

    • It reads the main manifest file to find that the definitely_not_bar exists in the crates/bar and it goes to the crates/bar to find that it is not present there and it gives the error.
  • invalid_package_in_subdirectory()

    • It reads the main manifest file to find that the definitely_not_bar exists in the crates/bar and after going there, it does not find it. Then it goes more deeper in the definitely_not_bar to find that the manifest file exists there and give use the helpful message.
  • invalid_manifest_in_path()

    • It reads the main manifest file to find that definitely_not_bar exists in the crates/bar but after going there, it finds that there are other two packages but definitely_not_bar is not present and it gives the message.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 22, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@epage epage marked this pull request as draft October 22, 2025 14:20
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 22, 2025
@epage epage changed the title wrote 3 tests about improving the error message in the path dependency WIP: wrote 3 tests about improving the error message in the path dependency Oct 22, 2025
@ibilalkayy ibilalkayy force-pushed the path_dependency_msg_improvement branch from 2a4dc4d to 2bf90ff Compare October 29, 2025 14:15
Comment on lines 1100 to 1102
--> Cargo.toml:10:23
Copy link
Contributor

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

Kobzol and others added 8 commits October 29, 2025 20:37
`--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
@ibilalkayy ibilalkayy force-pushed the path_dependency_msg_improvement branch from 2bf90ff to 4d041ea Compare October 29, 2025 16:29
@rustbot rustbot added 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 labels Oct 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2025

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot rustbot added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Oct 29, 2025
@ibilalkayy
Copy link
Contributor Author

ibilalkayy commented Oct 29, 2025

@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?

function get_codegen_section_x(sections) {...}

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants