Skip to content

Commit d8d6938

Browse files
committed
hack rand down for rustc 1.8
1 parent 9c08dd6 commit d8d6938

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ matrix:
77
include:
88
- rust: 1.8.0
99
before_script:
10-
# libc 0.2.34 started using #[deprecated]
10+
# rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
11+
# manually hacking the lockfile due to the limitations of cargo#2773
1112
- cargo generate-lockfile
12-
- cargo update --package libc --precise 0.2.33
13+
- sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
14+
- sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
1315
sudo: false
1416
script:
1517
- cargo build --verbose

ci/rustup.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export TRAVIS_RUST_VERSION
88
for TRAVIS_RUST_VERSION in 1.8.0 stable beta nightly; do
99
run="rustup run $TRAVIS_RUST_VERSION"
1010
if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then
11-
# libc 0.2.34 started using #[deprecated]
11+
# rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
12+
# manually hacking the lockfile due to the limitations of cargo#2773
1213
$run cargo generate-lockfile
13-
$run cargo update --package libc --precise 0.2.33 || :
14+
$run sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
15+
$run sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
1416
fi
1517
$run cargo build --verbose
1618
$run $PWD/ci/test_full.sh

0 commit comments

Comments
 (0)