bazel-contrib / target-determinator

Determines which Bazel targets were affected between two git commits.
Apache License 2.0
144 stars 22 forks source link

TargetHashCache has already been frozen #88

Open jamil-s opened 6 months ago

jamil-s commented 6 months ago
version: target-determinator v0.26.0

When running target-determinator on a repo, I am seeing the error TargetHashCache has already been frozen

~/Downloads/target-determinator.darwin.arm64 -verbose main
2024/04/05 12:16:02 Processing revision 'before' (main, sha: a679f0f50ccc115fc3f50474af98cef947d3958e)
2024/04/05 12:16:02 Finding compatible targets under //...
2024/04/05 12:16:02 Running cquery on deps(//...)
2024/04/05 12:16:03 Running cquery on //...
2024/04/05 12:16:03 Finding compatible targets under //...
2024/04/05 12:16:03 Matching labels to configurations
2024/04/05 12:16:03 Hashing targets
2024/04/05 12:16:04 Processing revision 'after' (current working directory state)
2024/04/05 12:16:04 Finding compatible targets under //...
2024/04/05 12:16:04 Running cquery on deps(//...)
2024/04/05 12:16:05 Running cquery on //...
2024/04/05 12:16:05 Finding compatible targets under //...
2024/04/05 12:16:05 Matching labels to configurations
2024/04/05 12:16:05 Hashing targets
Target Determinator invocation Error
2024/04/05 12:16:06 TargetHashCache has already been frozen

There isn't much more information I can provide based on this limited output but happy to give anything requested if needed

seh commented 4 months ago

I noticed that this happens whenever I try to use the --verbose command-line flag. Deleting my ~/.cache/target-determinator directory and trying again didn't resolve the problem.

illicitonion commented 4 months ago

Interesting, I don't repro in some example repos - if it's possible for someone to put up an example repro that'd be really useful to debug what's going on here...

Asdprom commented 3 months ago

It is possible that I have accidentally reproduced the same issue. I prepared a sample repository with the reproduction here: https://github.com/Asdprom/bazel_sample.

target-determinator.windows.amd64.exe -verbose 85e36dae062b7676931786087d8a874daa92611c fails, while target-determinator.windows.amd64.exe 85e36dae062b7676931786087d8a874daa92611c does not.

Additionally, I encountered some strange behavior. In the same repository, if I change the A.cc source file, the target determinator does not return any targets as changed. This is probably unrelated and might be due to some misconfiguration on my side.