lasso icon indicating copy to clipboard operation
lasso copied to clipboard

Compilation failure on nightly rust

Open kurtlawrence opened this issue 1 year ago • 6 comments

I tried this code

Nightly: nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.78.0-nightly (4a0cc881d 2024-03-11)

cargo +nightly check -F serialize

Results in compilation error:

error[E0275]: overflow evaluating the requirement `&_ well-formed`
   --> src/util.rs:445:13
    |
445 |             $slice[$idx]
    |             ^^^^^^^^^^^^
    |
   ::: src/reader.rs:453:49
    |
453 |                 let key_string: &str = unsafe { index_unchecked!(strings, key.into_usize()) };
    |                                                 ------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `index_unchecked` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `&_ well-formed`
    --> src/util.rs:445:13
     |
445  |             $slice[$idx]
     |             ^^^^^^^^^^^^
     |
    ::: src/rodeo.rs:1132:49
     |
1132 |                 let key_string: &str = unsafe { index_unchecked!(strings, key.into_usize()) };
     |                                                 ------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `index_unchecked` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0275`.
warning: `lasso` (lib) generated 7 warnings
error: could not compile `lasso` (lib) due to 2 previous errors; 7 warnings emitted

Possibly related to #45, but a fix will be required for debug.

kurtlawrence avatar Mar 13 '24 03:03 kurtlawrence

I'd like to +1 this. My CI runs over in cstree started to fail due to this issue 2 months ago because anything that runs on nightly no longer compiles.

Happy to help with a fix, though I can't quite make out what's the issue with / required beyond #45.

domenicquirl avatar May 01 '24 06:05 domenicquirl

I believe this has now hit stable

fmckeogh avatar May 02 '24 13:05 fmckeogh

I confirm, the problem hit Rust stable.

ThePseudo avatar May 10 '24 06:05 ThePseudo

If nobody else wants to, I can fork and publish a maintained version with some of the outstanding PRs merged?

fmckeogh avatar May 10 '24 12:05 fmckeogh

I published a fork at lasso2 with a fix for this. I will try to keep it maintained so contributions are welcome.

silvanshade avatar May 22 '24 03:05 silvanshade

Thanks for merging #45 @Kixiron! Apologies for explicitly bothering you again, but would you be able to cut a new release now that everything compiles again? I can build with master, but can't publish anything while the dependency points to a GitHub branch 🙏🏻

domenicquirl avatar Aug 15 '24 16:08 domenicquirl