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 check-cfg-related and rust-lld-related CI failures #1110

Merged
merged 4 commits into from
May 19, 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
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,11 @@ members = [
missing_debug_implementations = "warn"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems this warn isn't avoidable, when locally-developing crossbeam itself with any toolchain with the support of Cargo.toml's lints.rust and < nightly-2024-05-19..:

$ RUSTUP_TOOLCHAIN=1.78.0-x86_64-unknown-linux-gnu cargo check
warning: /home/ryoqun/work/crossbeam/Cargo.toml: unused manifest key: workspace.lints.rust.unexpected_cfgs.check-cfg
   Compiling crossbeam-utils v0.8.19 (/home/ryoqun/work/crossbeam/crossbeam-utils)

Copy link

Choose a reason for hiding this comment

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

Btw, we are working on making this warning go away in the current beta with rust-lang/cargo#13925, so that when it reaches stable, the warning would already be gone by the previous version.

'cfg(crossbeam_loom)',
'cfg(crossbeam_no_atomic)',
'cfg(crossbeam_sanitize)',
'cfg(crossbeam_sanitize_thread)',
] }
unreachable_pub = "warn"
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
5 changes: 4 additions & 1 deletion ci/careful.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ set -euxo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..

export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout"
# TODO: Once cargo-careful's bug (https://github.com/RalfJung/cargo-careful/issues/31) is fixed,
# stop reverting back to the system's default linker, instead of rust-lld, which became the new
# default on linux recently (nightly-2024-05-18 and onwards).
export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout -Z linker-features=-lld"

cargo careful test --all --all-features --exclude benchmarks -- --test-threads=1