-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
bazel: update to 3.5.0 #97497
Comments
cc @mboes |
`Does 3.4.1 work? It seems bazel is making some breaking changes among 3.x versions, like bazelbuild/rules_docker#1620 |
the real issue is https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/bazel/update-srcDeps.py stubbing functions to extract dependencies, it doesn't work anymore with more complex bazel WORKSPACE |
Using bazel itself (so, older but recent enough version or one from a binary distribution) bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all) + kind(git_repository, //external:all)' --output build will produce the list of dependencies without fancy language features Notes:
|
Further complications include
|
trying to fix non-checksummed dependencies on bazel side bazelbuild/bazel#12226 |
bazel 3.6.1 should be compatible, but not released yet |
Actually 3.7.0 is still incompatible, waiting for 3.8.0 (November) |
3.7.0+ / 3.9999 / bazel_git PR #101292 |
Do we have any reasonable solution to just using a bazel version higher than |
I have WIP branch for bazel_git with 3.7.0+ https://github.com/divanorama/nixpkgs/commits/bazel_git |
Bazel 4 is going to be a long term support release. Latest version in NixPkgs so far was 3.3.1 There's a need for more recent version NixOS#97497 All versions from 3.5.0 to 3.7.1 had some reproducibility issues as noted in issue above, but there also seems to be a working PR for 3.7.1 now at NixOS#105439 Notable changes from bazel_3 setup: - put python to default bash path For autodetecting python toolchain with strict action_env on and without this change bazel would fail to autodetect host python. There are some repos that define hermetic python toolchains, but they aren't easy to use yet. Also telling python paths to bazel isn't a 1-liner it seems: - action_env=PATH would affect cache - declaring toolchain via BUILD&WORKSPACE files is not per-user but more like per-repo and affects cache too Using python from nixpkgs shouldn't be too bad in the lack of simpler hermetic python toolchain options - bazel_4.updater is bazel on `bazel query` to support new constructs in WORKSPACE (load of vars, transitive load etc). This is more robust but requires bazel to run the updater, using bazel_3 for now. This is only needed to bump package version, doesn't introduce bazel_4 build dependency on bazel_3 https://blog.bazel.build/2020/11/10/bazel-4.0-announce.html https://blog.bazel.build/2020/11/10/long-term-support-release.html bazelbuild/bazel#12455 https://github.com/bazelbuild/bazel/releases/tag/4.0.0 https://blog.bazel.build/2021/01/19/bazel-4-0.html
Bazel 4 is going to be a long term support release. Latest version in NixPkgs so far was 3.3.1 There's a need for more recent version NixOS#97497 All versions from 3.5.0 to 3.7.1 had some reproducibility issues as noted in issue above, but there also seems to be a working PR for 3.7.1 now at NixOS#105439 Notable changes from bazel_3 setup: - put python to default bash path For autodetecting python toolchain with strict action_env on and without this change bazel would fail to autodetect host python. There are some repos that define hermetic python toolchains, but they aren't easy to use yet. Also telling python paths to bazel isn't a 1-liner it seems: - action_env=PATH would affect cache - declaring toolchain via BUILD&WORKSPACE files is not per-user but more like per-repo and affects cache too Using python from nixpkgs shouldn't be too bad in the lack of simpler hermetic python toolchain options - bazel_4.updater is bazel on `bazel query` to support new constructs in WORKSPACE (load of vars, transitive load etc). This is more robust but requires bazel to run the updater, using bazel_3 for now. This is only needed to bump package version, doesn't introduce bazel_4 build dependency on bazel_3 https://blog.bazel.build/2020/11/10/bazel-4.0-announce.html https://blog.bazel.build/2020/11/10/long-term-support-release.html bazelbuild/bazel#12455 https://github.com/bazelbuild/bazel/releases/tag/4.0.0 https://blog.bazel.build/2021/01/19/bazel-4-0.html
bazel_3 is now at 3.7.2 and bazel_4 is at 4.0.0 (bump to 4.1.0 pending), so I think this issue can be closed |
When attempting to follow the instructions in
pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
I ran into an issue witheval $(nix-build -A bazel.updater)
:I'm unsure how to fix that myself; apologies.
See: https://github.com/bazelbuild/bazel/releases
The text was updated successfully, but these errors were encountered: