Using dupeclassescheck_enable = True in Bazel 7.0 causes build failures like this one.
ERROR: /Users/dsamunev/git/rules_spring/examples/demoapp/BUILD:57:11: Checking for duplicate classes in the Spring Boot jar... failed: (Exit 1): py3wrapper.sh failed: error executing DupeCheck command (from target //examples/demoapp:examples/demoapp_dupecheck) bazel-out/darwin_x86_64-fastbuild/bin/external/bazel_tools/tools/python/py3wrapper.sh bazel-out/darwin_x86_64-fastbuild/bin/springboot/check_dupe_classes ... (remaining 3 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Traceback (most recent call last):
File "/private/var/tmp/_bazel_dsamunev/88ed74557049badcb65f0f5e0c8918f2/sandbox/darwin-sandbox/119/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/springboot/check_dupe_classes", line 559, in <module>
Main()
File "/private/var/tmp/_bazel_dsamunev/88ed74557049badcb65f0f5e0c8918f2/sandbox/darwin-sandbox/119/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/springboot/check_dupe_classes", line 457, in Main
module_space = FindModuleSpace(main_rel_path)
File "/private/var/tmp/_bazel_dsamunev/88ed74557049badcb65f0f5e0c8918f2/sandbox/darwin-sandbox/119/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/springboot/check_dupe_classes", line 172, in FindModuleSpace
raise AssertionError('Cannot find .runfiles directory for %s' % sys.argv[0])
AssertionError: Cannot find .runfiles directory for bazel-out/darwin_x86_64-fastbuild/bin/springboot/check_dupe_classes
INFO: Elapsed time: 100.393s, Critical Path: 16.68s
INFO: 148 processes: 30 internal, 109 darwin-sandbox, 9 worker.
ERROR: Build did NOT complete successfully
The issue can be reproduced very easily.
% cd rules_spring
% USE_BAZEL_VERSION=7.0.0 bazelisk build examples/demoapp/...
Using
dupeclassescheck_enable = True
in Bazel 7.0 causes build failures like this one.The issue can be reproduced very easily.