You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When use_coverage is enabled, Go packages that have <package>_test packaged test files (ie. for the package foo, the tests are in the same folder but are in the foo_test package and import foo, see reproduction repository for an example) causes an IntrinsicError of the following shape when the test goal is run:
IntrinsicError: Can only merge Directories with no duplicates, but found 2 duplicate entries in __pkgs__/foo_pkg_repro:
`__pkg__.a`: 1.) file digest=58ba11fe1afd8ddcccdd2a69c32f391ab4314b10430c13dfc8e00501f2368b5f size=1960:
<snip>
`__pkg__.a`: 2.) file digest=085a4521ca0c1cca011a41fc59dd11487677270df92568eead5cd16548eeb5da size=8798:
<snip>
I'll likely give it a swing some evening when I have a minute, but if someone has any quick pointers as to why duplicate libraries are being built, I'm all ears!
Describe the bug
When
use_coverage
is enabled, Go packages that have<package>_test
packaged test files (ie. for the packagefoo
, the tests are in the same folder but are in thefoo_test
package and importfoo
, see reproduction repository for an example) causes anIntrinsicError
of the following shape when thetest
goal is run:A simple reproduction case can be found at nickbruun/pants-use-coverage-repro. The repository has two commits:
use_coverage
enabled. Failure can be seen in GitHub Actions loguse_coverage
disabled. The successful test run can be seen in GitHub Actions log.Pants version
2.21.1, but confirmed at least as far back as 2.17 (I just hadn't gotten around to reporting it until now -- sorry!)
OS
Reproduced on Linux and MacOS.
Additional info
See nickbruun/pants-use-coverage-repro#1 for evidence that if the test has the non-
_test
package, the test goal succeeds.The following addition to
src/python/pants/backend/go/goals/test_test.py
will reproduce the issue in tests:The text was updated successfully, but these errors were encountered: