uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.73k stars 1.27k forks source link

MSRV >= 1.77 when building with --all-features #6728

Open BenWiederhake opened 1 month ago

BenWiederhake commented 1 month ago

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]

The cause seems to be:

Suggestion: Downgrade fts-sys and build all features during MSRV CI. What do you think?

BenWiederhake commented 1 month ago

Related: #6339

Ping @cakebaker

cakebaker commented 1 month ago

@BenWiederhake both points make sense to me.