Fix CI build failure by pinning generic-array to 0.14.7#1945
Conversation
08bd9ee to
c2df937
Compare
GitGab19
left a comment
There was a problem hiding this comment.
I don't fully get the issue here, generic_array MSRV is 1.65 according to their docs.
Why are we getting this issue?
|
This is part of the cargo tree for the protocol crates, showing the transitive dependency on generic-array: binary_codec_sv2 v3.0.0 (/home/shourya/stratum/protocols/v2/binary-sv2/codec)
└── buffer_sv2 v2.0.0 (/home/shourya/stratum/utils/buffer)
└── aes-gcm v0.10.3
├── aead v0.5.2
│ ├── crypto-common v0.1.6
│ │ ├── generic-array v0.14.7
│ │ │ └── typenum v1.19.0
│ │ │ [build-dependencies]
│ │ │ └── version_check v0.9.5
│ │ ├── rand_core v0.6.4
│ │ │ └── getrandom v0.2.16
│ │ │ ├── cfg-if v1.0.3
│ │ │ └── libc v0.2.177
│ │ └── typenum v1.19.0
│ └── generic-array v0.14.7 (*)
├── aes v0.8.4
│ ├── cfg-if v1.0.3
│ ├── cipher v0.4.4
│ │ ├── crypto-common v0.1.6 (*)
│ │ ├── inout v0.1.4
│ │ │ └── generic-array v0.14.7 (*)
│ │ └── zeroize v1.8.2
│ └── cpufeatures v0.2.17
├── cipher v0.4.4 (*)
├── ctr v0.9.2
│ └── cipher v0.4.4 (*)
├── ghash v0.5.1
│ ├── opaque-debug v0.3.1
│ └── polyval v0.6.2
│ ├── cfg-if v1.0.3
│ ├── cpufeatures v0.2.17
│ ├── opaque-debug v0.3.1
│ └── universal-hash v0.5.1
│ ├── crypto-common v0.1.6 (*)
│ └── subtle v2.6.1
└── subtle v2.6.1Lets take the example of the crypto-common https://github.com/RustCrypto/traits/blob/crypto-common-v0.1.6/crypto-common/Cargo.toml, It has the |
c2df937 to
ab05f93
Compare
|
don't we need to do anything for I mean, I see CI is green here, but the previous CI failure was on |
Ah yeah, you’re right! It wasn’t just Noise, it’s the protocol crates in general. Once we pin generic-array in any crate, Cargo locks that minor version along with patch and reuses it for all crates depending on the same version in our case "0.14.xx". That’s why we didn’t need to version it explicitly for Noise, but yeah, makes sense to add it. |
4c96385 to
060df0e
Compare
The CI build was failing due to generic-array v0.14.8 using the cargo::rustc-check-cfg directive, which is only supported on Rust 1.79 and above.
Pinned generic-array to version 0.14.7 to maintain MSRV.
Build failure can be observed here: https://github.com/stratum-mining/stratum/actions/runs/18458666773/job/52584886703?pr=1926