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

go 1.24.0, go@1.23 1.23.6 (new formula) #201070

Merged
merged 6 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
File renamed without changes.
16 changes: 8 additions & 8 deletions Formula/g/go.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Go < Formula
desc "Open source programming language to build simple/reliable/efficient software"
homepage "https://go.dev/"
url "https://go.dev/dl/go1.23.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
url "https://go.dev/dl/go1.24.0.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.24.0.src.tar.gz"
sha256 "d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5"
license "BSD-3-Clause"
head "https://go.googlesource.com/go.git", branch: "master"

Expand Down Expand Up @@ -32,13 +32,13 @@ class Go < Formula
# Don't update this unless this version cannot bootstrap the new version.
resource "gobootstrap" do
checksums = {
"darwin-arm64" => "6da3f76164b215053daf730a9b8f1d673dbbaa4c61031374a6744b75cb728641",
"darwin-amd64" => "754363489e2244e72cb49b4ec6ddfd6a2c60b0700f8c4876e11befb1913b11c5",
"linux-arm64" => "2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b",
"linux-amd64" => "ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44",
"darwin-arm64" => "416c35218edb9d20990b5d8fc87be655d8b39926f15524ea35c66ee70273050d",
"darwin-amd64" => "e7bbe07e96f0bd3df04225090fe1e7852ed33af37c43a23e16edbbb3b90a5b7c",
"linux-arm64" => "fd017e647ec28525e86ae8203236e0653242722a7436929b1f775744e26278e7",
"linux-amd64" => "4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43",
}

version "1.20.14"
version "1.22.12"

on_arm do
on_macos do
Expand Down
86 changes: 86 additions & 0 deletions Formula/g/go@1.23.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
class GoAT123 < Formula

Check notice on line 1 in Formula/g/go@1.23.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for go@1.23 built at 034937ae365 (Merge 3e674fd50eb8cbb90fefdcecc06afd3ce0aedceb into a9f9b9e62ac4e2b2717fab67474cf5bc067dd293, 2025-02-04)

Check notice on line 1 in Formula/g/go@1.23.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for go@1.23 built at 034937ae365 (Merge 3e674fd50eb8cbb90fefdcecc06afd3ce0aedceb into a9f9b9e62ac4e2b2717fab67474cf5bc067dd293, 2025-02-04)

Check notice on line 1 in Formula/g/go@1.23.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for go@1.23 built at 034937ae365 (Merge 3e674fd50eb8cbb90fefdcecc06afd3ce0aedceb into a9f9b9e62ac4e2b2717fab67474cf5bc067dd293, 2025-02-04)
desc "Open source programming language to build simple/reliable/efficient software"
homepage "https://go.dev/"
url "https://go.dev/dl/go1.23.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
license "BSD-3-Clause"

livecheck do
url "https://go.dev/dl/?mode=json"
regex(/^go[._-]?v?(1\.23(?:\.\d+)*)[._-]src\.t.+$/i)
strategy :json do |json, regex|
json.map do |release|
next if release["stable"] != true
next if release["files"].none? { |file| file["filename"].match?(regex) }

release["version"][/(\d+(?:\.\d+)+)/, 1]
end
end
end

keg_only :versioned_formula

depends_on "go" => :build

def install
cd "src" do
ENV["GOROOT_FINAL"] = libexec
# Set portable defaults for CC/CXX to be used by cgo
with_env(CC: "cc", CXX: "c++") { system "./make.bash" }
end

libexec.install Dir["*"]
bin.install_symlink Dir[libexec/"bin/go*"]

system bin/"go", "install", "std", "cmd"

# Remove useless files.
# Breaks patchelf because folder contains weird debug/test files
rm_r(libexec/"src/debug/elf/testdata")
# Binaries built for an incompatible architecture
rm_r(libexec/"src/runtime/pprof/testdata")
end

test do
(testpath/"hello.go").write <<~GO
package main

import "fmt"

func main() {
fmt.Println("Hello World")
}
GO

# Run go fmt check for no errors then run the program.
# This is a a bare minimum of go working as it uses fmt, build, and run.
system bin/"go", "fmt", "hello.go"
assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go")

with_env(GOOS: "freebsd", GOARCH: "amd64") do
system bin/"go", "build", "hello.go"
end

(testpath/"hello_cgo.go").write <<~GO
package main

/*
#include <stdlib.h>
#include <stdio.h>
void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); }
*/
import "C"

func main() {
C.hello()
}
GO

# Try running a sample using cgo without CC or CXX set to ensure that the
# toolchain's default choice of compilers work
with_env(CC: nil, CXX: nil) do
assert_equal "Hello from cgo!\n", shell_output("#{bin}/go run hello_cgo.go")
end
end
end
1 change: 1 addition & 0 deletions Formula/g/govulncheck.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
class Govulncheck < Formula

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)

Check notice on line 1 in Formula/g/govulncheck.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for govulncheck built at ad3cc6b65f4 (Merge e80c6708220a1841ebcadba3bd2022ec79d1403a into f765a94e3f6a61c44b764f50ecee453ff452f9bb, 2025-02-06)
desc "Database client and tools for the Go vulnerability database"
homepage "https://github.com/golang/vuln"
url "https://github.com/golang/vuln/archive/refs/tags/v1.1.4.tar.gz"
sha256 "da1a7f3224cf874325814dd198eaa42897143fc871226a04944583cb121a15c9"
license "BSD-3-Clause"
revision 1

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
Expand Down
Loading