Deprecate util/dev in favor of cargo alias#5109
Conversation
|
Not sure if this will pass CI already and it will conflict with #5088 for now. Also not sure about what this part in CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR |
|
Don't worry about #5088, it's an easy change there The env var makes sure, that clippy_dev gets build in the same target dir as clippy itself. This way libraries can be shared between clippy and clippy_dev. I think there is a cargo flag to also set this. The env var also gets set by CI |
| @@ -1,5 +1,6 @@ | |||
| [alias] | |||
| uitest = "test --test compile-test" | |||
| dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --" | |||
There was a problem hiding this comment.
Use --target-dir flag I believe
|
Regarding the |
f9141d4 to
3f914c5
Compare
If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config`. This means one less shell script and a bit more cross-platform support for contributors.
This allows us to use the method in both `fmt.rs` and `lib.rs` in multiple places. The downside is that we panic inside the method now, instead of using the error handling in `fmt.rs`. We may want to centralize the error handling for clippy_dev at some point, though.
848ce7a to
3036a2c
Compare
|
GitHub seems to show the wrong commit order: 3036a2c is the second commit and contains some more cleanup refactoring for finding the project root directory. The PR should be ready for review now |
flip1995
left a comment
There was a problem hiding this comment.
r=me with last occurrence of copy of project_root() function removed.
Co-Authored-By: Philipp Krones <hello@philkrones.com>
|
@bors r=flip1995 |
|
📌 Commit 8f457fa has been approved by |
Deprecate util/dev in favor of cargo alias This means one less shell script and a bit more cross-platform support for contributors. If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined. changelog: none
|
☀️ Test successful - checks-travis, status-appveyor |
No, it is not. When unset CARGO_TARGET_DIR env, running |
This means one less shell script and a bit more cross-platform support
for contributors.
If you've been using
./util/devbefore, this now becomescargo dev.The key part of this change is found in
.cargo/configwhere an alias for calling theclippy_devbinary is defined.changelog: none