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 to bitflags 2.2.1. #2027

Merged
merged 4 commits into from
Jun 29, 2023
Merged

Update to bitflags 2.2.1. #2027

merged 4 commits into from
Jun 29, 2023

Conversation

qwandor
Copy link
Contributor

@qwandor qwandor commented Apr 26, 2023

This is a new major version and requires some code changes.

@asomers
Copy link
Member

asomers commented Apr 26, 2023

What's the motivation?

@qwandor
Copy link
Contributor Author

qwandor commented Apr 27, 2023

Hi, thanks for the reply.

For context, I work on Android. We vendor in all the Rust crates that we use (you can see them at https://cs.android.com/android/platform/superproject/+/master:external/rust/crates/ if you're curious), and nix is among them. As much as possible, we try to avoid having multiple versions of a crate in the tree, both because of the maintenance overhead and because of the impact on overall binary size.

bitflags has caused a problem, because we now have some crates updated upstream to version 2, while some are still using version 1. We can maintain downstream patches to work around this, but this is more maintenance burden so I'd like if possible to get every crate we care about using bitflags 2 upstream.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented May 20, 2023

Merge conflict.

This is a new major version and requires some code changes.
@qwandor
Copy link
Contributor Author

qwandor commented May 22, 2023

Rebased and fixed some build warnings, please try again.

@qwandor
Copy link
Contributor Author

qwandor commented May 25, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented May 25, 2023

🔒 Permission denied

Existing reviewers: click here to make qwandor a reviewer

@asomers
Copy link
Member

asomers commented Jun 29, 2023

bors r+

@bors bors bot merged commit 1376e15 into nix-rust:master Jun 29, 2023
@qwandor qwandor deleted the bitflags branch June 30, 2023 09:03
asomers pushed a commit to asomers/nix that referenced this pull request Aug 27, 2023
2027: Update to bitflags 2.2.1. r=asomers a=qwandor

This is a new major version and requires some code changes.

2057: Haiku: `speed_t` is defined as `u8` for 32 and 64 bit systems r=asomers a=nielx

This fixes the build on 32 bit Haiku systems.

Co-authored-by: Andrew Walbran <qwandor@google.com>
Co-authored-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
asomers pushed a commit to asomers/nix that referenced this pull request Aug 27, 2023
2027: Update to bitflags 2.2.1. r=asomers a=qwandor

This is a new major version and requires some code changes.

2057: Haiku: `speed_t` is defined as `u8` for 32 and 64 bit systems r=asomers a=nielx

This fixes the build on 32 bit Haiku systems.

Co-authored-by: Andrew Walbran <qwandor@google.com>
Co-authored-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
asomers pushed a commit to asomers/nix that referenced this pull request Aug 27, 2023
2027: Update to bitflags 2.2.1. r=asomers a=qwandor

This is a new major version and requires some code changes.

2057: Haiku: `speed_t` is defined as `u8` for 32 and 64 bit systems r=asomers a=nielx

This fixes the build on 32 bit Haiku systems.

Co-authored-by: Andrew Walbran <qwandor@google.com>
Co-authored-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
asomers added a commit to asomers/nix that referenced this pull request Aug 28, 2023
This reverts commit 0c3afc2.

This rolls back the version of bitflags used to 1.1.  Upgrading bitflags
to 2.0 inadvertently caused breaking changes in the r0.26 branch, by
virtue of the methods that the bitflags! macro adds.

Also, mask the bad_bit_mask lint, triggered by bitflags's generated
code.  That lint was the motivation for upgrading bitflags in the first
place.  The bitflags maintainers have decided not to fix those warnings
in the 1.x release series.
bitflags/bitflags#373

Fixes nix-rust#2112
asomers added a commit that referenced this pull request Aug 28, 2023
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.

2 participants