Skip to content

Add --no-deps option to avoid running on path dependencies in workspaces#6188

Merged
bors merged 5 commits into
rust-lang:masterfrom
ebroto:primary_package
Dec 9, 2020
Merged

Add --no-deps option to avoid running on path dependencies in workspaces#6188
bors merged 5 commits into
rust-lang:masterfrom
ebroto:primary_package

Conversation

@ebroto

@ebroto ebroto commented Oct 17, 2020

Copy link
Copy Markdown
Contributor

Since rust-lang/cargo#8758 has hit nightly, this allows us to address the second bullet point and the concern related to --fix in the RUSTC_WORKSPACE_WRAPPER tracking issue.

As a reminder stabilizing that env var will solve #4612 (Clippy not running after cargo check in stable) and would allow to stabilize the --fix option in Clippy.

changelog: Add --no-deps option to avoid running on path dependencies in workspaces

Fixes #3025

@rust-highfive

Copy link
Copy Markdown

r? @Manishearth

(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 Oct 17, 2020
@ehuss

ehuss commented Oct 22, 2020

Copy link
Copy Markdown
Contributor

Thanks for moving this forward!

One more thing, I think when running cargo clippy --fix it should also probably imply --no-deps as well, since it can cause problems with how fix works. I'm not sure how easy that would be to wire in, or if it would have any problems, though.

@Manishearth

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Oct 22, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 5f51eed has been approved by Manishearth

bors added a commit that referenced this pull request Oct 22, 2020
Add --no-deps option to avoid running on path dependencies in workspaces

Since rust-lang/cargo#8758 has hit nightly, this allows us to address the second bullet point and [the concern related to `--fix`](rust-lang/cargo#8143 (comment)) in the [RUSTC_WORKSPACE_WRAPPER tracking issue](rust-lang/cargo#8143).

As a reminder stabilizing that env var will solve #4612 (Clippy not running after `cargo check` in stable) and would allow to stabilize the `--fix` option in Clippy.

changelog: Add `--no-deps` option to avoid running on path dependencies in workspaces

Fixes #3025
@bors

bors commented Oct 22, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5f51eed with merge 5139104...

@ebroto

ebroto commented Oct 22, 2020

Copy link
Copy Markdown
Contributor Author

Oops I think @ehuss comment is relevant, should I open a followup?

@ebroto

This comment has been minimized.

@bors

bors commented Oct 22, 2020

Copy link
Copy Markdown
Contributor

☀️ Try build successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Build commit: 5139104 (5139104ada0b418dcd596e11ad3f3ff9aa9fa136)

@ebroto ebroto added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Oct 24, 2020
Comment thread src/driver.rs Outdated
@Manishearth

This comment has been minimized.

@flip1995

This comment has been minimized.

@Manishearth

This comment has been minimized.

@ebroto

ebroto commented Nov 27, 2020

Copy link
Copy Markdown
Contributor Author

Sorry to everyone involved for the delay in making this move forward, I didn't have much free time lately and wanted to give priority to some pending reviews.

@flip1995 I've addressed your concern, code is much clearer now, thanks!

@ehuss now --fix implies --no-deps. Thanks for your suggestion!

Regarding the RUSTC_WORKSPACE_WRAPPER tracking issue, I have prepared another PR to make Clippy use RUSTFLAGS for their own arguments so changing those results in a rebuild instead of reusing cached results. It removes a hack (CLIPPY_HACKERY) to add another one, but I think it's better to solve the usability problem. We can solve that in the future (maybe by making cargo take into account another env var to invalidate cached results).

After that, I'm not sure if there would be something else missing to stabilize RUSTC_WORKSPACE_WRAPPER. Maybe the ccache issue, not sure if that would be a blocker? I would be happy to work on that if it is :)

@ebroto

This comment has been minimized.

Comment thread src/driver.rs Outdated
Comment thread tests/dogfood.rs

@flip1995 flip1995 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me. Don't know if other people want to take a look before merging.

@ebroto

ebroto commented Dec 9, 2020

Copy link
Copy Markdown
Contributor Author

I will go ahead and @bors r=flip1995 this. We can always add further changes in a follow-up :)

@bors

bors commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 952b731 has been approved by flip1995

@bors

bors commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit 952b731 with merge a2d9925...

@bors

bors commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing a2d9925 to master...

@bors bors merged commit a2d9925 into rust-lang:master Dec 9, 2020
@ebroto ebroto deleted the primary_package branch December 9, 2020 16:08
fpoli added a commit to viperproject/prusti-dev that referenced this pull request Dec 10, 2020
fpoli added a commit to viperproject/prusti-dev that referenced this pull request Dec 14, 2020
@mleonhard

Copy link
Copy Markdown

This is super useful. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit to specific package in workspace, also excluding its dependencies

7 participants