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

Rust 1.80.0 breaks some packages #332957

Open
alyssais opened this issue Aug 7, 2024 · 113 comments · Fixed by #336279, #338442 or #340336
Open

Rust 1.80.0 breaks some packages #332957

alyssais opened this issue Aug 7, 2024 · 113 comments · Fixed by #336279, #338442 or #340336
Labels
5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: rust

Comments

@alyssais
Copy link
Member

alyssais commented Aug 7, 2024

Dear maintainers,

Rust 1.80.0 contains a couple of changes that break some packages: an unfixable build regression, and a warning for unrecognized cfg values that some packages treat as an error. Most commonly, the required fix is just to update the "time" crate. I've opened PRs to fix as many regressions as I can, but I can't do all of them.

1.80.0 is currently in staging-next, so will probably be in Nixpkgs master in the next 1-2 weeks. It wasn't really feasible to hold back, because packages tend to start requiring new Rust versions very soon after release, and it also didn't make a lot of sense to keep 1.79.0 as well, because many of the affected packages haven't been touched in a year or more, so there'd be no assurance we'd be able to remove it any time soon.

So, some effort will be required from you to keep your package building with 1.80.0. Usually, the process will be like this:

  • Figure out what's broken. Usually, but not always, this is that the "time" crate needs to be updated.
  • Get it fixed upstream, if it isn't already.
  • Ask upstream to release a new version, if they haven't already.
  • Update the package in Nixpkgs.

As a last resort, we can patch if we need to, but especially for packages that include a Cargo.lock in Nixpkgs, this is a pain.

I'll post the affected packages in comments, because GitHub limits how many mentions an issue body can contain.

Sorry for the inconvenience. I've lost a lot of the last week to coordinating the update, collecting broken packages, etc., but hopefully by spreading out the work from here it won't take too much of anybody else's time.

@alyssais
Copy link
Member Author

alyssais commented Aug 7, 2024

@aqrln
Copy link
Member

aqrln commented Aug 7, 2024

prisma-engines is being fixed upstream in prisma/prisma-engines#4972 but we can also patch the lockfile in the current version in nixpkgs.

@alyssais
Copy link
Member Author

alyssais commented Aug 7, 2024

You have 1-2 weeks, remember, so if it's being fixed upstream, you can probably wait.

@doronbehar
Copy link
Contributor

Useful link for those who want to quote the build log error for the upstream maintainers:

https://hydra.nixos.org/jobset/nixpkgs/staging-next#tabs-jobs

@pbsds
Copy link
Member

pbsds commented Aug 7, 2024

or do https://hydra.nixos.org/job/nixpkgs/staging-next/<ATTRIBUTEPATH>.x86_64-linux

@teutat3s
Copy link
Member

teutat3s commented Aug 7, 2024

I opened an issue in the upstream repo for garage:
https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/849

@drupol
Copy link
Contributor

drupol commented Aug 7, 2024

Typst 0.11.1 is not compatible with Rust 1.80.0, but the current development snapshot is.

@alyssais
Copy link
Member Author

alyssais commented Aug 7, 2024

Oh right, I forgot to write above: upgrading to an unstable version is possible, at the package maintainer's discretion — it requires a judgement call on how usable/safe the unstable version will be. But getting upstream to make a release is of course the best!

@justinas
Copy link
Contributor

justinas commented Aug 7, 2024

teleport_15

I am somewhat inept in navigating Hydra. Could someone help me confirm whether teleport_15 is actually broken because of the Rust bump?

The last real failure I could find using the link in #332957 (comment) is this one, which seems specific to x86_64-darwin and caused by nodejs failing to compile, if I'm reading this right.

Teleport 15.3.7 does seem to be using a problematic version of the time crate.

Edit: confirmed locally that it does not build.

@alyssais
Copy link
Member Author

alyssais commented Aug 7, 2024

I am somewhat inept in navigating Hydra. Could someone help me confirm whether teleport_15 is actually broken because of the Rust bump?

Hydra hasn't built it with 1.80 yet. If you try building it yourself on staging-next you should see that it's broken.

9999years added a commit to 9999years/git-gr that referenced this issue Aug 7, 2024
- Update `nixpkgs` (and use `rust-overlay` for up-to-date `rustc`)
- Update `time` crate to fix rust-lang/rust#127343

This helps packagers upstream: NixOS/nixpkgs#332957
9999years added a commit to 9999years/git-gr that referenced this issue Aug 7, 2024
- Update `nixpkgs` (and use `rust-overlay` for up-to-date `rustc`)
- Update `time` crate to fix
rust-lang/rust#127343
- 
This helps packagers upstream:
NixOS/nixpkgs#332957
@9999years 9999years mentioned this issue Aug 7, 2024
13 tasks
@dunxen dunxen mentioned this issue Aug 7, 2024
13 tasks
@bendlas
Copy link
Contributor

bendlas commented Aug 8, 2024

It wasn't really feasible to hold back, because packages tend to start requiring new Rust versions very soon after release, and it also didn't make a lot of sense to keep 1.79.0 as well, because many of the affected packages haven't been touched in a year or more, so there'd be no assurance we'd be able to remove it any time soon.

Seems to me like that sentence there contains a wee contradiction. Either the rust updates will be trivial because all the upstreams are already on top of it XOR there is this shadow looming of 1.79 becoming abandonware that we'll have to forever carry.

Looking at the regression, it's the latter one. Indeed, with #333125 I already ran into one of the classics: With 1.80, client builds, but server doesn't without cargo update (as you predicted, @alyssais) but then after the cargo update client fails with many errors.

In this case, I was able to fix it, by building against two different lock files, but that's an ugly hack and was hard to find. Obviously, I did open an upstream issue, but if I don't find it reasonable to set a 2 week ultimatium within nixpkgs, then I find it even less reasonable to impose such limits onto our upstream developers. We are not in a corporate environment here.

On principle, rust 1.80 is a new language due to the incompatible change (however inadvertent), and should be treated as such. So I think we need to leave 1.79 in nixpkgs, a little while longer. We can, however, disable its hydra builds, such that downstream will learn about the issue through increased build times and have a chance to step up, before their toys break.

reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 23, 2024
This patch fixes compilation error[1] with rust 1.80[2].

[1]: https://hydra.nixos.org/build/268780260/nixlog/1
[2]: NixOS#332957
@ocfox ocfox mentioned this issue Sep 26, 2024
13 tasks
This was referenced Sep 27, 2024
@Bot-wxt1221 Bot-wxt1221 mentioned this issue Oct 3, 2024
13 tasks
@emilazy
Copy link
Member

emilazy commented Oct 8, 2024

I think we’ve probably dealt with this issue sufficiently to the point where it no longer needs to be pinned or maybe even open. The user reports of broken packages I’ve seen have diminished to almost nothing by now, and any remaining long tail of packages will be handled during Zero Hydra Failures soon anyway.

@alyssais alyssais unpinned this issue Oct 8, 2024
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/what-is-nixpkgs-preferred-programming-language/53848/31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: rust
Projects
None yet