Trying to compile with 1.70 (= our MSRV, according to the README) and all features fails, despite the MSRV CI succeeding:
$ cargo +1.70.0 build --all-features
warning: /home/user/workspace/coreutils-rs/src/uu/seq/Cargo.toml: unused manifest key: lints
warning: /home/user/workspace/coreutils-rs/Cargo.toml: unused manifest key: lints
Compiling selinux-sys v0.6.12
Compiling fts-sys v0.2.11
error[E0433]: failed to resolve: could not find `offset_of` in `mem`
--> /home/user/workspace/coreutils-rs/target/debug/build/fts-sys-35eedc7d1c3cabc2/out/fts-sys.rs:63:57
|
63 | ["Offset of field: _ftsent::fts_cycle"][::std::mem::offset_of!(_ftsent, fts_cycle) - 0usize];
| ^^^^^^^^^ could not find `offset_of` in `mem`
<SNIP: many more such errors>
For more information about this error, try `rustc --explain E0433`.
error: could not compile `fts-sys` (lib) due to 20 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `selinux-sys` (lib) due to 43 previous errors
[$? = 101]
Trying to compile with 1.70 (= our MSRV, according to the README) and all features fails, despite the MSRV CI succeeding:
The cause seems to be:
chcon
usesfts-sys=0.2.9
, which uses https://doc.rust-lang.org/std/mem/macro.offset_of.html which was introduced in Rust 1.77.0chcon
is not built during CI, and no other feature/util uses this crate, which is why it slipped through the cracks.Suggestion: Downgrade fts-sys and build all features during MSRV CI. What do you think?