v0.5 requires rustc v1.21.0 minimum
kbknapp opened this issue · 4 comments
I see the readme says 1.17 is required, but it looks like unicode-normilization
has been updated to now require 1.21.0 minimum rustc
.
To reproduce:
$ git clone https://github.com/mgeisler/version-sync
[.. snip ..]
$ cd version-sync
$ rustup override add 1.20.0
$ cargo build
Compiling unicode-normalization v0.1.7
error[E0597]: borrowed value does not live long enough
--> /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-normalization-0.1.7/src/tables.rs:7533:30
|
7533 | '\u{1F248}' => Some(&['\u{3014}', '\u{6557}', '\u{3015}']),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- temporary value only lives until here
| |
| does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error[E0597]: borrowed value does not live long enough
--> /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-normalization-0.1.7/src/tables.rs:7534:30
|
7534 | '\u{1F250}' => Some(&['\u{5F97}']),
| ^^^^^^^^^^^^- temporary value only lives until here
| |
| does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error[E0597]: borrowed value does not live long enough
--> /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-normalization-0.1.7/src/tables.rs:7535:30
|
7535 | '\u{1F251}' => Some(&['\u{53EF}']),
| ^^^^^^^^^^^^- temporary value only lives until here
| |
| does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error: aborting due to 5738 previous errors
error: Could not compile `unicode-normalization`.
To learn more, run the command again with --verbose.
$ rustup override add 1.21.0
$ cargo build
[.. snip ..]
Compiling unicode-normalization v0.1.7
Finished dev [unoptimized + debuginfo] target(s) in 25.18 secs
Hey Kevin... and yet my build with Rust 1.17 is green: https://travis-ci.org/mgeisler/version-sync/jobs/373680042 :-D
You're of course right, it fails after a cargo update
. I guess I should see if I can disable the caching in Travis for that build...
Do you think
diff --git a/Cargo.toml b/Cargo.toml
index d6755b2..9a1d1af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,4 +24,5 @@ semver-parser = "0.7"
syn = { version = "0.11", features = ["full"] }
toml = "0.4"
url = "1.5.1"
+unicode-normalization = "=0.1.5"
itertools = "0.7"
is a sensible way to handle this? It looks quite hacky to me and I'm not sure how me pinning the dependency like this impacts crates that depend on version-sync
? (Here it might be okay since nobody should depend on version-sync
outside of an integration test.)
Thanks for catching this!
I asked the question on the users forum: https://users.rust-lang.org/t/impact-of-pinning-dependencies/17634 -- I'll see what the consensus is there.
I think the problem is for libraries there is no lock file, so it's essentially a cargo update
at every fresh Travis build, or for any user that doesn't previously have a lock file from a prior build.