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

use new bitflags 2 #489

Closed
extrawurst opened this issue Aug 29, 2023 · 11 comments · Fixed by #490
Closed

use new bitflags 2 #489

extrawurst opened this issue Aug 29, 2023 · 11 comments · Fixed by #490

Comments

@extrawurst
Copy link
Contributor

The currently used version is 1.0.4 and dates back to 2018.

@extrawurst
Copy link
Contributor Author

thanks @trishume now that it is merged, it would be nice to release another version ❤️

@Enselic
Copy link
Collaborator

Enselic commented Oct 4, 2023

I can make a release, but I need to wait 3 more months in accordance with what I and trishume have agreed on previously.

@extrawurst
Copy link
Contributor Author

So you cannot release another version before that?

@Enselic
Copy link
Collaborator

Enselic commented Oct 4, 2023

Not unless trishume gives me permission to do so. He has previously said it is fine if I make releases if he is not around, but I need to wait 4 months first.

@extrawurst
Copy link
Contributor Author

That’s a long time :(

@trishume
Copy link
Owner

trishume commented Oct 4, 2023

Sorry I've been super busy for the past few months and for the next while. @Enselic you have my permission to waive any waiting times I previously specified from now until I say otherwise. Feel free to just act as a full maintainer.

See if you have all the permissions and workflow to do a release for this if you have the time, and let me know if anything doesn't work. If you hit any roadblocks I'll try and give you the permissions.

@Enselic
Copy link
Collaborator

Enselic commented Oct 4, 2023

Thanks @trishume ! I will make a release when I get time. Probably not many days from now.

It worked fine last time so most likely will work fine this time too.

@Enselic
Copy link
Collaborator

Enselic commented Oct 4, 2023

Hmm turns out updating bitflags changes the public API in semver incompatible ways, so to be safe we're going to have to release this as syntect 6.0. I'll do that later unless there are objections.

$ cargo public-api diff
Resolved `diff` to `diff 5.1.0`
 Documenting syntect v5.1.0
    Finished dev [unoptimized + debuginfo] target(s) in 0.38s
 Documenting syntect v5.2.0 (/home/martin/src/syntect)
    Finished dev [unoptimized + debuginfo] target(s) in 0.40s
Removed items from the public API
=================================
-pub unsafe const fn syntect::highlighting::FontStyle::from_bits_unchecked(bits: u8) -> Self
-impl core::cmp::Ord for syntect::highlighting::FontStyle
-pub fn syntect::highlighting::FontStyle::cmp(&self, other: &syntect::highlighting::FontStyle) -> core::cmp::Ordering
-impl core::cmp::PartialOrd<syntect::highlighting::FontStyle> for syntect::highlighting::FontStyle
-pub fn syntect::highlighting::FontStyle::partial_cmp(&self, other: &syntect::highlighting::FontStyle) -> core::option::Option<core::cmp::Ordering>

Changed items in the public API
===============================
-pub struct syntect::highlighting::FontStyle
+pub struct syntect::highlighting::FontStyle(_)

Added items to the public API
=============================
+impl syntect::highlighting::FontStyle
+impl syntect::highlighting::FontStyle
+pub const fn syntect::highlighting::FontStyle::from_bits_retain(bits: u8) -> Self
+pub fn syntect::highlighting::FontStyle::from_name(name: &str) -> core::option::Option<Self>
+pub const fn syntect::highlighting::FontStyle::iter(&self) -> bitflags::iter::Iter<syntect::highlighting::FontStyle>
+pub const fn syntect::highlighting::FontStyle::iter_names(&self) -> bitflags::iter::IterNames<syntect::highlighting::FontStyle>
+impl bitflags::traits::Flags for syntect::highlighting::FontStyle
+pub type syntect::highlighting::FontStyle::Bits = u8
+pub const syntect::highlighting::FontStyle::FLAGS: &'static [bitflags::traits::Flag<syntect::highlighting::FontStyle>]
+pub fn syntect::highlighting::FontStyle::bits(&self) -> u8
+pub fn syntect::highlighting::FontStyle::from_bits_retain(bits: u8) -> syntect::highlighting::FontStyle
+impl bitflags::traits::PublicFlags for syntect::highlighting::FontStyle
+pub type syntect::highlighting::FontStyle::Internal = InternalBitFlags
+pub type syntect::highlighting::FontStyle::Primitive = u8
+impl core::iter::traits::collect::IntoIterator for syntect::highlighting::FontStyle
+pub type syntect::highlighting::FontStyle::IntoIter = bitflags::iter::Iter<syntect::highlighting::FontStyle>
+pub type syntect::highlighting::FontStyle::Item = syntect::highlighting::FontStyle
+pub fn syntect::highlighting::FontStyle::into_iter(self) -> Self::IntoIter

@trishume
Copy link
Owner

trishume commented Oct 4, 2023 via email

@Enselic
Copy link
Collaborator

Enselic commented Oct 4, 2023

After thinking some more about this...

@extrawurst Could you elaborate a bit on the consequences of waiting with releasing with the bitflags 2 bump? That people have to typically build both bitflags 1 and bitflags 2? That seems like a pretty low cost. The cost of releasing syntect 6.0 is unnecessary churn. syntect 5.0 is only a bit older than a year. I'm not sure it's worth syntect 6.0 just for a bitflags bump.

@smoelius
Copy link

It looks like #513 was merged just over a year ago. Would it be possible to get a syntect 6.0 with bitflags 2.0?

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 a pull request may close this issue.

4 participants