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

Update dependencies (new semver) and fix some compile warnings #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VorpalBlade
Copy link

This helps avoid duplicate dependencies in my program (two versions of bitflags).

I also fixed cargo build warnings. I did not look into the existing cargo clippy warnings.

I'm not sure if this is semver compatible or requires a new major release. I tried to use cargo-semver-checks to check this automatically but it doesn't work on alpm (see obi1kenobi/cargo-semver-checks#654). If it isn't semver compatible it is likely that some extra derives may be needed for the bitflags.

@VorpalBlade
Copy link
Author

After figuring out how to use cargo-semver-checks I fixed a number of semver issues. However it seems that there is one unavoidable issue:

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.28.0/src/lints/inherent_method_missing.ron

Failed in:
  Capabilities::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/alpm.rs:112
  SigLevel::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/types.rs:43
  TransFlag::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/trans.rs:10
  PackageValidation::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/types.rs:109
  LogLevel::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/types.rs:69
  Usage::from_bits_unchecked, previously in file /home/arvid/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/src/types.rs:58

This is because the API of bitflags changed. We could define custom a impl that forwards to bitflags I suppose. It is your call what you want to do however.

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.

1 participant