Hey! If output files of `pants package` have confl...
# general
f
Hey! If output files of
pants package
have conflicting
output_paths
from different targets, the error message is quite non-descriptive if they are packaged in the same run.
Copy code
return await native_engine.merge_digests(merge_digests)
native_engine.IntrinsicError: Can only merge Directories with no duplicates, but found 2 duplicate entries in :

`package.jar`: 1.) file digest=70ffd33d6571851b2b7d07533133208bbfb401c8c849d6df16aa9093b78b0060 size=135727339:
...
`package.jar`: 2.) file digest=a68995ce6865daa9b661e6453186406736591c3288306b42ab0dff383e34df7b size=99110466:
For one that it's not an issue with actual duplicates, but rather with conflicting paths, and also it's not very clear from the error that it is even the final output files that are conflicting (other than by file names). Maybe it could be worth describing a bit more what goes wrong here when it is trying to write multiple target packages to a conflicting distribution file-path? The root case here was not realizing the interpolated variables that namespace outputs by target path that are otherwise included by default for various
output_path
parameters.
There's another error about actual duplicates, as in identical hashes, so that is why that was a bit confusing