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

Remove rand feature; bump elliptic-curve and ecdsa #162

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Sep 4, 2020

Updates to use the group crate. See: RustCrypto/traits#287.

This crate has a hard rand_core dependency so this commit gets rid of the rand features across the board and makes them mandatory.

(Even if we don't end up shipping the group crate this release, that's probably for the best to keep the number of features down)

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2020

Codecov Report

Merging #162 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #162   +/-   ##
=======================================
  Coverage   60.25%   60.25%           
=======================================
  Files          25       25           
  Lines        3555     3555           
=======================================
  Hits         2142     2142           
  Misses       1413     1413           
Impacted Files Coverage Δ
k256/src/arithmetic.rs 100.00% <ø> (ø)
k256/src/arithmetic/scalar.rs 90.45% <ø> (ø)
k256/src/arithmetic/scalar/scalar_4x64.rs 0.00% <ø> (ø)
k256/src/arithmetic/scalar/scalar_8x32.rs 93.31% <ø> (ø)
k256/src/ecdsa/recoverable.rs 66.21% <ø> (ø)
k256/src/ecdsa/sign.rs 29.82% <ø> (ø)
p256/src/arithmetic.rs 100.00% <ø> (ø)
p256/src/arithmetic/field.rs 77.20% <ø> (ø)
p256/src/arithmetic/scalar.rs 90.75% <ø> (ø)
p256/src/arithmetic/scalar/blinding.rs 91.66% <ø> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 089aab4...213e9b8. Read the comment docs.

@tarcieri tarcieri force-pushed the update-dependencies-remove-rand branch 2 times, most recently from 40237ae to 9f4fdcc Compare September 4, 2020 16:16
Updates to use the `group` crate. See: RustCrypto/traits#287.

This crate has a hard `rand_core` dependency so this commit gets rid of
the `rand` features across the board and makes them mandatory.

(Even if we don't end up shipping the `group` crate this release, that's
probably for the best to keep the number of features down)

This commit additionally splits out `no_std` build testing into
`tests/*_no_std` Cargo projects. This is a workaround until the Cargo
resolver is fixed upstream:

rust-lang/cargo#7915
rust-lang/cargo#7916
@tarcieri tarcieri force-pushed the update-dependencies-remove-rand branch from 9f4fdcc to 213e9b8 Compare September 4, 2020 16:21
@tarcieri tarcieri merged commit e83ccd9 into master Sep 4, 2020
@tarcieri tarcieri deleted the update-dependencies-remove-rand branch September 4, 2020 16:25
Comment on lines +1 to +16
# no_std tests

This directory and associated CI configs in `.github` is a workaround for
issues with the `cargo` resolver activating features from dev-dependencies
which cause `std` to get linked in a release target.

It contains small test crates in their own isolated workspace which ensure that
these features are not activated when linking and therefore that the crates
will link in `no_std` environments when consumed as a dependency of another
`no_std`-compatible crate.

Here are upstream issues tracking the problem:

- [#7914: Tracking issue for `-Z features=itarget`](https://github.com/rust-lang/cargo/issues/7914)
- [#7915: Tracking issue for `-Z features=host_dep`](https://github.com/rust-lang/cargo/issues/7915)
- [#7916: Tracking issue for `-Z features=dev_dep`](https://github.com/rust-lang/cargo/issues/7916])
Copy link
Member Author

@tarcieri tarcieri Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A different solution it's probably worth exploring here is moving proptests and criterion benchmarks into their own crates so the [dev-dependencies] of the root workspace remain clean and aren't polluted by spurious feature activations.

cc @newpavlov

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about the proptest, but I think that the criterion benchmarks should definitely be moved into a separate crate with its own workspace as was done in other repositories.

This was referenced Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants