Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Handle cycles from XTestImports #16

Open
timstclair opened this issue Aug 12, 2016 · 1 comment
Open

Handle cycles from XTestImports #16

timstclair opened this issue Aug 12, 2016 · 1 comment
Labels

Comments

@timstclair
Copy link
Contributor

Tests can have a different package from the package they're testing, such as with the stdlib package http / http_test (not to be confused with httptest). The most common reason for this structure is to avoid import cycles,

Currently we include both TestImpors and XTestImports when IncludeTests is set, which can cause the godepq dependency graph to have cycles. Cycles in the graph are problematic for functions like DepthLast.

@timstclair timstclair added the bug label Aug 12, 2016
@dmitshur
Copy link
Member

The most common reason for this structure is to avoid import cycles,

Hmm, I thought external tests were done to make it easier to test exported APIs of packages (i.e., you can be confident that an external package doesn't accidentally rely on some private unexported functionality). I didn't realize it had much to do with import cycles.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants