bazel-diff
bazel-diff copied to clipboard
Throws an exception when executing Generating Hashes
bazel_diff version: 4.0.8, 4.0.5, 4.0.2
Reference documentation: https://github.com/Tinder/bazel-diff/blob/4.0.8/README.md
Integrate bazel_diff into my own project using the recommended way in README.md, Reference address: https://github.com/Tinder/bazel-diff/blob/4.0.8/README.md#integrate-into-your-project-recommended

After bazel_diff is generated, an error will be reported when executing the script $bazel_diff generate-hashes -w $workspace_path -b $bazel_path $starting_hashes_json, the error is as follows:
Generating Hashes for Revision '****************'`
`Loading: 0 packages loaded`
Loading: 1384 packages loaded
currently loading: ******************* ... (42 packages)
WARNING: --keep_going specified, ignoring errors. Results may be inaccurate
Loading: 1426 packages loaded
Loading: 1426 packages loaded
[Error] Unexpected error during generation of hashes
java.lang.RuntimeException: Bazel query failed, exit code 3
at com.bazel_diff.bazel.BazelQueryService.query(BazelQueryService.kt:60)
at com.bazel_diff.bazel.BazelClient.queryAllSourcefileTargets(BazelClient.kt:41)
at com.bazel_diff.hash.BuildGraphHasher$hashAllBazelTargetsAndSourcefiles$1$sourceTargetsFuture$1.invokeSuspend(BuildGraphHasher.kt:40)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
I also tested bazel_diff of 4.0.8, 4.0.5 and 4.0.2 versions, and will have the same error, while testing earlier versions such as 3.5.0 and 3.4.2 is normal.
Can someone please help to see what is the reason for this thanks.
Can you test with https://github.com/Tinder/bazel-diff/pull/150?
Yes, but I tested it and found that there will still be the same error in my project.
