Closed striezel closed 1 year ago
Hmm, we started getting build failures and I think this might be related:
https://github.com/RustCrypto/password-hashes/actions/runs/4331611849/jobs/7563556788
Run cargo build --benches
error: failed to get `base64ct` as a dependency of package `argon2 v0.5.0-pre.0 (/home/runner/work/password-hashes/password-hashes/argon2)`
Caused by:
failed to load source for dependency `base64ct`
Caused by:
Unable to update registry `crates-io`
Caused by:
usage of sparse registries requires `-Z sparse-registry`
Error: Process completed with exit code [1](https://github.com/RustCrypto/password-hashes/actions/runs/4331611849/jobs/7563556788#step:6:1)01.
Going to try reverting and see if it helps
That seems to have fixed it. Not sure what the problem is?
Hmm, something seems to be setting the CARGO_REGISTRIES_CRATES_IO_PROTOCOL
environment variable:
https://github.com/RustCrypto/password-hashes/actions/runs/4331611849/jobs/7564040182
cargo build --benches
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
Maybe pinning to a newer nightly would resolve the issue?
Hmm, something seems to be setting the
CARGO_REGISTRIES_CRATES_IO_PROTOCOL
environment variable:https://github.com/RustCrypto/password-hashes/actions/runs/4331611849/jobs/7564040182
Yes. Looking at https://github.com/RustCrypto/password-hashes/actions/runs/4331611849/jobs/7563556788, this seems to be done by dtolnay/rust-toolchain
for certain versions of Rust:
Run : enable Cargo sparse registry
: enable Cargo sparse registry
# except on 1.66 and 1.67, on which it is unstable
if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then
touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true
if rustc +nightly-2022-12-25 --version --verbose | (! grep -q '^release: 1\.6[67]\.'); then
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
else
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV
fi
fi
I am not sure what's the reason for this behaviour.
Basically all of the
actions-rs/*
actions are unmaintained. See https://github.com/actions-rs/toolchain/issues/216 for more information. Due to their age they generate several warnings in CI runs.To get rid of those warnings the occurrences of
actions-rs/toolchain
are replaced bydtolnay/rust-toolchain
.Fixes #17.