NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.71k stars 13.84k forks source link

Update request: bazel_7 7.1.2 → 7.3.x #318833

Open malt3 opened 4 months ago

malt3 commented 4 months ago

Notify maintainers

@NixOS/bazel


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

hjkatz commented 4 months ago

cc @NixOS/bazel Can we help prioritize this issue? The Bazel 7.1.* releases have a major functionality bug where remote cache uploads hang indefinitely, see: https://github.com/bazelbuild/bazel/issues/21626 and related issues.

We would normally use a custom derivation where we pass our own version = 7.2.0 into nixpkgs bazel/bazel_7/default.nix but the bazel team upstream changed the lock file format in a minor patch version so now the tests.nix do not pass with this strategy.

malt3 commented 4 months ago

@hjkatz please see my comment containing two ideas for solving this. The bazel vendor command will only result in a usable vendor dir after 7.3. So in my eyes, you have the following options:

jtszalay commented 3 months ago

7.2.1 is now out: https://github.com/bazelbuild/bazel/releases/tag/7.2.1

malt3 commented 2 months ago

Bazel 7.3 will have a fully functional vendoring command!

https://github.com/bazelbuild/bazel/releases/tag/7.3.0rc1

timothyklim commented 1 month ago

Bazel 7.3 will have a fully functional vendoring command!

https://github.com/bazelbuild/bazel/releases/tag/7.3.0rc1

Released 12 hours ago https://github.com/bazelbuild/bazel/releases/tag/7.3.0

flurie commented 1 month ago

Hi, I have a WIP of Bazel 7.3 building on x86_64-linux: https://github.com/NixOS/nixpkgs/compare/master...flurie:nixpkgs:flurie/bazel_73.

Note that (for now) the target is bazel_73.

hjkatz commented 1 month ago

@flurie the hero we need 🙇

flurie commented 1 month ago

Ok to walk through it a little bit:

It's still kind of messy, but I don't let mess get in the way of a PR unless there's too much of it or I don't have enough time to self-review.

More serious gaps:

If anyone has more info about those gaps, I'll feel more comfortable putting this up for review.

jtszalay commented 1 month ago

:ohno:

2024-08-19 19:26:50 UTC error: hash mismatch in fixed-output derivation '/nix/store/vz0d58c3j2f1vk592k53l3z3ia3i6izf-bazel_deps.drv':
2024-08-19 19:26:50 UTC          specified: sha256-acZOeHBHchotsEG51WfpgR7MGJze88xwnON/DE9IlSo=
2024-08-19 19:26:50 UTC             got:    sha256-+ux/l+IDIZ8VJ7l48u2iJ7DTLt8CasLPW2UH+TGk6LU=

2024-08-19 19:00:34 UTC error: hash mismatch in fixed-output derivation '/nix/store/vz0d58c3j2f1vk592k53l3z3ia3i6izf-bazel_deps.drv':
2024-08-19 19:00:34 UTC          specified: sha256-acZOeHBHchotsEG51WfpgR7MGJze88xwnON/DE9IlSo=
2024-08-19 19:00:34 UTC             got:    sha256-QvpRBilcomdtc74OmZ5PvzZHlm21+55ayQqEk0FlIyI=

bazel vendor seems inconsistent

flurie commented 1 month ago

Good catch. The bazel mod deps almost certainly needs to go, and that should be replaced with vendoring a version of MODULE.bazel.lock, but the one in the repo did not work without getting updated. I vendored a copy (I believe) after making the update. I'll see if I can get the FOD to output something consistently.

I may also be doing something incorrectly since I have little experience with FODs.

flurie commented 1 month ago

@jtszalay has very kindly helped to get the build deps to a reproducible state, and we now have what should be a working derivation (for linux).

flurie commented 1 month ago

https://github.com/NixOS/nixpkgs/pull/338264