Skip to content
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

Sweep unrelated message from unnecessary workspace infromation #8681

Merged

Conversation

weihanglo
Copy link
Member

Resolves #8619

Only pass workspace information when the source is from a local crate installation.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 6, 2020
@weihanglo
Copy link
Member Author

Before 2018 edition, binaries installation from current working directory is deprecated. In 2018 edition without --path it would throw an error. I'll fix it later maybe by identifying editions.

@ehuss
Copy link
Contributor

ehuss commented Sep 8, 2020

Thanks, can you maybe add a test for this?

I don't think it is necessary to do any edition checks (which I think would be near impossible anyways).

@weihanglo
Copy link
Member Author

I don't think it is necessary to do any edition checks (which I think would be near impossible anyways).

Yes. Fortunately I did not choose this solution.

Thanks, can you maybe add a test for this?

Seems that installs_from_cwd_by_default and installs_from_cwd_with_2018_warnings already covers the deprecation message tests, I need some direction and advice for what test case should be added. Thanks!

@ehuss
Copy link
Contributor

ehuss commented Sep 9, 2020

I would add a new test that creates a package to install from a registry (use Package::new with a simple main.rs and .publish()). Then create a workspace that will trigger a warning (like a patch in a member manifest as described in the original issue). Call something like p.cargo("check") with with_stderr to verify it emits a warning. Then run p.cargo("install reg") to try to install the package created with Package::new and call .with_stderr to ensure the output doesn't include any warnings.

@weihanglo
Copy link
Member Author

I've add a test. Thanks for your mentoring @ehuss!

tests/testsuite/install.rs Outdated Show resolved Hide resolved
@ehuss
Copy link
Contributor

ehuss commented Sep 10, 2020

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Sep 10, 2020

📌 Commit a527caa has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2020
@bors
Copy link
Collaborator

bors commented Sep 10, 2020

⌛ Testing commit a527caa with merge f110fd9...

@bors
Copy link
Collaborator

bors commented Sep 10, 2020

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing f110fd9 to master...

@bors bors merged commit f110fd9 into rust-lang:master Sep 10, 2020
@weihanglo weihanglo deleted the fix/redundant-messsage-local-crate-install branch September 11, 2020 00:28
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 15, 2020
Update cargo

6 commits in 875e0123259b0b6299903fe4aea0a12ecde9324f..8777a6b1e8834899f51b7e09cc9b8d85b2417110
2020-09-08 20:17:21 +0000 to 2020-09-15 19:11:03 +0000
- updated yank error message (rust-lang/cargo#8697)
- Fix non-determinism with new feature resolver. (rust-lang/cargo#8701)
- Display formatted output for JSON diffing in tests. (rust-lang/cargo#8692)
- Add --name suggestion for cargo new (rust-lang/cargo#8675)
- Sweep unrelated message from unnecessary workspace infromation (rust-lang/cargo#8681)
- Docs: Make it more clear we have two types of workspaces (rust-lang/cargo#8666)
@ehuss ehuss added this to the 1.48.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo prints unrelated warnings on cargo install --git
5 participants