https://github.com/hzeller/bazel-filegroup-issue
Documenting a bug happening in bazel5+
https://github.com/hzeller/bazel-filegroup-issue
Last synced: 3 months ago
JSON representation
Documenting a bug happening in bazel5+
- Host: GitHub
- URL: https://github.com/hzeller/bazel-filegroup-issue
- Owner: hzeller
- Created: 2023-02-18T22:05:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-18T22:05:37.000Z (over 2 years ago)
- Last Synced: 2025-06-08T14:03:04.151Z (4 months ago)
- Language: Starlark
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Documenting a bazel filegroup situation
---------------------------------------With bazel 4, this example works
```
bazel build //...
bazel test //...
bazel build :all_targets_filegroup
```However, this fails with bazel 5 and bazel 6 with
the following error message```
Starting local Bazel server and connecting to it...
ERROR: file '_objs/foo_test/foo_test.pic.o' is generated by these conflicting actions:
Label: //:foo_test
RuleClass: cc_test rule
Configuration: e092ed498cdaed34cbee1e27b6c529e4d4c96f5740962e34445c35cb8e428a80, 71e2310679f2e57310a6137cc3984f03c238e6cb473476da6e80d47ae1f8ab9b
Mnemonic: CppCompile
Action key: 2eea5f339b16424fe3c669a395e87e917b03870704a95534acb001b049d45eb5
Progress message: Compiling foo_test.cc
PrimaryInput: File:[/home/directory/bazel-filegroup-issue[source]]foo_test.cc
PrimaryOutput: File:[[]bazel-out/k8-fastbuild/bin]_objs/foo_test/foo_test.pic.o
Owner information: ConfiguredTargetKey{label=//:foo_test, config=BuildConfigurationValue.Key[e092ed498cdaed34cbee1e27b6c529e4d4c96f5740962e34445c35cb8e428a80]}, ConfiguredTargetKey{label=//:foo_test, config=BuildConfigurationValue.Key[71e2310679f2e57310a6137cc3984f03c238e6cb473476da6e80d47ae1f8ab9b]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for _objs/foo_test/foo_test.pic.o, previous action: action 'Compiling foo_test.cc', attempted action: action 'Compiling foo_test.cc'
```