-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: suppress errors for 'go get' of package paths whose source files are all excluded by build constraints #33526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It may be that we should suppress the error without |
#40145 is a duplicate of this issue, but that case seems more serious. I think this is happening because
|
Thanks, @jayconrod! Should I ping the protobuf maintainers about this? If this won't be fixed until 1.16, they probably want to work around the issue by moving the file until most developers are on 1.16 or later. FYI @dsnet |
I think it would be good to put in a workaround for this. The file in question, integration_test.go seems like it could be moved out of the root directory. Unfortunately, I think we're too deep in the freeze to land a bug fix for 1.15. Hopefully though that means 1.15 will be out on time and we'll have a longer development window for 1.16! |
As of Go 1.16, We should probably suppress it when the |
Change https://golang.org/cl/297009 mentions this issue: |
@bcmills @jayconrod I'm encountering this issue again with
Edit: I should note that |
@mvdan, interesting! I see the same behavior with
So we must have fixed something else during the 1.17 cycle, but I'm not sure what. |
Should we reopen this temporarily while we investigate, or open a new issue about it? I'll tend to forget about these things if they're buried in a closed issue :) |
Since this doesn't reproduce at head, I'd say no: I don't think we would backport a fix even if we found it, given that it's fairly easy to work around. (You can |
(If it were a regression from 1.15 to 1.16 that would be another matter, but the situation was even worse on 1.15... 😅) |
Fair enough, I'll add a workaround on my end for now - since I do think it's reasonable to |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
(see above)
TLDR genproto has a build constraint at the root (+tools, nothing else at root), but many packages below the root do not have this build constraint. When I use go get in module mode - esp when I provide a version - I expect to only interact with the module system. Instead, it's a weird mix of module and package, and in this case though I wanted to get a module it gave me an error about a package of the same name.
The text was updated successfully, but these errors were encountered: