Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand_core: add compatibility shim around 0.5 #819

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ matrix:
# TODO: add simd_support feature:
- cargo test --features=serde1,log
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
- cargo test --manifest-path rand_core/Cargo.toml --tests
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
# TODO: cannot test rand_pcg due to explicit dependency on i128
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
Expand All @@ -88,8 +88,8 @@ matrix:
# TODO: add simd_support feature:
- cargo test --features=serde1,log
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
- cargo test --manifest-path rand_core/Cargo.toml --tests
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
Expand All @@ -116,8 +116,8 @@ matrix:
- cargo test --all-features
- cargo test --benches --features=nightly
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
- cargo test --manifest-path rand_core/Cargo.toml --tests
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc --tests
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
Expand Down Expand Up @@ -209,8 +209,8 @@ script:
# TODO: add simd_support feature:
- cargo test --features=serde1,log
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
- cargo test --manifest-path rand_core/Cargo.toml --tests
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,3 @@ autocfg = "0.1"

[package.metadata.docs.rs]
all-features = true

[patch.crates-io]
rand_core = { path = "rand_core", version = "0.4" }
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ test_script:
- cargo test --features=serde1,log
- cargo test --benches --features=nightly
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
- cargo test --manifest-path rand_core/Cargo.toml --tests
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc --tests
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
Expand Down
3 changes: 3 additions & 0 deletions rand_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.2] - 2019-06-??
- Compatibility shim around version 0.5

## [0.4.0] - 2019-01-24
- Disable the `std` feature by default (#702)

Expand Down
11 changes: 5 additions & 6 deletions rand_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_core"
version = "0.4.0"
version = "0.4.2"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand All @@ -18,10 +18,9 @@ travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }

[features]
std = ["alloc"] # use std library; should be default but for above bug
alloc = [] # enables Vec and Box support without std
serde1 = ["serde", "serde_derive"] # enables serde for BlockRng wrapper
std = ["rand_core/std"] # use std library; should be default but for above bug
alloc = ["rand_core/alloc"] # enables Vec and Box support without std
serde1 = ["rand_core/serde1"] # enables serde for BlockRng wrapper

[dependencies]
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }
rand_core = { version = "0.5" }
Loading