Skip to content

Commit ed77cd8

Browse files
committed
Try another approach to hacking rand in CI
Using `sed` to hack rand-0.3.20 in `Cargo.lock` worked for a while, but now it's giving us an invalid lockfile, because some of the test/demo dependencies need rand-0.4 themselves. Instead, we now just tweak `rayon-core/Cargo.toml` long enough to generate a complete lock file, which is enough to get a working CI build on Rust 1.13 again.
1 parent 68eb3bd commit ed77cd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ matrix:
1717
#if: everything!
1818
before_script:
1919
# rand 0.4.2 requires rust 1.15, and rand-0.3.22 requires rand-0.4 :/
20-
# manually hacking the lockfile due to the limitations of cargo#2773
20+
# manually lowering the dependency in rayon-core:
21+
- sed -i -e 's/^rand = .*$/rand = "=0.3.20"/' rayon-core/Cargo.toml
2122
- cargo generate-lockfile
22-
- sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
23-
- sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
23+
- git checkout rayon-core/Cargo.toml
2424

2525
- rust: stable
2626
os: linux

0 commit comments

Comments
 (0)