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

Fix the CI. 2024-07-06 (v0.12.x) #434

Merged
merged 2 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci_extras/pin-crate-vers-msrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ set -eux

# Pin some dependencies to specific versions for the MSRV.
# cargo update -p <crate> --precise <version>
cargo update -p actix-rt --precise 2.9.0
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"ahash",
"armv",
"benmanes",
"cfgs",
"CHECKME",
"circleci",
"CLFU",
Expand All @@ -33,6 +34,7 @@
"getrandom",
"hashbrown",
"Hasher",
"kani",
"Kawano",
"mapref",
"Miri",
Expand Down
25 changes: 24 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#![allow(unexpected_cfgs)] // for `#[cfg(rustver)]` in this build.rs.

const ALLOWED_CFG_NAMES: &[&str] = &[
"armv5te",
"beta_clippy",
"circleci",
"kani",
"mips",
"rustver",
"trybuild",
];

#[cfg(rustver)]
fn main() {
use rustc_version::version;
Expand All @@ -6,7 +18,18 @@ fn main() {
"cargo:rustc-env=RUSTC_SEMVER={}.{}",
version.major, version.minor
);

allow_cfgs(ALLOWED_CFG_NAMES);
}

#[cfg(not(rustver))]
fn main() {}
fn main() {
allow_cfgs(ALLOWED_CFG_NAMES);
}

/// Tells `rustc` to allow `#[cfg(...)]` with the given names.
fn allow_cfgs(names: &[&str]) {
for name in names.iter() {
println!("cargo:rustc-check-cfg=cfg({name})");
}
}