-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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_7: 7.1.0 -> 7.1.2 #314279
bazel_7: 7.1.0 -> 7.1.2 #314279
Conversation
then addSources acc | ||
else acc; | ||
|
||
requiredSourcePredicate = n: requiredDepNamePredicate (sanitize n); | ||
requiredDeps = foldlJSON (extract_source requiredSourcePredicate) { } modules; | ||
requiredDeps = foldlModuleDepGraph (extract_source requiredSourcePredicate) { } modules // foldlGeneratedRepoSpecs (extract_source requiredSourcePredicate) { } modules; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the naming "foldl..." here. Also, this looks a bit verbose. Suggestions welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, parsing twice is not ideal, but parsing at all may not survive 7.2.0, so good enough for now.
null == builtins.match ".*(macos|osx|linux|win|apple|android|maven).*" name | ||
&& null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_).*" name ; | ||
null == builtins.match ".*(macos|osx|linux|win|android|maven).*" name | ||
&& null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_|apple_support).*" name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might no longer filter all platform specific deps with apple
in the name. I needed this to allow downloading of apple_support
. Suggestions welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having too much here is not a big issue. It bloats the build closure, but not the runtime closure. So pretty innocuous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on x86_64-linux and seems to work fine 👍 can't give an official stamp as a non-member
pkgs/development/tools/build-managers/bazel/bazel_7/bazel-repository-cache.nix
Outdated
Show resolved
Hide resolved
pkgs/development/tools/build-managers/bazel/bazel_7/bazel-repository-cache.nix
Outdated
Show resolved
Hide resolved
The new lockfile format 6 drops the "name" attribute of each repoSpec. See also: bazelbuild/bazel#21026 This prevents the builder from effectively the deps using requiredDepNamePredicate. Instead, we now generate names from other metadata.
I'm also playing around with the RCs of 7.2.0 and noticed that we may need to find a different approach (stop parsing Some module extensions no longer show up in the lockfile if they are marked as reproducible (example, upstream change). Also, some required external dependencies are now recorded in I would like to discuss alternatives in some appropriate channel. Any suggestions? Probably either a forum or matrix channel. My ideas for solving this are:
|
Result of 1 package built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
then addSources acc | ||
else acc; | ||
|
||
requiredSourcePredicate = n: requiredDepNamePredicate (sanitize n); | ||
requiredDeps = foldlJSON (extract_source requiredSourcePredicate) { } modules; | ||
requiredDeps = foldlModuleDepGraph (extract_source requiredSourcePredicate) { } modules // foldlGeneratedRepoSpecs (extract_source requiredSourcePredicate) { } modules; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, parsing twice is not ideal, but parsing at all may not survive 7.2.0, so good enough for now.
null == builtins.match ".*(macos|osx|linux|win|apple|android|maven).*" name | ||
&& null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_).*" name ; | ||
null == builtins.match ".*(macos|osx|linux|win|android|maven).*" name | ||
&& null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_|apple_support).*" name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having too much here is not a big issue. It bloats the build closure, but not the runtime closure. So pretty innocuous.
Description of changes
Upgrade Bazel to 7.1.2 and make parsing of
MODULE.bazel.lock
compatible withlockFileVersion
4, 5, and 6.Also pinging @Strum355. For some reason, I am unable to add you as a reviewer.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.