-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Dogfood and CI fixes #6849
Dogfood and CI fixes #6849
Conversation
Those workflows should always test exactly the same things
Since clippy cannot be a workspace, we have to check the sub-crates separately
This isn't necessary anymore, since we don't use a custom toolchain anymore
@bors try |
This adds about 1m20s to the |
☀️ Try build successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with the panic fixed
let name = match krate { | ||
CrateSource::CratesIo { name, .. } => name, | ||
CrateSource::Git { name, .. } => name, | ||
CrateSource::Path { name, .. } => name, | ||
CrateSource::CratesIo { name, .. } | CrateSource::Git { name, .. } | CrateSource::Path { name, .. } => { | ||
name | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's super neat, I'll have to remember that! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an auto-fixable Clippy lint 😉
clippy_dev/src/lintcheck.rs
Outdated
println!("Downloading and extracting {} {} from {}", name, version, url); | ||
let _ = std::fs::create_dir("target/lintcheck/"); | ||
let _ = std::fs::create_dir(&krate_download_dir); | ||
let _ = std::fs::create_dir(&extract_dir); | ||
std::fs::create_dir("target/lintcheck/").expect("cannot create lintcheck target dir"); | ||
std::fs::create_dir(&krate_download_dir).expect("cannot create crate download dir"); | ||
std::fs::create_dir(&extract_dir).expect("cannot create crate extraction dir"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This panics now because the directory may already exist (previously we just ignored the error)
I think we can work around by using std::fs::create_dir_all
clippy_dev/src/lintcheck.rs
Outdated
let _ = std::fs::create_dir(&krate_download_dir); | ||
let _ = std::fs::create_dir(&extract_dir); | ||
std::fs::create_dir("target/lintcheck/").unwrap_or_else(|err| { | ||
if err.kind() != ErrorKind::AlreadyExists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to only allow the dir to exist. I think panicking for other things should be fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, seems fine. :)
@bors r=matthiaskrgr |
📌 Commit 74eb448 has been approved by |
💔 Test failed - checks-action_test |
@bors retry (network error, the macOS runner seems to have problems recently.) |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
The CI fix is practically #6829 rebased and squashed into one commit
Dogfood fix is a follow up of #6802
r? @matthiaskrgr for lintcheck changes
(best reviewed with whitespace changes hidden)
changelog: none