rust-lang-nursery / lazy-static.rs

A small macro for defining lazy evaluated static variables in Rust.
Apache License 2.0
1.9k stars 111 forks source link

Use `slice::iter` instead of `into_iter` to avoid future breakage #162

Closed LukasKalbertodt closed 4 years ago

LukasKalbertodt commented 4 years ago

lazy_static 1.1.0 is already quite old, but for some reason some creates have a ~1.1.0 version requirement. As a consequence, quite a few crates still have lazy_static 1.1.0 in their dependency tree. That particular version regresses with https://github.com/rust-lang/rust/pull/65819, as array.into_iter() is used in the build script. This report says that lazy_static 1.1.0 causes roughly 800 other crates to regress.

Ideally all crates would upgrade to a newer lazy_static, but that might now happen. Therefore my idea: release 1.1.1 with this tiny change. It does not require a newer Rust compiler version and fixes a bunch of crates. What do you think?

(PS: the PR targeting master is obviously wrong. I just wanted to create this PR for some discussion about this. If everyone agrees we should release 1.1.1, I can manually "merge" this into the main repo)

KodrAus commented 4 years ago

This seems reasonable to me, it's probably inevitable that we'd need to track small patches to minor releases.

I've gone ahead and set up a release/1.1 branch from https://github.com/rust-lang-nursery/lazy-static.rs/commit/19b57ec8d17a29e1a35a36acb6b2bc7c2d5dac56 that we can target this to.