Skip to content

Commit 702f3ba

Browse files
author
Jay Conrod
authored
Support Go 1.16 (#2821)
Fixes #2820 --- tests: partial cherry-pick of test change in #2730 The Go 1.16 linker appears stricter about fingerprinting. This test no longer works, but the behavior being tested was never supported. Sync with the test on master, which always expects an error.
1 parent de231ef commit 702f3ba

File tree

2 files changed

+18
-26
lines changed

2 files changed

+18
-26
lines changed

go/private/sdk_list.bzl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,25 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
DEFAULT_VERSION = "1.15.8"
15+
DEFAULT_VERSION = "1.16"
1616

1717
MIN_SUPPORTED_VERSION = "1.13"
1818

1919
SDK_REPOSITORIES = {
20+
"1.16": {
21+
"darwin_amd64": ("go1.16.darwin-amd64.tar.gz", "6000a9522975d116bf76044967d7e69e04e982e9625330d9a539a8b45395f9a8"),
22+
"darwin_arm64": ("go1.16.darwin-arm64.tar.gz", "4dac57c00168d30bbd02d95131d5de9ca88e04f2c5a29a404576f30ae9b54810"),
23+
"freebsd_386": ("go1.16.freebsd-386.tar.gz", "d7d6c70b05a7c2f68b48aab5ab8cb5116b8444c9ddad131673b152e7cff7c726"),
24+
"freebsd_amd64": ("go1.16.freebsd-amd64.tar.gz", "40b03216f6945fb6883a50604fc7f409a83f62171607229a9c598e701e684f8a"),
25+
"linux_386": ("go1.16.linux-386.tar.gz", "ea435a1ac6d497b03e367fdfb74b33e961d813883468080f6e239b3b03bea6aa"),
26+
"linux_amd64": ("go1.16.linux-amd64.tar.gz", "013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2"),
27+
"linux_arm64": ("go1.16.linux-arm64.tar.gz", "3770f7eb22d05e25fbee8fb53c2a4e897da043eb83c69b9a14f8d98562cd8098"),
28+
"linux_arm": ("go1.16.linux-armv6l.tar.gz", "d1d9404b1dbd77afa2bdc70934e10fbfcf7d785c372efc29462bb7d83d0a32fd"),
29+
"linux_ppc64le": ("go1.16.linux-ppc64le.tar.gz", "27a1aaa988e930b7932ce459c8a63ad5b3333b3a06b016d87ff289f2a11aacd6"),
30+
"linux_s390x": ("go1.16.linux-s390x.tar.gz", "be4c9e4e2cf058efc4e3eb013a760cb989ddc4362f111950c990d1c63b27ccbe"),
31+
"windows_386": ("go1.16.windows-386.zip", "481492a17d42193d471b93b7a06da3555331bd833b76336afc87be820c48933f"),
32+
"windows_amd64": ("go1.16.windows-amd64.zip", "5cc88fa506b3d5c453c54c3ea218fc8dd05d7362ae1de15bb67986b72089ce93"),
33+
},
2034
"1.15.8": {
2135
"darwin_amd64": ("go1.15.8.darwin-amd64.tar.gz", "7df8977d3befd2ec41479abed1c93aac93cb320dcbe4808950d28948911da854"),
2236
"freebsd_386": ("go1.15.8.freebsd-386.tar.gz", "46fbf0fe03910569113989bf608e56f847df685efccdcee29d8ab3b9752211f8"),

tests/core/go_binary/package_conflict_test.go

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -113,30 +113,8 @@ func main() {
113113
})
114114
}
115115

116-
func runTest(t *testing.T, expectError bool, extraArgs ...string) {
117-
args := append([]string{"build", "//:main"}, extraArgs...)
118-
119-
err := bazel_testing.RunBazel(args...)
120-
if expectError {
121-
if err == nil {
122-
t.Fatal("Expected error")
123-
}
124-
} else {
125-
if err != nil {
126-
t.Fatal(err)
127-
}
116+
func TestPackageConflict(t *testing.T) {
117+
if err := bazel_testing.RunBazel("build", "//:main"); err == nil {
118+
t.Fatal("Expected error")
128119
}
129120
}
130-
131-
func TestDefaultBehaviour(t *testing.T) {
132-
// TODO(#1374): Default to `true`.
133-
runTest(t, false)
134-
}
135-
136-
func TestPackageConflictIsWarning(t *testing.T) {
137-
runTest(t, false, "--@io_bazel_rules_go//go/config:incompatible_package_conflict_is_error=False")
138-
}
139-
140-
func TestPackageConflictIsError(t *testing.T) {
141-
runTest(t, true, "--@io_bazel_rules_go//go/config:incompatible_package_conflict_is_error=True")
142-
}

0 commit comments

Comments
 (0)