Skip to content

Upgrade to Bazel 7#728

Draft
avdv wants to merge 16 commits into
masterfrom
cb/upgrade-bazel-7
Draft

Upgrade to Bazel 7#728
avdv wants to merge 16 commits into
masterfrom
cb/upgrade-bazel-7

Conversation

@avdv

@avdv avdv commented May 12, 2026

Copy link
Copy Markdown
Member

Bazel 6 is EOL, we ought to support Bazel 7 and later.

  • examples/flakes: Update nixpkgs to nixos-25.05
  • Upgrade to Bazel 7

avdv added 7 commits May 12, 2026 07:17
examples/flakes/flake.lock: Update

Flake lock file updates:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9?narHash=sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm%2B504Ch3sNKLd8%3D' (2023-01-17)
  → 'github:edolstra/flake-compat/5edf11c44bc78a0d334f6334cdaf7d60d732daab?narHash=sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns%3D' (2025-12-29)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/3db36a8b464d0c4532ba1c7dda728f4576d6d073?narHash=sha256-XX2f9c3iySLCw54rJ/CZs%2BZK6IQy7GXNY4nSOyu2QG4%3D' (2023-02-13)
  → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' (2024-11-13)
• Added input 'flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D' (2023-04-09)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2fb7d749c084890192b2cd08ba264e5e4a14df1b?narHash=sha256-MJ%2BPXNmUyxnMTFoss7G2lEcUY2cfYZM6RudBAL5aX1k%3D' (2023-02-16)
  → 'github:NixOS/nixpkgs/ac62194c3917d5f474c1a844b6fd6da2db95077d?narHash=sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w%3D' (2026-01-02)
```
module requires module version bazel_skylib@1.0.3, but got bazel_skylib@1.6.1 in the resolved dependency graph
```
Version 0.3.0 is not compatible with Bazel 7.
When bzlmod is enabled, rules_java tries to configure the local java SDK
and unconditionally registers the toolchain. This leads to an error if
no javac executable can be found.
@avdv avdv force-pushed the cb/upgrade-bazel-7 branch from 731f5de to 91a16e4 Compare May 12, 2026 19:35
avdv added 5 commits May 18, 2026 17:00
In Bazel 6, the `workspace(name = "io_tweag_rules_nixpkgs")` call would implicitly
create a local_repository for the given name, but Bazel 7 does no longer do that.
@avdv avdv force-pushed the cb/upgrade-bazel-7 branch from b6f7bc0 to d0e83f8 Compare May 18, 2026 15:00
avdv added 4 commits May 19, 2026 17:52
Pinning the cargo dependencies failed with:

Error: Failed to write registry URLs and feature map

Caused by:
    0: Failed to get crate index config
    1: No such file or directory (os error 2)

So at least 0.58.0 is required, which depends on platforms >= 0.0.11.

Also, disable bzlmod for the time being.
* upgrade rules_go and gazelle
* upgrade nixpkgs to nixos-25.05
* use python3 instead of python310 specifically (sphinx is broken for
  the latter which fails)
* note that the example is dated, and should be updated to use bzlmod
  and (preferably) rules_img or rules_oci
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 this pull request may close these issues.

1 participant