-
Notifications
You must be signed in to change notification settings - Fork 1k
gps doesn't handle directories with multiple packages #114
Comments
@freeformz points out that this issue is not specific to |
yeah we hit something like this too: sdboyer/gps#147 idk if related I had a generate build ignore file in a dir too |
I actually did write special handling for this because of this idiom, and it should be working now. The problem, as someone just recently raised in the gps queue (sdboyer/gps#138), is that it doesn't work if there's > 1 file with I definitely want proper support for this idiom, which means making it work no matter how many such files exist. As that issue describes, there's a hack we could implement to fix things "for now," though doing it properly is part of a larger planned refactor. What's interesting about this case, and what I don't feel like I there's an obvious right answer to, is whether the imports from such main/ignored files should be included in analysis. |
Should be all fixed up now |
This fixes windows path errors (golang#103), and ignore-d main files (golang#114).
Introduce 'requires'
This fixes windows path errors (golang#103), and ignore-d main files (golang#114).
A common idiom for packages with generated code is to include a file named something like
gen.go
that containsThese are then invoked with
go generate
. When doing agps.ListPackages
, the analysis of that package will fail with a*build.MultiplePackageError
.We need to be able to handle this. Should
build ignore
be handled specially?The text was updated successfully, but these errors were encountered: