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

Backport fixes to earlier releases? #1881

Closed
rtzoeller opened this issue Nov 21, 2022 · 17 comments
Closed

Backport fixes to earlier releases? #1881

rtzoeller opened this issue Nov 21, 2022 · 17 comments

Comments

@rtzoeller
Copy link
Collaborator

rtzoeller commented Nov 21, 2022

The upcoming 0.26 release will fix several bugs -- as previous releases included or will include breaking changes, it may not be possible for all clients to trivially uptake these bug fixes by upgrading to the latest version of nix. Additionally, 0.26 will bump the MSRV, making it difficult for clients stuck on an older rust to adopt these fixes.

@asomers should we backport any of the fixes to patch earlier releases?


Here's a draft list of changes to backport to each version:

0.25

0.24

0.23

0.22

@rtzoeller
Copy link
Collaborator Author

Some but not all of these bugs would also apply to 0.23, which I believe is also still fairly heavily used per the download statistics on https://crates.io/crates/nix. We could also backport and release a new patch for this branch, if desired.

@asomers
Copy link
Member

asomers commented Nov 21, 2022

You're right. And even 0.22 has 10k downloads per day. We should probably backport.

@rtzoeller
Copy link
Collaborator Author

rtzoeller commented Nov 21, 2022

I'm happy to handle the actual cherry-picking and release processes; I think it can all wait until we have 0.26 released though.

If we're applying fixes across 0.22 <-> 0.25, it'd be helpful to have a list of changes we want to cherry-pick into each version. There might be some fixes from 0.23 <-> 0.25 that we want to cherry-pick back to 0.22, for example.

I've updated the original issue to provide a space for this list.

@rtzoeller rtzoeller changed the title Backport fixes to 0.24, 0.25? Backport fixes to earlier releases? Nov 21, 2022
@rtzoeller
Copy link
Collaborator Author

@asomers should we backport #1642 to 0.23 and 0.22? We deprecated InetAddr::from_std in 0.24, which was ironically the first release containing #1642.

Not sure how we feel about applying fixes to since-deprecated APIs, but it seems easy enough to include if we're already fixing things.

@asomers
Copy link
Member

asomers commented Nov 21, 2022

If it's easy, sure. But I don't want to expend too much energy maintaining old releases.

@wesleywiser
Copy link
Contributor

I'm working on upgrading the version of musl used by the Rust *-linux-musl targets to musl 1.2. We unfortunately will have to make some breaking changes to the libc crate as part of that effort. I've done a crater run of the proposed changes which revealed a number of crates that no longer build because of compilation errors in various versions of the nix crate as a result of those libc changes:

Version Number of downstream crates broken
nix-0.22.3 32
nix-0.23.1 52
nix-0.24.2 111
nix-0.25.0 87

If you're going to be releasing updates to any of those versions, it would be awesome if you could include #1886! I would be happy to help with that and provide patches and testing for whatever versions you choose.

@asomers
Copy link
Member

asomers commented Nov 28, 2022

@rtzoeller I think I'll have some free time tonight or tomorrow evening to work on releases. I'll start with 0.26.0 and work my way backwards.

@rtzoeller
Copy link
Collaborator Author

@asomers if you can get 0.26.0 published (not sure if there are any other PRs we want to pull in), I'm happy to handle the backporting if you'd prefer. Not sure how much manual fixing of cherry-picks will be required.

@rtzoeller
Copy link
Collaborator Author

@wesleywiser if I'm understanding correctly, #1886 lets us support both musl 1.1 now and 1.2 in the future? In that case, I agree we should cherry-pick it back to those releases if possible. I'll add it to the list, but please thumbs up/down this comment to ack my understanding.

@rtzoeller
Copy link
Collaborator Author

@asomers I tried cherry-picking the commits and have added my notes to the issue body; very few conflicts and almost all could be solved by picking an additional commit.

#1886 is the only painful one, just because we've added so much to src/sys/time.rs recently.

I expect there will be a healthy amount of clippy cleanup needed after cherry picking, unless we want to suppress things.

@rtzoeller
Copy link
Collaborator Author

rtzoeller commented Nov 29, 2022

@asomers I have drafts up for patches of 0.25, 0.24, and 0.23. I will get to 0.22 after we get a resolution on how to backport #1886. I see no reason to hold up 0.26.0 for that though.

@rtzoeller
Copy link
Collaborator Author

@rtzoeller need to backport #1821 as well.

@rtzoeller
Copy link
Collaborator Author

@asomers can you look over #1887 and #1889? These should reflect the 0.25 and 0.24 patches - I plan on publishing these as soon as I get your go-ahead (i.e. not waiting for the 0.23 and 0.22 patches to be ready first).

I'm planning on closing the draft PRs and pushing directly to the branches, as it appears we have done in the past.

0.23 (#1892) is having some issues with the Redox build. We will also need to decide how to handle the mqueue changes from https://github.com/nix-rust/nix/pull/1639/files, as clippy is unhappy but the original fix was a breaking change not suitable for a patch release.

0.22 (#1901).... I am not sure what to do with. #1821 is nontrivial to backport due to #1524, which first landed in 0.23.0. We also were not running clippy at this point, and the build is failing for what appear to be infrastructure issues.

@asomers
Copy link
Member

asomers commented Dec 2, 2022

#1887 and #1889 look good to me. I may be able to take a look at the other two this weekend, if I have time. Satisfying Clippy is always the hardest part about making patch releases.

@rtzoeller
Copy link
Collaborator Author

#1892 should be ready for review; I'm not sure why the mqueue changes didn't come up, but I won't complain. Just needed to use a newer redox compiler and backport one redox fix.

@rtzoeller
Copy link
Collaborator Author

0.23, 0.24, and 0.25 are patched. 0.22 still remains, but I'm contemplating if our time is better spent updating crates which are still depending on that old of a version, rather than patching.

For example: watchexec/command-group#8

@asomers
Copy link
Member

asomers commented Aug 27, 2023

Closing this issue. We never did publish another version of 0.22, and the world hasn't complained.

@asomers asomers closed this as completed Aug 27, 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

No branches or pull requests

3 participants