cargo icon indicating copy to clipboard operation
cargo copied to clipboard

WIP: wrote 3 tests about improving the error message in the path dependency

Open ibilalkayy opened this issue 2 months ago • 3 comments

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.

ibilalkayy avatar Oct 22 '25 14:10 ibilalkayy

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

rustbot avatar Oct 22 '25 14:10 rustbot

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

rustbot avatar Oct 29 '25 16:10 rustbot

@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) {...}

ibilalkayy avatar Oct 29 '25 16:10 ibilalkayy