Comments (8)
@purkhusid I cut a release with the fix: https://github.com/aspect-build/bazel-lib/releases/tag/v1.11.0. Closing for now, but you can reopen if the problem persists.
from bazel-lib.
This sounds familiar and may have been fixed in 80603fb. Do you want to try updating to the latest release, 1.10.1
?
https://github.com/aspect-build/bazel-lib/releases/tag/v1.10.1
from bazel-lib.
@kormide I'm using the latest release. It seems like the fix fixes copy_to_bin
but breaks copy_file_action
in my case.
The change also doesn't make sense to me because by removing the label from the bat file name I would think that it would be more likely that the actions that create the bat output would collide.
from bazel-lib.
The change was made to support this case on Windows.
copy_to_bin(
name = "a",
srcs = [
"file"
]
)
copy_to_bin(
name = "b",
srcs = [
"file"
]
)
If the labels are different then two different scripts were created which declare the the same file as an output, so bazel complains about conflicting actions. After the fix, the targets create an identical script that outputs the copied file, which bazel is okay with.
Can you paste the error you're seeing or push a branch so that I can investigate further?
from bazel-lib.
Ah, the issue I have is that Bazel complains that there are 2 different targets that output the same script file. So it's not the outputs of the copy action that conflict but the script files. I'll paste the error when I'm back at the computer.
from bazel-lib.
In the example you linked to, are those two targets supposed to produce two different output files with the same content, or the same output file?
If it's the former, maybe what I need to do here is name the script after a hash of the source and the destination file, rather than just the source.
from bazel-lib.
I got a PR up that hopefully fixes your case: #221
from bazel-lib.
In the example you linked to, are those two targets supposed to produce two different output files with the same content, or the same output file?
If it's the former, maybe what I need to do here is name the script after a hash of the source and the destination file, rather than just the source.
Yes, that is the case. The error is:
ERROR: file 'publish_binary/478990217-cmd.bat' is generated by these conflicting actions:
Label: //publish_binary:publish_self_contained, //publish_binary:publish_not_self_contained
RuleClass: publish_binary_wrapper rule
Configuration: 2d025b54d1e798337c54da69c5ab51e6e250f93e5d6a812a4f1f0030d6869a75
Mnemonic: FileWrite
Action key: 596af37dc0561a5711b4554c15126ceef0006a085d8edc0916527b0584c6261d, 56060fef44722e1300d9738701c7d20e85b09abd07340c2b7d9f42b478638ea2
Progress message: Writing script publish_binary/478990217-cmd.bat
PrimaryInput: (null)
PrimaryOutput: File:[[<execution_root>]bazel-out/x64_windows-fastbuild/bin]publish_binary/478990217-cmd.bat
Owner information: ConfiguredTargetKey{label=//publish_binary:publish_self_contained, config=BuildConfigurationValue.Key[2d025b54d1e798337c54da69c5ab51e6e250f93e5d6a812a4f1f0030d6869a75]}, ConfiguredTargetKey{label=//publish_binary:publish_not_self_contained, config=BuildConfigurationValue.Key[2d025b54d1e798337c54da69c5ab51e6e250f93e5d6a812a4f1f0030d6869a75]}
MandatoryInputs: are equal
Outputs: are equal
I'll test the fix when I get the time but it looks like it should fix it.
from bazel-lib.
Related Issues (20)
- [FR]: Propagate Tags to Tar HOT 1
- [FR]: write_source_files and write_source_file shall support select()
- [FR]: Tar should add !gzip:timestamp option when compress = gzip
- [Bug]: bsdtar toolchain fails on macOS if host tar is gnutar HOT 2
- [FR]: Support Expanding a filegroup via a rule HOT 2
- [Bug]: `mtree_spec` rule does not encode filenames with special characters HOT 7
- [FR]: Update libarchive to >= 3.7.1 HOT 1
- [Bug]: tar generates incorrect mtree for aspect_rules_js runfiles HOT 1
- [Bug]: unable to use expand_template in v2 HOT 1
- [Bug]: Cannot define custom `coreutils_toolchain`
- [Bug]: xz not found with new statically linked bsdtar HOT 5
- [Bug]: expand_template FORMATTED_DATE
- [FR]: `squash_tars` rule HOT 2
- [FR]: use sha256 instead of sha386 for integrity?
- [Bug]: 2.7.3 broke coreutils on x86 MacOS
- [Bug]: bsdtar.exe fails to run on windows: libcrypto dll not found HOT 1
- [Bug]: bazel-lib v1.42.3 appears to contain incorrect libxml reference
- [Bug]: `mtree_spec` generates incorrect spec file if the root directory has a file and a directory HOT 3
- [Bug]: expand_template with stamp = 1 ignores changes to volatile-status.txt
- [FR]: Simple example of using `run_binary()` with `out_dirs`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-lib.