Also persist facts in the hidden lockfile#27522
Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Closed
Also persist facts in the hidden lockfile#27522fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Conversation
Collaborator
Author
|
@bazel-io fork 8.5.0 |
Collaborator
Author
|
@bazel-io fork 9.0.0 |
This was referenced Nov 4, 2025
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used. Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts.
Wyverald
approved these changes
Nov 4, 2025
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Nov 5, 2025
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used. Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts. Along the way fix the `print` behavior of `Facts` which resulted in `Facts(<unknown object net.starlark.java.eval.Dict>)` since it called the wrong `repr` override. Closes bazelbuild#27522. PiperOrigin-RevId: 828559479 Change-Id: I77f002fa0e74c23b9fab5bb05948bcbe76f8f49b
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 6, 2025
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used. Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts. Along the way fix the `print` behavior of `Facts` which resulted in `Facts(<unknown object net.starlark.java.eval.Dict>)` since it called the wrong `repr` override. Closes #27522. PiperOrigin-RevId: 828559479 Change-Id: I77f002fa0e74c23b9fab5bb05948bcbe76f8f49b Commit bed7a1f Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
fmeum
added a commit
to fmeum/bazel
that referenced
this pull request
Nov 12, 2025
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used. Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts. Along the way fix the `print` behavior of `Facts` which resulted in `Facts(<unknown object net.starlark.java.eval.Dict>)` since it called the wrong `repr` override. Closes bazelbuild#27522. PiperOrigin-RevId: 828559479 Change-Id: I77f002fa0e74c23b9fab5bb05948bcbe76f8f49b (cherry picked from commit bed7a1f)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 13, 2025
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used. Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts. Along the way fix the `print` behavior of `Facts` which resulted in `Facts(<unknown object net.starlark.java.eval.Dict>)` since it called the wrong `repr` override. Closes #27522. PiperOrigin-RevId: 828559479 Change-Id: I77f002fa0e74c23b9fab5bb05948bcbe76f8f49b (cherry picked from commit bed7a1f) Closes #27523
copybara-service bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
ModuleExtensionId is not comparable by itself and needs a comparator. Before this fix, I was able to crash Bazel with this message:
```
FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.ClassCastException: class com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId cannot be cast to class java.lang.Comparable (com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:29)
at com.google.common.collect.ImmutableSortedMap.lambda$fromEntries$0(ImmutableSortedMap.java:536)
at java.base/java.util.TimSort.countRunAndMakeAscending(Unknown Source)
at java.base/java.util.TimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:528)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:495)
at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:474)
at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:372)
at com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileModule.afterCommand(BazelLockFileModule.java:135)
at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:711)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677)
at io.grpc.Context$1.run(Context.java:566)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
Fixes #27522
Closes #27816.
PiperOrigin-RevId: 840671327
Change-Id: Ia7eb05be4fd099f0e2711065faf4c344d45265b5
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Dec 5, 2025
ModuleExtensionId is not comparable by itself and needs a comparator. Before this fix, I was able to crash Bazel with this message:
```
FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.ClassCastException: class com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId cannot be cast to class java.lang.Comparable (com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:29)
at com.google.common.collect.ImmutableSortedMap.lambda$fromEntries$0(ImmutableSortedMap.java:536)
at java.base/java.util.TimSort.countRunAndMakeAscending(Unknown Source)
at java.base/java.util.TimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:528)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:495)
at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:474)
at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:372)
at com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileModule.afterCommand(BazelLockFileModule.java:135)
at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:711)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677)
at io.grpc.Context$1.run(Context.java:566)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
Fixes bazelbuild#27522
Closes bazelbuild#27816.
PiperOrigin-RevId: 840671327
Change-Id: Ia7eb05be4fd099f0e2711065faf4c344d45265b5
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Dec 5, 2025
ModuleExtensionId is not comparable by itself and needs a comparator. Before this fix, I was able to crash Bazel with this message:
```
FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.ClassCastException: class com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId cannot be cast to class java.lang.Comparable (com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:29)
at com.google.common.collect.ImmutableSortedMap.lambda$fromEntries$0(ImmutableSortedMap.java:536)
at java.base/java.util.TimSort.countRunAndMakeAscending(Unknown Source)
at java.base/java.util.TimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:528)
at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:495)
at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:474)
at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:372)
at com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileModule.afterCommand(BazelLockFileModule.java:135)
at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:711)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607)
at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677)
at io.grpc.Context$1.run(Context.java:566)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
Fixes bazelbuild#27522
Closes bazelbuild#27816.
PiperOrigin-RevId: 840671327
Change-Id: Ia7eb05be4fd099f0e2711065faf4c344d45265b5
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
…27881) ModuleExtensionId is not comparable by itself and needs a comparator. Before this fix, I was able to crash Bazel with this message: ``` FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.ClassCastException: class com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId cannot be cast to class java.lang.Comparable (com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap') at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:29) at com.google.common.collect.ImmutableSortedMap.lambda$fromEntries$0(ImmutableSortedMap.java:536) at java.base/java.util.TimSort.countRunAndMakeAscending(Unknown Source) at java.base/java.util.TimSort.sort(Unknown Source) at java.base/java.util.Arrays.sort(Unknown Source) at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:528) at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:495) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:474) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:372) at com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileModule.afterCommand(BazelLockFileModule.java:135) at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:711) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257) at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607) at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677) at io.grpc.Context$1.run(Context.java:566) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ``` Fixes #27522 Closes #27816. PiperOrigin-RevId: 840671327 Change-Id: Ia7eb05be4fd099f0e2711065faf4c344d45265b5 Commit b2587f6 Co-authored-by: Malte Poll <1780588+malt3@users.noreply.github.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
…27882) ModuleExtensionId is not comparable by itself and needs a comparator. Before this fix, I was able to crash Bazel with this message: ``` FATAL: bazel crashed due to an internal error. Printing stack trace: java.lang.ClassCastException: class com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId cannot be cast to class java.lang.Comparable (com.google.devtools.build.lib.bazel.bzlmod.ModuleExtensionId is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap') at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:29) at com.google.common.collect.ImmutableSortedMap.lambda$fromEntries$0(ImmutableSortedMap.java:536) at java.base/java.util.TimSort.countRunAndMakeAscending(Unknown Source) at java.base/java.util.TimSort.sort(Unknown Source) at java.base/java.util.Arrays.sort(Unknown Source) at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:528) at com.google.common.collect.ImmutableSortedMap.fromEntries(ImmutableSortedMap.java:495) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:474) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:372) at com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileModule.afterCommand(BazelLockFileModule.java:135) at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:711) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257) at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607) at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677) at io.grpc.Context$1.run(Context.java:566) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ``` Fixes #27522 Closes #27816. PiperOrigin-RevId: 840671327 Change-Id: Ia7eb05be4fd099f0e2711065faf4c344d45265b5 Commit b2587f6 Co-authored-by: Malte Poll <1780588+malt3@users.noreply.github.com>
Member
|
A fix for this issue has been included in Bazel 9.0.0 RC5. Please test out the release candidate and report any issues as soon as possible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Otherwise facts are not added to the default lockfile when an entry in the hidden lockfile for a reproducible extension is used.
Also bump the lockfile version out of caution - users may already have hidden lockfiles that lack facts.
Along the way fix the
printbehavior ofFactswhich resulted inFacts(<unknown object net.starlark.java.eval.Dict>)since it called the wrongreproverride.