Skip to content
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

Ignore purego build constraint #1767

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions language/go/build_constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ func matchAuto(tokens []string) (*buildTags, error) {
return newBuildTags(x)
}

// isIgnoredTag returns whether the tag is "cgo" or is a release tag.
// isIgnoredTag returns whether the tag is "cgo", "purego", "race", "msan" or is a release tag.
// Release tags match the pattern "go[0-9]\.[0-9]+".
// Gazelle won't consider whether an ignored tag is satisfied when evaluating
// build constraints for a file and will instead defer to the compiler at compile
// time.
func isIgnoredTag(tag string) bool {
if tag == "cgo" || tag == "race" || tag == "msan" {
if tag == "cgo" || tag == "purego" || tag == "race" || tag == "msan" {
fmeum marked this conversation as resolved.
Show resolved Hide resolved
return true
}
if len(tag) < 5 || !strings.HasPrefix(tag, "go") {
Expand Down