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

1.3.x contains a breaking change for < 1.46.0 due to reliance on const if #255

Closed
hlb8122 opened this issue Aug 12, 2021 · 5 comments
Closed

Comments

@hlb8122
Copy link

hlb8122 commented Aug 12, 2021

https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html

https://github.com/bitflags/bitflags/blob/main/src/lib.rs#L550-L556

@taiki-e
Copy link
Contributor

taiki-e commented Aug 12, 2021

FYI: MSRV is documented in readme: https://github.com/bitflags/bitflags#rust-version-support

The minimum supported Rust version is 1.46 due to use of associated constants and const functions.

@hlb8122
Copy link
Author

hlb8122 commented Aug 12, 2021

Yep, I've noticed the change now.

afd25d3#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

I understand there is no consensus on whether changing MSRV is a breaking change theoretically, however in practice this has broken our builds. Forgive me if this comes across as passive aggressive - feel free to close the issue.

@KodrAus
Copy link
Member

KodrAus commented Aug 12, 2021

Hi @hlb8122 👋

I probably could have also called this out in release notes better. I’ll go update them to make sure it’s clear.

Our policy for bitflags is to bump the MSRV in minor versions. Unfortunately because we don’t have direct tools for managing MSRVs we end up needing to bump them reactively when either another dependency does or something comes into reach that’s a major improvement for the library. In this case we could have worked around it to maintain compatibility with older compilers, but I’ve erred on the side of keeping the implementation as straightforward as possible, since big macro APIs are already tricky to maintain.

@hlb8122
Copy link
Author

hlb8122 commented Aug 13, 2021

I understand.

rust-lang/rust#65262 🤞

@KodrAus
Copy link
Member

KodrAus commented Aug 16, 2021

In #259 I called out in the changelog that we've bumped our MSRV a bit more prominently. I can't imagine we'll need to do this again for a while, but I'll try remember to call it out the next time we do too.

Thanks for calling this out everyone!

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

No branches or pull requests

3 participants