-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: wildcard should consistently match package with invalid build tags #41410
Comments
Change https://golang.org/cl/305670 mentions this issue: |
On tip, messages are now identical. Some refactoring took place and has aligned behavior.
|
Is there anything else to do here? |
Maybe a test of the specific |
It's good that the behavior is now consistent, but it would be better for |
This may be fixed incidentally when we address #45827. |
On tip (go1.17-b5df4522e6), the behavior is described in the earlier comment is unchanged. Regarding listing modules, the flag
|
The behavior described in the issue is fixed as expected in the above comment
|
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?
Create a package in GOPATH with one file containing an invalid build tag.
Run the two commands below from the module directory in GOPATH mode and module mode.
What did you expect to see?
Package
m
listed by both commands in both modes.What did you see instead?
In GOPATH mode:
In module mode:
The
modload
package uses different code to match package patterns and directory patterns. It looks like the package pattern matching code ignores files with invalid tags, so the directory appears to contain no files. We should include those files instead and maybe report errors later when loading packages.The text was updated successfully, but these errors were encountered: