Skip to content

Commit 91494be

Browse files
authored
Merge pull request Homebrew#258912 from Homebrew/go1.26
go 1.26.0, go@1.25 1.25.7 (new formula)
2 parents e2b174f + f32e0bc commit 91494be

4 files changed

Lines changed: 127 additions & 22 deletions

File tree

File renamed without changes.

Formula/g/go.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ class Go < Formula
22
desc "Open source programming language to build simple/reliable/efficient software"
33
homepage "https://go.dev/"
44
license "BSD-3-Clause"
5-
revision 1
6-
compatibility_version 1
5+
compatibility_version 2
76
head "https://go.googlesource.com/go.git", branch: "master"
87

98
stable do
10-
url "https://go.dev/dl/go1.25.7.src.tar.gz"
11-
mirror "https://fossies.org/linux/misc/go1.25.7.src.tar.gz"
12-
sha256 "178f2832820274b43e177d32f06a3ebb0129e427dd20a5e4c88df2c1763cf10a"
9+
url "https://go.dev/dl/go1.26.0.src.tar.gz"
10+
mirror "https://fossies.org/linux/misc/go1.26.0.src.tar.gz"
11+
sha256 "c9132a8a1f6bd2aa4aad1d74b8231d95274950483a4950657ee6c56e6e817790"
1312

1413
# patch to fix pkg-config flag sanitization
14+
# Backport issue https://golang.org/issue/77474, should be included in 1.26.1+.
1515
patch do
1616
url "https://github.com/golang/go/commit/28fbdf7acb4146b5bc3d88128e407d1344691839.patch?full_index=1"
1717
sha256 "2e05f7e16f2320685547a7ebb240163a8b7f1c7bf9d2f6dc4872ff8b27707a35"
@@ -32,26 +32,26 @@ class Go < Formula
3232
end
3333

3434
bottle do
35-
sha256 cellar: :any_skip_relocation, arm64_tahoe: "cce0c9d57104de4957492f01c61ff35388d405d08bbdebe89762afca30cbb6ae"
36-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "cce0c9d57104de4957492f01c61ff35388d405d08bbdebe89762afca30cbb6ae"
37-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "cce0c9d57104de4957492f01c61ff35388d405d08bbdebe89762afca30cbb6ae"
38-
sha256 cellar: :any_skip_relocation, sonoma: "a0584077b91e24fcfc84f2c9f129e63462243edde89d68d79186ae049ca79c2c"
39-
sha256 cellar: :any_skip_relocation, arm64_linux: "557fc542b200bcf95ec86dc4c7297c74930cc76b08aed01753a0e2c6c26c4747"
40-
sha256 cellar: :any_skip_relocation, x86_64_linux: "497e82ed5755329c4e6258b3b77bd7ce7214116f8be7d787ddaa491860eb59df"
35+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "54b39d76b59f388de6f95bef52a6598535165ad72133ca413a5d81c9f87d3633"
36+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "54b39d76b59f388de6f95bef52a6598535165ad72133ca413a5d81c9f87d3633"
37+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "54b39d76b59f388de6f95bef52a6598535165ad72133ca413a5d81c9f87d3633"
38+
sha256 cellar: :any_skip_relocation, sonoma: "e9b8fa3213f0e04234c8d7a0dd54ba4dc198dcf6eb5fd3b96dd8257b51c8b7c5"
39+
sha256 cellar: :any_skip_relocation, arm64_linux: "ab3d100a21cc7a4477ce3911dadaddea17f2963ae8751dc6e2d4f7cc56704559"
40+
sha256 cellar: :any_skip_relocation, x86_64_linux: "4f008aec1edbbe32d582f7610e83d54fcccd8fc5654d0bd830bf3b48d24592cf"
4141
end
4242

4343
depends_on macos: :monterey
4444

4545
# Don't update this unless this version cannot bootstrap the new version.
4646
resource "gobootstrap" do
4747
checksums = {
48-
"darwin-arm64" => "416c35218edb9d20990b5d8fc87be655d8b39926f15524ea35c66ee70273050d",
49-
"darwin-amd64" => "e7bbe07e96f0bd3df04225090fe1e7852ed33af37c43a23e16edbbb3b90a5b7c",
50-
"linux-arm64" => "fd017e647ec28525e86ae8203236e0653242722a7436929b1f775744e26278e7",
51-
"linux-amd64" => "4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43",
48+
"darwin-arm64" => "f282d882c3353485e2fc6c634606d85caf36e855167d59b996dbeae19fa7629a",
49+
"darwin-amd64" => "6cc6549b06725220b342b740497ffd24e0ebdcef75781a77931ca199f46ad781",
50+
"linux-arm64" => "74d97be1cc3a474129590c67ebf748a96e72d9f3a2b6fef3ed3275de591d49b3",
51+
"linux-amd64" => "1fc94b57134d51669c72173ad5d49fd62afb0f1db9bf3f798fd98ee423f8d730",
5252
}
5353

54-
version "1.22.12"
54+
version "1.24.13"
5555

5656
on_arm do
5757
on_macos do

Formula/g/go@1.25.rb

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
class GoAT125 < Formula
2+
desc "Open source programming language to build simple/reliable/efficient software"
3+
homepage "https://go.dev/"
4+
url "https://go.dev/dl/go1.25.7.src.tar.gz"
5+
mirror "https://fossies.org/linux/misc/go1.25.7.src.tar.gz"
6+
sha256 "178f2832820274b43e177d32f06a3ebb0129e427dd20a5e4c88df2c1763cf10a"
7+
license "BSD-3-Clause"
8+
revision 1
9+
compatibility_version 1
10+
11+
livecheck do
12+
url "https://go.dev/dl/?mode=json"
13+
regex(/^go[._-]?v?(1\.25(?:\.\d+)*)[._-]src\.t.+$/i)
14+
strategy :json do |json, regex|
15+
json.map do |release|
16+
next if release["stable"] != true
17+
next if release["files"].none? { |file| file["filename"].match?(regex) }
18+
19+
release["version"][/(\d+(?:\.\d+)+)/, 1]
20+
end
21+
end
22+
end
23+
24+
bottle do
25+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "1b7dbdf302ac420aa8f9f21b80753b42670160344ae8fcd222ed79f5dc4daa55"
26+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "1b7dbdf302ac420aa8f9f21b80753b42670160344ae8fcd222ed79f5dc4daa55"
27+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b7dbdf302ac420aa8f9f21b80753b42670160344ae8fcd222ed79f5dc4daa55"
28+
sha256 cellar: :any_skip_relocation, sonoma: "22393319dcfebad92b53a89259e924f66c7fec7bf56d73f8dd5be88c0e75cb4b"
29+
sha256 cellar: :any_skip_relocation, arm64_linux: "df5032811d797828f11621cdf085d5ab39fafa1127299c95d321773920257de8"
30+
sha256 cellar: :any_skip_relocation, x86_64_linux: "88ee33ff7f5018e16c12a93d4bad41ecfb5ed6b7112cd7a0206b6d69684552e0"
31+
end
32+
33+
keg_only :versioned_formula
34+
35+
depends_on "go" => :build
36+
37+
# patch to fix pkg-config flag sanitization
38+
# Backport issue https://golang.org/issue/77438, should be included in 1.25.8+.
39+
patch do
40+
url "https://github.com/golang/go/commit/28fbdf7acb4146b5bc3d88128e407d1344691839.patch?full_index=1"
41+
sha256 "2e05f7e16f2320685547a7ebb240163a8b7f1c7bf9d2f6dc4872ff8b27707a35"
42+
end
43+
44+
def install
45+
libexec.install Dir["*"]
46+
47+
cd libexec/"src" do
48+
# Set portable defaults for CC/CXX to be used by cgo
49+
with_env(CC: "cc", CXX: "c++") { system "./make.bash" }
50+
end
51+
52+
bin.install_symlink Dir[libexec/"bin/go*"]
53+
54+
# Remove useless files.
55+
# Breaks patchelf because folder contains weird debug/test files
56+
rm_r(libexec/"src/debug/elf/testdata")
57+
# Binaries built for an incompatible architecture
58+
rm_r(libexec/"src/runtime/pprof/testdata")
59+
# Remove testdata with binaries for non-native architectures.
60+
rm_r(libexec/"src/debug/dwarf/testdata")
61+
end
62+
63+
test do
64+
(testpath/"hello.go").write <<~GO
65+
package main
66+
67+
import "fmt"
68+
69+
func main() {
70+
fmt.Println("Hello World")
71+
}
72+
GO
73+
74+
# Run go fmt check for no errors then run the program.
75+
# This is a a bare minimum of go working as it uses fmt, build, and run.
76+
system bin/"go", "fmt", "hello.go"
77+
assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go")
78+
79+
with_env(GOOS: "freebsd", GOARCH: "amd64") do
80+
system bin/"go", "build", "hello.go"
81+
end
82+
83+
(testpath/"hello_cgo.go").write <<~GO
84+
package main
85+
86+
/*
87+
#include <stdlib.h>
88+
#include <stdio.h>
89+
void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); }
90+
*/
91+
import "C"
92+
93+
func main() {
94+
C.hello()
95+
}
96+
GO
97+
98+
# Try running a sample using cgo without CC or CXX set to ensure that the
99+
# toolchain's default choice of compilers work
100+
with_env(CC: nil, CXX: nil, CGO_ENABLED: "1") do
101+
assert_equal "Hello from cgo!\n", shell_output("#{bin}/go run hello_cgo.go")
102+
end
103+
end
104+
end

Formula/g/golangci-lint.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ class GolangciLint < Formula
55
tag: "v2.8.0",
66
revision: "e2e40021c9007020676c93680a36e3ab06c6cd33"
77
license "GPL-3.0-only"
8+
revision 1
89
head "https://github.com/golangci/golangci-lint.git", branch: "main"
910

1011
bottle do
11-
sha256 cellar: :any_skip_relocation, arm64_tahoe: "48a1896101fccaf8eb0e499fa57cfbccccd9bcbd02dac1e21f8588fd62db1d7f"
12-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "27b696d692604a802cb4e854af48cf63b84f90f1a57fdcf4492cccbb32728edd"
13-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ccc525927eeb9b9a4818ab08de8afc24cbaeb0a36d3e8b229c534a1c401361d"
14-
sha256 cellar: :any_skip_relocation, sonoma: "b7e19fc5c021c8221b8a4e659289447a131505c21cd94f467c396a097aaae94f"
15-
sha256 cellar: :any_skip_relocation, arm64_linux: "96e0a07ed2009f86e638aff478ffcd1ee0b2a07557a7e08dd9bbe0e94f2c991c"
16-
sha256 cellar: :any_skip_relocation, x86_64_linux: "e1a68dffae26d225a535a75814790c762750b5e3706ea90643e7ebbaa446db0a"
12+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "55e1da3625cbe8c833f1251026a00d6859169bf971e5b435a3457a7800072869"
13+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2b00bb657e95a9f64c9da1ca77c6a521cf2183330ba066f2cad8d1c700531e5"
14+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "1834d8f6ad0c4e3f1c0e2e91824b50bd46f16edd005617ebd8b5b3c24b22ad3c"
15+
sha256 cellar: :any_skip_relocation, sonoma: "5f991c418194580c9a3de67f3a4cf396f58a4b65dd707da22a06219e96e86ac4"
16+
sha256 cellar: :any_skip_relocation, arm64_linux: "8ec59a2b655f267e4d35e8e0487f57daa4481a713289a0cfa85fe642574a34cf"
17+
sha256 cellar: :any_skip_relocation, x86_64_linux: "1620ecdae111482c2d20d57305eccb8682a9db392db4badbdd0dc12509569dd7"
1718
end
1819

1920
depends_on "go"

0 commit comments

Comments
 (0)