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

build (warning-free) on modern Rust and deps #11

Merged
merged 4 commits into from
Nov 29, 2020

Conversation

scottlamb
Copy link
Contributor

No description provided.

profile.dev apparently was always the proper name in spite of some
confusion in cargo (see rust-lang/cargo#3519).

With Rust 1.48.0, cargo refuses to build with a [profile.debug],
saying you need the named-profiles nightly feature for that.
ring folks think it's quite important to stay current:
https://github.com/briansmith/ring#versioning--stability
so update, catching up on two years of ring API changes:

* ring's "std" feature is roughly equivalent to the previous "new-heap".
  It's required for ring::error::Unspecified to impl Error as expected
  by libpasta's error_chain! block.

* hkdf uses hkdf::Salt rather than directly operating on an
  hmac::SigningKey (9addfcebdf).

* hkdf::extract_and_expand is gone, in favor of methods (6ec8f34c57).

* SystemRandom must be constructed with new (f31f41d7a5).

* hmac, hkdf, and pbdf2 use distinct Algorithm types (169803f490).
  A few interesting points here:
  * I took out a branch from hash_from_id when updating this: SHA512_256
    doesn't map to a hkdf type. It was effectively dead; the caller
    (Pbkdf2::hash_id) would panic on encountering it.
  * I changed hash_to_id to not rely on ring's Debug that has no
    guarantee of stability.
  * I changed Pbkdf2's Debug output slightly, as a
    ring::pbkdf2::Algorithm is inconvenient to use as before (no
    Debug impl or access to underlying type). This should be the only
    visible behavior change.

There were no code changes necessary for the other dep updates.

I left the "time" crate alone.
This fixed a bunch of warnings, particularly adding "dyn" to trait
refs and a couple renamed lints.
Addresses this warning:
warning: lint `plugin_as_library` has been removed: `plugins have been deprecated and retired`

This one wasn't automatically fixed by "cargo +nightly fix"; maybe
it only does the renames and not the removals.
@samscott89
Copy link
Member

Thank you for doing this! I need to reacquaint myself with the code a little to review the changes.

@samscott89
Copy link
Member

This is awesome. Thank you. I have some other cleanup + CI follow ups from this, and then will publish the new version.

@samscott89 samscott89 merged commit e246a8f into libpasta:master Nov 29, 2020
@samscott89
Copy link
Member

Thanks again @scottlamb - version 0.1.1 published with these changes.

@scottlamb scottlamb deleted the pr-deps branch May 17, 2021 19:24
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.

None yet

2 participants