D8320: rust: update all dependencies
Closed by commit rHGd31d1c0685be: rust: update all dependencies (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8320?vs=20870=20881 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8320/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8320 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/discovery.rs rust/hg-core/tests/test_missing_ancestors.rs rust/hg-cpython/Cargo.toml CHANGE DETAILS diff --git a/rust/hg-cpython/Cargo.toml b/rust/hg-cpython/Cargo.toml --- a/rust/hg-cpython/Cargo.toml +++ b/rust/hg-cpython/Cargo.toml @@ -28,5 +28,5 @@ simple_logger = "1.6.0" [dependencies.cpython] -version = "0.4" +version = "0.4.1" default-features = false diff --git a/rust/hg-core/tests/test_missing_ancestors.rs b/rust/hg-core/tests/test_missing_ancestors.rs --- a/rust/hg-core/tests/test_missing_ancestors.rs +++ b/rust/hg-core/tests/test_missing_ancestors.rs @@ -1,8 +1,9 @@ use hg::testing::VecGraph; use hg::Revision; use hg::*; -use rand::distributions::{Distribution, LogNormal, Uniform}; +use rand::distributions::{Distribution, Uniform}; use rand::{thread_rng, Rng, RngCore, SeedableRng}; +use rand_distr::LogNormal; use std::cmp::min; use std::collections::HashSet; use std::env; @@ -191,7 +192,7 @@ let mu = mu_opt.unwrap_or(1.1); let sigma = sigma_opt.unwrap_or(0.8); -let log_normal = LogNormal::new(mu, sigma); +let log_normal = LogNormal::new(mu, sigma).unwrap(); let nb = min(maxrev as usize, log_normal.sample(rng).floor() as usize); let dist = Uniform::from(NULL_REVISION..maxrev); diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs --- a/rust/hg-core/src/discovery.rs +++ b/rust/hg-core/src/discovery.rs @@ -597,12 +597,12 @@ #[test] fn test_limit_sample_less_than_half() { -assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![4, 2]); +assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![2, 5]); } #[test] fn test_limit_sample_more_than_half() { -assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![3, 2]); +assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![1, 2]); } #[test] diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml --- a/rust/hg-core/Cargo.toml +++ b/rust/hg-core/Cargo.toml @@ -10,15 +10,16 @@ name = "hg" [dependencies] -byteorder = "1.3.1" -hex = "0.4.0" -lazy_static = "1.3.0" +byteorder = "1.3.4" +hex = "0.4.2" +lazy_static = "1.4.0" libc = { version = "0.2.66", optional = true } -memchr = "2.2.0" -rand = "0.6.5" -rand_pcg = "0.1.1" +memchr = "2.3.3" +rand = "0.7.3" +rand_pcg = "0.2.1" +rand_distr = "0.2.2" rayon = "1.3.0" -regex = "1.1.0" +regex = "1.3.6" twox-hash = "1.5.0" same-file = "1.0.6" crossbeam = "0.7.3" diff --git a/rust/Cargo.lock b/rust/Cargo.lock --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -28,11 +28,6 @@ [[package]] name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] -name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -81,14 +76,6 @@ ] [[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index; -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "colored" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -194,11 +181,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index; [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -237,10 +219,11 @@ "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "micro-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.6
D8320: rust: update all dependencies
Alphare edited the summary of this revision. Alphare updated this revision to Diff 20870. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8320?vs=20863=20870 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8320/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8320 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/discovery.rs rust/hg-core/tests/test_missing_ancestors.rs rust/hg-cpython/Cargo.toml CHANGE DETAILS diff --git a/rust/hg-cpython/Cargo.toml b/rust/hg-cpython/Cargo.toml --- a/rust/hg-cpython/Cargo.toml +++ b/rust/hg-cpython/Cargo.toml @@ -28,5 +28,5 @@ simple_logger = "1.6.0" [dependencies.cpython] -version = "0.4" +version = "0.4.1" default-features = false diff --git a/rust/hg-core/tests/test_missing_ancestors.rs b/rust/hg-core/tests/test_missing_ancestors.rs --- a/rust/hg-core/tests/test_missing_ancestors.rs +++ b/rust/hg-core/tests/test_missing_ancestors.rs @@ -1,8 +1,9 @@ use hg::testing::VecGraph; use hg::Revision; use hg::*; -use rand::distributions::{Distribution, LogNormal, Uniform}; +use rand::distributions::{Distribution, Uniform}; use rand::{thread_rng, Rng, RngCore, SeedableRng}; +use rand_distr::LogNormal; use std::cmp::min; use std::collections::HashSet; use std::env; @@ -191,7 +192,7 @@ let mu = mu_opt.unwrap_or(1.1); let sigma = sigma_opt.unwrap_or(0.8); -let log_normal = LogNormal::new(mu, sigma); +let log_normal = LogNormal::new(mu, sigma).unwrap(); let nb = min(maxrev as usize, log_normal.sample(rng).floor() as usize); let dist = Uniform::from(NULL_REVISION..maxrev); diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs --- a/rust/hg-core/src/discovery.rs +++ b/rust/hg-core/src/discovery.rs @@ -597,12 +597,12 @@ #[test] fn test_limit_sample_less_than_half() { -assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![4, 2]); +assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![2, 5]); } #[test] fn test_limit_sample_more_than_half() { -assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![3, 2]); +assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![1, 2]); } #[test] diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml --- a/rust/hg-core/Cargo.toml +++ b/rust/hg-core/Cargo.toml @@ -10,15 +10,16 @@ name = "hg" [dependencies] -byteorder = "1.3.1" -hex = "0.4.0" -lazy_static = "1.3.0" +byteorder = "1.3.4" +hex = "0.4.2" +lazy_static = "1.4.0" libc = { version = "0.2.66", optional = true } -memchr = "2.2.0" -rand = "0.6.5" -rand_pcg = "0.1.1" +memchr = "2.3.3" +rand = "0.7.3" +rand_pcg = "0.2.1" +rand_distr = "0.2.2" rayon = "1.3.0" -regex = "1.1.0" +regex = "1.3.6" twox-hash = "1.5.0" same-file = "1.0.6" crossbeam = "0.7.3" diff --git a/rust/Cargo.lock b/rust/Cargo.lock --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -28,11 +28,6 @@ [[package]] name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] -name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -81,14 +76,6 @@ ] [[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index; -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "colored" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -194,11 +181,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index; [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -237,10 +219,11 @@ "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "micro-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.5.0
D8320: rust: update all dependencies
Alphare updated this revision to Diff 20863. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8320?vs=20862=20863 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8320/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8320 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/discovery.rs rust/hg-core/tests/test_missing_ancestors.rs rust/hg-cpython/Cargo.toml CHANGE DETAILS diff --git a/rust/hg-cpython/Cargo.toml b/rust/hg-cpython/Cargo.toml --- a/rust/hg-cpython/Cargo.toml +++ b/rust/hg-cpython/Cargo.toml @@ -28,5 +28,5 @@ simple_logger = "1.6.0" [dependencies.cpython] -version = "0.4" +version = "0.4.1" default-features = false diff --git a/rust/hg-core/tests/test_missing_ancestors.rs b/rust/hg-core/tests/test_missing_ancestors.rs --- a/rust/hg-core/tests/test_missing_ancestors.rs +++ b/rust/hg-core/tests/test_missing_ancestors.rs @@ -1,8 +1,9 @@ use hg::testing::VecGraph; use hg::Revision; use hg::*; -use rand::distributions::{Distribution, LogNormal, Uniform}; +use rand::distributions::{Distribution, Uniform}; use rand::{thread_rng, Rng, RngCore, SeedableRng}; +use rand_distr::LogNormal; use std::cmp::min; use std::collections::HashSet; use std::env; @@ -191,7 +192,7 @@ let mu = mu_opt.unwrap_or(1.1); let sigma = sigma_opt.unwrap_or(0.8); -let log_normal = LogNormal::new(mu, sigma); +let log_normal = LogNormal::new(mu, sigma).unwrap(); let nb = min(maxrev as usize, log_normal.sample(rng).floor() as usize); let dist = Uniform::from(NULL_REVISION..maxrev); diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs --- a/rust/hg-core/src/discovery.rs +++ b/rust/hg-core/src/discovery.rs @@ -597,12 +597,12 @@ #[test] fn test_limit_sample_less_than_half() { -assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![4, 2]); +assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![2, 5]); } #[test] fn test_limit_sample_more_than_half() { -assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![3, 2]); +assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![1, 2]); } #[test] diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml --- a/rust/hg-core/Cargo.toml +++ b/rust/hg-core/Cargo.toml @@ -10,15 +10,16 @@ name = "hg" [dependencies] -byteorder = "1.3.1" -hex = "0.4.0" -lazy_static = "1.3.0" +byteorder = "1.3.4" +hex = "0.4.2" +lazy_static = "1.4.0" libc = { version = "0.2.66", optional = true } -memchr = "2.2.0" -rand = "0.6.5" -rand_pcg = "0.1.1" +memchr = "2.3.3" +rand = "0.7.3" +rand_pcg = "0.2.1" +rand_distr = "0.2.2" rayon = "1.3.0" -regex = "1.1.0" +regex = "1.3.5" twox-hash = "1.5.0" same-file = "1.0.6" crossbeam = "0.7.3" diff --git a/rust/Cargo.lock b/rust/Cargo.lock --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -28,11 +28,6 @@ [[package]] name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] -name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -81,14 +76,6 @@ ] [[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index; -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "colored" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -194,11 +181,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index; [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -237,10 +219,11 @@ "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "micro-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -386,7 +369,7
D8320: rust: update all dependencies
Alphare created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We do this periodically to say up to date. No major versions were crossed this time per se, but the `rand` is still in v0, and their 0.7x series broke three things: - Some distribution-related elements were moved to a separate crate, flashing a deprecation warning - The `LogNormal::new` associated function now returns a `Result` - Certain RNGs were updated to sample a `u32` instead of `usize` when their upper-bound is less than `u32::MAX` for better portability, which changed the output for 2 tests. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D8320 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/discovery.rs rust/hg-core/tests/test_missing_ancestors.rs rust/hg-cpython/Cargo.toml CHANGE DETAILS diff --git a/rust/hg-cpython/Cargo.toml b/rust/hg-cpython/Cargo.toml --- a/rust/hg-cpython/Cargo.toml +++ b/rust/hg-cpython/Cargo.toml @@ -28,5 +28,5 @@ simple_logger = "1.6.0" [dependencies.cpython] -version = "0.4" +version = "0.4.1" default-features = false diff --git a/rust/hg-core/tests/test_missing_ancestors.rs b/rust/hg-core/tests/test_missing_ancestors.rs --- a/rust/hg-core/tests/test_missing_ancestors.rs +++ b/rust/hg-core/tests/test_missing_ancestors.rs @@ -1,7 +1,8 @@ use hg::testing::VecGraph; use hg::Revision; use hg::*; -use rand::distributions::{Distribution, LogNormal, Uniform}; +use rand::distributions::{Distribution, Uniform}; +use rand_distr::LogNormal; use rand::{thread_rng, Rng, RngCore, SeedableRng}; use std::cmp::min; use std::collections::HashSet; @@ -191,7 +192,7 @@ let mu = mu_opt.unwrap_or(1.1); let sigma = sigma_opt.unwrap_or(0.8); -let log_normal = LogNormal::new(mu, sigma); +let log_normal = LogNormal::new(mu, sigma).unwrap(); let nb = min(maxrev as usize, log_normal.sample(rng).floor() as usize); let dist = Uniform::from(NULL_REVISION..maxrev); diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs --- a/rust/hg-core/src/discovery.rs +++ b/rust/hg-core/src/discovery.rs @@ -597,12 +597,12 @@ #[test] fn test_limit_sample_less_than_half() { -assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![4, 2]); +assert_eq!(full_disco().limit_sample((1..6).collect(), 2), vec![2, 5]); } #[test] fn test_limit_sample_more_than_half() { -assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![3, 2]); +assert_eq!(full_disco().limit_sample((1..4).collect(), 2), vec![1, 2]); } #[test] diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml --- a/rust/hg-core/Cargo.toml +++ b/rust/hg-core/Cargo.toml @@ -10,15 +10,16 @@ name = "hg" [dependencies] -byteorder = "1.3.1" -hex = "0.4.0" -lazy_static = "1.3.0" +byteorder = "1.3.4" +hex = "0.4.2" +lazy_static = "1.4.0" libc = { version = "0.2.66", optional = true } -memchr = "2.2.0" -rand = "0.6.5" -rand_pcg = "0.1.1" +memchr = "2.3.3" +rand = "0.7.3" +rand_pcg = "0.2.1" +rand_distr = "0.2.2" rayon = "1.3.0" -regex = "1.1.0" +regex = "1.3.5" twox-hash = "1.5.0" same-file = "1.0.6" crossbeam = "0.7.3" diff --git a/rust/Cargo.lock b/rust/Cargo.lock --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -28,11 +28,6 @@ [[package]] name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] -name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -81,14 +76,6 @@ ] [[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index; -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "colored" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -194,11 +181,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index; [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index; - -[[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index; @@ -237,10 +219,11 @@ "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "micro-timer 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0