go/build: allow Import to ignore build constraints #15396
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
There's no way at the moment to use
Import
orImportDir
to select all the files in package ignoring build constraints. There is thePackage.IgnoredGoFiles
field, but that does not extend to finding the dependencies of the ignored files, and so requires extra parsing steps.One use case for this is in situations like App Engine: we want to select all the source files for an app, but not exclude source file that would be needed to compile a package in other/future versions of Go. So, we want to select files ignoring any go1.x tags.
/cc @dsymonds @adg
The text was updated successfully, but these errors were encountered: