Skip to content

Commit

Permalink
review feedback 2
Browse files Browse the repository at this point in the history
  • Loading branch information
thempatel committed Jun 27, 2022
1 parent 351b604 commit 272b85b
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion internal/go_repository_tools_srcs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GO_REPOSITORY_TOOLS_SRCS = [
"@bazel_gazelle//label:label.go",
"@bazel_gazelle//language:BUILD.bazel",
"@bazel_gazelle//language/go:BUILD.bazel",
"@bazel_gazelle//language/go:build_tags.go",
"@bazel_gazelle//language/go:build_constraints.go",
"@bazel_gazelle//language/go:config.go",
"@bazel_gazelle//language/go:constants.go",
"@bazel_gazelle//language/go:dep.go",
Expand Down
8 changes: 4 additions & 4 deletions language/go/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ std_package_list(
go_library(
name = "go",
srcs = [
"build_tags.go",
"build_constraints.go",
"config.go",
"constants.go",
"dep.go",
Expand Down Expand Up @@ -56,7 +56,7 @@ go_library(
go_test(
name = "go_test",
srcs = [
"build_tags_test.go",
"build_constraints_test.go",
"config_test.go",
"fileinfo_go_test.go",
"fileinfo_test.go",
Expand Down Expand Up @@ -91,8 +91,8 @@ filegroup(
testonly = True,
srcs = [
"BUILD.bazel",
"build_tags.go",
"build_tags_test.go",
"build_constraints.go",
"build_constraints_test.go",
"config.go",
"config_test.go",
"constants.go",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (b *buildTags) empty() bool {
return len(b.rawTags) == 0
}

// dropNegationForIgnoredTags wil drop negations for any concrete tags that should be ignored.
// dropNegationForIgnoredTags drops negations for any concrete tags that should be ignored.
// This is done to ensure that when ignored tags are evaluated, they can always return true
// without having to worry that the result will be negated later on. Ignored tags should always
// evaluate to true, regardless of whether they are negated or not leaving the final evaluation
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions language/go/testdata/platforms/BUILD.want
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ go_library(
"cgo_generic.go",
"cgo_linux.c",
"cgo_linux.go",
"constraints_dual_cgo.go",
"constraints_dual_no_cgo.go",
"constraints_verify_demorgans_law.go",
"generic.go",
"new_tag_a.go",
"no_cgo.go",
Expand All @@ -18,9 +21,6 @@ go_library(
"tag_a.go",
"tag_d.go",
"tag_l.go",
"tags_dual_cgo.go",
"tags_dual_no_cgo.go",
"tags_verify_demorgans_law.go",
],
_gazelle_imports = [
"example.com/repo/platforms/generic",
Expand Down
7 changes: 7 additions & 0 deletions language/go/testdata/platforms/constraints_dual_cgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build cgo
// +build !appengine
//
// cgo && !appengine == true ∵
// cgo == true && appengine == undefined

package platforms
6 changes: 6 additions & 0 deletions language/go/testdata/platforms/constraints_dual_no_cgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// +build !cgo appengine
//
// !cgo || appengine == true ∵
// !cgo == true

package platforms
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !(go1.15 || go1.14)

//
// ≡ go1.15 && go1.14 == true
package platforms
4 changes: 0 additions & 4 deletions language/go/testdata/platforms/tags_dual_cgo.go

This file was deleted.

3 changes: 0 additions & 3 deletions language/go/testdata/platforms/tags_dual_no_cgo.go

This file was deleted.

0 comments on commit 272b85b

Please sign in to comment.