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.20.1 #122082

Closed
wants to merge 31 commits into from
Closed

go 1.20.1 #122082

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8147174
go 1.20.1
billinghamj Feb 1, 2023
bf6ce5e
go@1.19 1.19.6 (new formula)
billinghamj Feb 1, 2023
32a06e7
go-critic: revision bump (go 1.20)
billinghamj Feb 1, 2023
13dca20
golangci-lint: revision bump (go 1.20)
billinghamj Feb 1, 2023
5c6966c
goplus: build/run with go@1.19
chenrui333 Feb 3, 2023
aa88752
doggo: add quic-go dependency update
chenrui333 Feb 3, 2023
520d823
ibazel: update test
chenrui333 Feb 3, 2023
9805fb8
gomplate: build with go@1.19
chenrui333 Feb 3, 2023
5ec9877
liqoctl: build with go@1.19
chenrui333 Feb 3, 2023
94aaa6e
logcli: build with go@1.19
chenrui333 Feb 3, 2023
5035af7
loki: build with go@1.19
chenrui333 Feb 3, 2023
1069e69
promtail: build with go@1.19
chenrui333 Feb 3, 2023
876256e
totp-cli: update test
chenrui333 Feb 3, 2023
6ac34e1
whalebrew: update sha
chenrui333 Feb 3, 2023
8f1ddcf
xray 1.7.5
chenrui333 Feb 3, 2023
42c1675
skaffold: update sha
chenrui333 Feb 3, 2023
e5831c6
autorestic: update sha
chenrui333 Feb 3, 2023
f97f762
k3d: build with go1.19
chenrui333 Feb 3, 2023
9670948
pumba: update sha
chenrui333 Feb 3, 2023
a691c53
cloudflared: build with go@1.19
alebcay Feb 17, 2023
99ed550
erigon: build with go@1.19
alebcay Feb 17, 2023
7fa4d7d
gost: build with go@1.19
alebcay Feb 17, 2023
aac5acd
ooniprobe: build with go@1.19
alebcay Feb 17, 2023
899afad
storj-uplink: build with go@1.19
alebcay Feb 17, 2023
e09f0ab
syncthing: build with go@1.19
alebcay Feb 17, 2023
fafd89b
kt-connect: build with go@1.19
alebcay Feb 17, 2023
5956c97
algernon: build with go@1.19
alebcay Feb 17, 2023
af2e785
ipfs: build with go@1.19
alebcay Feb 19, 2023
b77ed2d
counterfeiter: revision bump for go 1.20
alebcay Feb 19, 2023
be89068
staticcheck: revision bump for go 1.20
alebcay Feb 19, 2023
6f65b25
gcsfuse: build with go@1.19
alebcay Feb 20, 2023
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.
5 changes: 4 additions & 1 deletion Formula/algernon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class Algernon < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "1fb0615287ba76cf2372cc91154d458c881d175e877b4140eeab7487282a7269"
end

depends_on "go" => :build
# Support for go 1.20 is merged upstream but not yet landed in a tag:
# https://github.com/xyproto/algernon/commit/00f29f8bcd0da772041a96fa9b57f7e1e21a6654
# Remove on next release.
depends_on "go@1.19" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "-mod=vendor"
Expand Down
2 changes: 1 addition & 1 deletion Formula/autorestic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Autorestic < Formula
desc "High level CLI utility for restic"
homepage "https://autorestic.vercel.app/"
url "https://github.com/cupcakearmy/autorestic/archive/v1.7.5.tar.gz"
sha256 "a043610608bfea6bdbcf018cf3a4344c0d5e3bed86db5e0c92a676d8d3fafd55"
sha256 "8fef2ac2e4de39a4c4e0668133455c1c30dd2a4b002f872a29a37dd44e321d80"
license "Apache-2.0"
head "https://github.com/cupcakearmy/autorestic.git", branch: "master"

Expand Down
3 changes: 2 additions & 1 deletion Formula/cloudflared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Cloudflared < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "cf2e729603eb85d8274d5504b58d3aa13fec98244e5a3e0bdcf5b231a0cf713f"
end

depends_on "go" => :build
# https://github.com/cloudflare/cloudflared/issues/888
depends_on "go@1.19" => :build

def install
system "make", "install",
Expand Down
1 change: 1 addition & 0 deletions Formula/counterfeiter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Counterfeiter < Formula
url "https://github.com/maxbrunsfeld/counterfeiter/archive/refs/tags/v6.6.1.tar.gz"
sha256 "33cde81680e6694da451862233e20270581fb40d3c490efb67c4b5e3a3ad885e"
license "MIT"
revision 1
head "https://github.com/maxbrunsfeld/counterfeiter.git", branch: "master"

bottle do
Expand Down
14 changes: 12 additions & 2 deletions Formula/doggo.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
class Doggo < Formula
desc "Command-line DNS Client for Humans"
homepage "https://doggo.mrkaran.dev/"
url "https://github.com/mr-karan/doggo/archive/refs/tags/v0.5.5.tar.gz"
sha256 "7ba1340ce46566ca8fa1565ef261519dee5b1c7007aea97eb1f9329f8a3f0403"
license "GPL-3.0-or-later"
revision 1
head "https://github.com/mr-karan/doggo.git", branch: "main"

stable do
url "https://github.com/mr-karan/doggo/archive/refs/tags/v0.5.5.tar.gz"
sha256 "7ba1340ce46566ca8fa1565ef261519dee5b1c7007aea97eb1f9329f8a3f0403"

# patch for quic-go, remove when it is available
patch do
url "https://github.com/mr-karan/doggo/commit/7db5c2144fa4a3f18afe1c724b9367b03f84aed7.patch?full_index=1"
sha256 "e34f71e6618817edfd0d7b01657a407e9573e74a7ea89d048abc95bac46bb21e"
end
end

bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "1b52a39277350522f9bf6e5d466942c488b4ff28451470a4514163f1f0c1c621"
sha256 cellar: :any_skip_relocation, arm64_monterey: "e9efde0974a3c99bc20547bb46a859e1bc16e7a9fe51258203901ae527f2e9f8"
Expand Down
5 changes: 4 additions & 1 deletion Formula/erigon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ class Erigon < Formula
end

depends_on "gcc" => :build
depends_on "go" => :build
# Support for go 1.20 is merged upstream but not yet landed in a tag:
# https://github.com/ledgerwatch/erigon/pull/6848
# Remove on next release.
depends_on "go@1.19" => :build
depends_on "make" => :build

conflicts_with "ethereum", because: "both install `evm` binaries"
Expand Down
3 changes: 2 additions & 1 deletion Formula/gcsfuse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class Gcsfuse < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "696f0b6e8108d249b272c2bcca1f4ac292af48ba775ffc57254e3f2afdda3cd4"
end

depends_on "go" => :build
# gcc-11: The build tool has reset ENV; --env=std required.
depends_on "go@1.19" => :build
depends_on "libfuse"
depends_on :linux # on macOS, requires closed-source macFUSE

Expand Down
1 change: 1 addition & 0 deletions Formula/go-critic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class GoCritic < Formula
url "https://github.com/go-critic/go-critic/archive/refs/tags/v0.6.7.tar.gz"
sha256 "f97572991de7c4a3c2aec7b32c6b73dd3b423d964d33c3102b65b5086b47bca5"
license "MIT"
revision 1
head "https://github.com/go-critic/go-critic.git", branch: "master"

livecheck do
Expand Down
19 changes: 9 additions & 10 deletions Formula/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.19.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.19.6.src.tar.gz"
sha256 "d7f0013f82e6d7f862cc6cb5c8cdb48eef5f2e239b35baa97e2f1a7466043767"
url "https://go.dev/dl/go1.20.1.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.20.1.src.tar.gz"
sha256 "b5c1a3af52c385a6d1c76aed5361cf26459023980d0320de7658bae3915831a2"
license "BSD-3-Clause"
head "https://go.googlesource.com/go.git", branch: "master"

Expand All @@ -25,10 +25,10 @@ class Go < Formula
# Don't update this unless this version cannot bootstrap the new version.
resource "gobootstrap" do
checksums = {
"darwin-arm64" => "4dac57c00168d30bbd02d95131d5de9ca88e04f2c5a29a404576f30ae9b54810",
"darwin-amd64" => "6000a9522975d116bf76044967d7e69e04e982e9625330d9a539a8b45395f9a8",
"linux-arm64" => "3770f7eb22d05e25fbee8fb53c2a4e897da043eb83c69b9a14f8d98562cd8098",
"linux-amd64" => "013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2",
"darwin-arm64" => "e4ccc9c082d91eaa0b866078b591fc97d24b91495f12deb3dd2d8eda4e55a6ea",
"darwin-amd64" => "c101beaa232e0f448fab692dc036cd6b4677091ff89c4889cc8754b1b29c6608",
"linux-arm64" => "914daad3f011cc2014dea799bb7490442677e4ad6de0b2ac3ded6cee7e3f493d",
"linux-amd64" => "4cdd2bc664724dc7db94ad51b503512c5ae7220951cac568120f64f8e94399fc",
}

arch = "arm64"
Expand All @@ -42,7 +42,7 @@ class Go < Formula
platform = "linux"
end

boot_version = "1.16"
boot_version = "1.17.13"

url "https://storage.googleapis.com/golang/go#{boot_version}.#{platform}-#{arch}.tar.gz"
version boot_version
Expand All @@ -55,10 +55,9 @@ def install

cd "src" do
ENV["GOROOT_FINAL"] = libexec
system "./make.bash", "--no-clean"
system "./make.bash"
end

(buildpath/"pkg/obj").rmtree
rm_rf "gobootstrap" # Bootstrap not required beyond compile.
libexec.install Dir["*"]
bin.install_symlink Dir[libexec/"bin/go*"]
Expand Down
85 changes: 85 additions & 0 deletions Formula/go@1.19.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
class GoAT119 < Formula
desc "Open source programming language to build simple/reliable/efficient software"
homepage "https://go.dev/"
url "https://go.dev/dl/go1.19.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.19.6.src.tar.gz"
sha256 "d7f0013f82e6d7f862cc6cb5c8cdb48eef5f2e239b35baa97e2f1a7466043767"
license "BSD-3-Clause"

livecheck do
url "https://go.dev/dl/"
regex(/href=.*?go[._-]?v?(1\.19(?:\.\d+)*)[._-]src\.t/i)
end

keg_only :versioned_formula

# Don't update this unless this version cannot bootstrap the new version.
resource "gobootstrap" do
checksums = {
"darwin-arm64" => "4dac57c00168d30bbd02d95131d5de9ca88e04f2c5a29a404576f30ae9b54810",
"darwin-amd64" => "6000a9522975d116bf76044967d7e69e04e982e9625330d9a539a8b45395f9a8",
"linux-arm64" => "3770f7eb22d05e25fbee8fb53c2a4e897da043eb83c69b9a14f8d98562cd8098",
"linux-amd64" => "013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2",
}

arch = "arm64"
platform = "darwin"

on_intel do
arch = "amd64"
end

on_linux do
platform = "linux"
end

boot_version = "1.16"

url "https://storage.googleapis.com/golang/go#{boot_version}.#{platform}-#{arch}.tar.gz"
version boot_version
sha256 checksums["#{platform}-#{arch}"]
end

def install
(buildpath/"gobootstrap").install resource("gobootstrap")
ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap"

cd "src" do
ENV["GOROOT_FINAL"] = libexec
system "./make.bash", "--no-clean"
end

(buildpath/"pkg/obj").rmtree
rm_rf "gobootstrap" # Bootstrap not required beyond compile.
libexec.install Dir["*"]
bin.install_symlink Dir[libexec/"bin/go*"]

system bin/"go", "install", "-race", "std"

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

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

import "fmt"

func main() {
fmt.Println("Hello World")
}
EOS
# 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")

ENV["GOOS"] = "freebsd"
ENV["GOARCH"] = "amd64"
system bin/"go", "build", "hello.go"
end
end
1 change: 1 addition & 0 deletions Formula/golangci-lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class GolangciLint < Formula
tag: "v1.51.2",
revision: "3e8facb4949586ba9e5dccdd2f9f0fe727a5e335"
license "GPL-3.0-only"
revision 1
head "https://github.com/golangci/golangci-lint.git", branch: "master"

bottle do
Expand Down
4 changes: 3 additions & 1 deletion Formula/gomplate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class Gomplate < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "f44f0319eb88531404a40470c8f3f351c543e328c90fffbf1e89985664ed2a78"
end

depends_on "go" => :build
# upstream issue report, https://github.com/hairyhenderson/gomplate/issues/1614
# update to use go@1.20 when the issue is resolved
depends_on "go@1.19" => :build

def install
system "make", "build", "VERSION=#{version}"
Expand Down
6 changes: 5 additions & 1 deletion Formula/goplus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Goplus < Formula
url "https://github.com/goplus/gop/archive/v1.1.3.tar.gz"
sha256 "11e676f1ff4a391248747bad9d4c1673d366fcf306bd3e185fee5870afd02fee"
license "Apache-2.0"
revision 1
head "https://github.com/goplus/gop.git", branch: "main"

bottle do
Expand All @@ -17,7 +18,8 @@ class Goplus < Formula
sha256 x86_64_linux: "4142d7d0efe2f3693c04737fc4858e5b4ceadabaf54209842126340b8bf129e3"
end

depends_on "go"
# Move to go1.20 once https://github.com/goplus/gop/issues/1350 is resolved
depends_on "go@1.19"

def install
ENV["GOPROOT_FINAL"] = libexec
Expand All @@ -28,6 +30,8 @@ def install
end

test do
ENV["GOROOT"] = Formula["go@1.19"].opt_libexec

(testpath/"hello.gop").write <<~EOS
println("Hello World")
EOS
Expand Down
5 changes: 4 additions & 1 deletion Formula/gost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class Gost < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "6c5a2ba36a5267f2e249f8645998d0707e6f20ca5134c1f88a16370d2900d9c2"
end

depends_on "go" => :build
# Support for go 1.20 is merged upstream but not yet landed in a tag:
# https://github.com/ginuerzh/gost/commit/0f7376bd10c913c7e6b1e7e02dd5fd7769975d78
# Remove on next release.
depends_on "go@1.19" => :build

def install
system "go", "build", *std_go_args, "./cmd/gost"
Expand Down
6 changes: 3 additions & 3 deletions Formula/ibazel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def install

http_archive(
name = "io_bazel_rules_go",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
],
)

Expand Down
5 changes: 4 additions & 1 deletion Formula/ipfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class Ipfs < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "58ecd9f387e58a58e78ba10370fcbb1f41dbe37e0325766f5a0751a7303fd87b"
end

depends_on "go" => :build
# Support for go 1.20 is merged upstream but not yet landed in a tag:
# https://github.com/ipfs/kubo/pull/9647
# Remove on next release.
depends_on "go@1.19" => :build

def install
system "make", "build"
Expand Down
3 changes: 2 additions & 1 deletion Formula/k3d.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class K3d < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "b54a5483a88662242d44450a2d0a22e200ad22543bf2d3e8e5818e1b40715b20"
end

depends_on "go" => :build
# upstream issue, https://github.com/k3d-io/k3d/issues/1207
depends_on "go@1.19" => :build

def install
require "net/http"
Expand Down
3 changes: 2 additions & 1 deletion Formula/kt-connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class KtConnect < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "ea73a5753cf517434033739d0055511adc1fa8786e1d247da71aa7837e72f14d"
end

depends_on "go" => :build
# https://github.com/alibaba/kt-connect/issues/398
depends_on "go@1.19" => :build

def install
ldflags = "-s -w -X main.version=#{version}"
Expand Down
3 changes: 2 additions & 1 deletion Formula/liqoctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class Liqoctl < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "5aa043426f8a164d4f35d6216fc1ac8039454849d5114d44e6db0298b36225cc"
end

depends_on "go" => :build
# upstream issue, https://github.com/liqotech/liqo/issues/1657
depends_on "go@1.19" => :build

def install
ENV["CGO_ENABLED"] = "0"
Expand Down
3 changes: 2 additions & 1 deletion Formula/logcli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class Logcli < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "e412c9cb2ed612d31330ce6199953e0e408ae27f61c720602102d5723ce79efd"
end

depends_on "go" => :build
# https://github.com/grafana/loki/issues/8399
depends_on "go@1.19" => :build
depends_on "loki" => :test

resource "testdata" do
Expand Down
3 changes: 2 additions & 1 deletion Formula/loki.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class Loki < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "b3e390c5294886b1bb4db6c98cb6eba5f2ba98fa63ce8e2fdcfba55e13a959ea"
end

depends_on "go" => :build
# https://github.com/grafana/loki/issues/8399
depends_on "go@1.19" => :build

def install
cd "cmd/loki" do
Expand Down
4 changes: 3 additions & 1 deletion Formula/ooniprobe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class Ooniprobe < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "89324bb339716a74d32e30a5236d6fbe0eca5aa855d0856466a795aa784d418f"
end

depends_on "go" => :build
# Upstream does not support go 1.20 yet and recommends using a specific Go version:
# https://github.com/ooni/probe-cli#build-instructions
depends_on "go@1.19" => :build
depends_on "tor"

def install
Expand Down
3 changes: 2 additions & 1 deletion Formula/promtail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class Promtail < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "2c874f61a5c459aeeb973459ebd3551cb5092b105e54d8050118a1869d98b0f3"
end

depends_on "go" => :build
# https://github.com/grafana/loki/issues/8399
depends_on "go@1.19" => :build

on_linux do
depends_on "systemd"
Expand Down
2 changes: 1 addition & 1 deletion Formula/pumba.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Pumba < Formula
desc "Chaos testing tool for Docker"
homepage "https://github.com/alexei-led/pumba"
url "https://github.com/alexei-led/pumba/archive/0.9.7.tar.gz"
sha256 "e880c4fe28fbd04df8b71bd2acf6a8740f01578e5f67c801058e639d7dfb46c2"
sha256 "844f600da305577db726cd2b97295608641a462a5e1c457de14af216e4540fe4"
license "Apache-2.0"
head "https://github.com/alexei-led/pumba.git", branch: "master"

Expand Down
Loading