-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RUSTC_WORKSPACE_WRAPPER tracking issue #8143
Comments
One problem that I ran into is when running I'm not sure how important that is, but it seems like it would make adopting clippy in a larger workspace to be difficult (and make the |
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
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
@ebroto I've noticed you've gotten some fixes landed in clippy recently 🎉 (sorry, I haven't been able to help review or push those through). Do you think it is time to go ahead and stabilize this? I don't think I have any specific objections (or at least can't think of a better design for this use case). If so, are you interested in working on a PR? |
No problem! Your guidance here has been really helpful :)
I think so. We could improve the process of passing arguments to the wrapper (the current solution in Clippy is hacky), but I think that could be addressed separately, as landing this would really improve Clippy's usability in stable.
Yes! I'm not sure what's involved here but I can take a look at other tracking issues. |
I think it should be pretty easy:
|
Coming into this extremely late, but this doesn't seem terribly important. For CI usage I would expect projects to simply use |
RUSTC_WORKSPACE_WRAPPER was added in #7533, primarily for clippy support, but could be useful for others.
Differences from
RUSTC_WRAPPER
:You can test drive this with
cargo clippy -Zunstable-options
on the latest nightly.One of the primary benefits is that now
cargo clippy
can share the same cache withcargo check
for non-workspace members.Before stabilizing, some things to consider:
cargo clippy -p NAME
only works for workspace members.CARGO_PRIMARY_PACKAGE
environment variable, perhaps something like that could be used?-p non-member
?my-tool wrapper
would pass the "wrapper" argument tomy-tool
to tell it is in wrapper mode. Currently the env vars do not allow passing in arguments. Alternatively, Cargo could set some special env var to inform the executable that it is being used as a wrapper.cc @yaahc
The text was updated successfully, but these errors were encountered: