Skip to content

Commit d4caecc

Browse files
committed
Auto merge of #3035 - RalfJung:serde, r=RalfJung
bump serde bump to a version with the binary blob removed also, respect CARGO_EXTRA_FLAGS in more places
2 parents 4b8d7fd + c6ca2ad commit d4caecc

File tree

11 files changed

+51
-41
lines changed

11 files changed

+51
-41
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ rustc_version = "0.4"
4141
# Features chosen to match those required by env_logger, to avoid rebuilds
4242
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
4343
lazy_static = "1.4.0"
44-
# Pin a version of serde without intransparent unreproducible binary blobs.
45-
serde = { version = "1.0, < 1.0.172", features = ["derive"] }
44+
# Require a version of serde without intransparent unreproducible binary blobs.
45+
serde = { version = "1.0.185", features = ["derive"] }
4646

4747
[package.metadata.rust-analyzer]
4848
# This crate uses #[feature(rustc_private)].

cargo-miri/Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-miri/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ rustc-build-sysroot = "0.4.1"
2222

2323
# Enable some feature flags that dev-dependencies need but dependencies
2424
# do not. This makes `./miri install` after `./miri build` faster.
25-
# Pin a version of serde without intransparent unreproducible binary blobs.
26-
serde = { version = "1.0, < 1.0.172", features = ["derive"] }
25+
# Require a version of serde without intransparent unreproducible binary blobs.
26+
serde = { version = "1.0.185", features = ["derive"] }
2727

2828
[build-dependencies]
2929
rustc_tools_util = "0.3"

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function run_tests {
5252

5353
# Also run some many-seeds tests. 64 seeds means this takes around a minute per test.
5454
for FILE in tests/many-seeds/*.rs; do
55-
MIRI_SEEDS=64 CARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS -q" ./miri many-seeds ./miri run "$FILE"
55+
MIRI_SEEDS=64 ./miri many-seeds ./miri run "$FILE"
5656
done
5757

5858
# Check that the benchmarks build and run, but without actually benchmarking.

miri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33
# Instead of doing just `cargo run --manifest-path .. $@`, we invoke miri-script binary directly. Invoking `cargo run` goes through
44
# rustup (that sets it's own environmental variables), which is undesirable.
5-
cargo build -q --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml
5+
cargo build $CARGO_EXTRA_FLAGS -q --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml
66
"$(dirname "$0")"/miri-script/target/debug/miri-script "$@"

miri-script/src/commands.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ impl Command {
319319
let Some((program_name, args)) = hyperfine.split_first() else {
320320
bail!("expected HYPERFINE environment variable to be non-empty");
321321
};
322+
// Extra flags to pass to cargo.
323+
let cargo_extra_flags = std::env::var("CARGO_EXTRA_FLAGS").unwrap_or_default();
322324
// Make sure we have an up-to-date Miri installed and selected the right toolchain.
323325
Self::install(vec![])?;
324326

@@ -341,7 +343,7 @@ impl Command {
341343
// That seems to make Windows CI happy.
342344
cmd!(
343345
sh,
344-
"{program_name} {args...} 'cargo miri run --manifest-path \"'{current_bench}'\"'"
346+
"{program_name} {args...} 'cargo miri run '{cargo_extra_flags}' --manifest-path \"'{current_bench}'\"'"
345347
)
346348
.run()?;
347349
}

test-cargo-miri/Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-cargo-miri/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ issue_rust_86261 = { path = "issue-rust-86261" }
2121
[dev-dependencies]
2222
byteorder_2 = { package = "byteorder", version = "0.5" } # to test dev-dependencies behave as expected, with renaming
2323
# Not actually used, but exercises some unique code path (`--extern` .so file).
24-
# Pin a version without intransparent unreproducible binary blobs.
25-
serde_derive = "=1.0.152"
24+
serde_derive = "1.0.185"
2625

2726
[build-dependencies]
2827
autocfg = "1"

test-cargo-miri/run-test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
CBOLD = '\33[1m'
1616
CEND = '\33[0m'
1717

18+
CARGO_EXTRA_FLAGS = os.environ.get("CARGO_EXTRA_FLAGS", "").split()
19+
1820
def fail(msg):
1921
print("\nTEST FAIL: {}".format(msg))
2022
sys.exit(1)
2123

2224
def cargo_miri(cmd, quiet = True):
23-
args = ["cargo", "miri", cmd]
25+
args = ["cargo", "miri", cmd] + CARGO_EXTRA_FLAGS
2426
if quiet:
2527
args += ["-q"]
2628
if 'MIRI_TEST_TARGET' in os.environ:

0 commit comments

Comments
 (0)