rust-analyzer / smol_str

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.46 requirement is problematic

kornelski opened this issue · comments

Due to rust-lang/rust#75992 I'm unable to update to Rust 1.46-1.48, and currently smol_str is the only crate in my dependency tree that breaks on Rust 1.45.

Could you make the new const fn feature conditional, or yank the latest release?

Heh, apparently SmolStr is seeing more usage than I‘d expect. It isn’t really intended to be a dependable 3rd party crate, and explicitly requires the latest stable Rust. It is not production ready enough to justify yanking,

I am not sure if I will be willing to „production-ready“-ify this crate: to do this, I’d need to remove the whitespace hack, but it is rather
important for rust-analyzer. The API is also wrong, the crate should support mutation.

I am almost ready to say „just use https://docs.rs/smartstring/0.2.5/smartstring/ instead of smol_str“, but not quite. That crate is really advanced, and probably a bit too advanced (unsafe, a lot of knobs rather than a single type, MPL license).

Hm, but cant‘ you just pin SmolStr to earlier version? I am firmly in the „MSRV is not semver breaking“ camp and think that, if you need older compilers, it’s in you to curate the relevant Cargo.lock.

You can pin the version yourself in your Cargo.toml:

smol_str = "=0.1.16"

See the Cargo book for more infos.

I usually agree with the "latest stable Rust" philosophy and follow that in my crates, but this time Rust 1.45 is the last Rust version that has actually been stable :)