-
-
Notifications
You must be signed in to change notification settings - Fork 13.4k
go@1.21 1.21.7 (new formula) #162713
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
Merged
Merged
go@1.21 1.21.7 (new formula) #162713
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
def9d1d
go@1.21 1.21.7 (new formula)
stefanb 41105e1
clair: build with go@1.21
stefanb 2472016
coder: build with go@1.21
stefanb 73cabdb
grafana: build with go@1.21
stefanb 2c891f0
grafana-agent: build with go@1.21
stefanb 63bad93
juicefs: build with go@1.21
stefanb 446bbd3
clair: update 4.7.2 bottle.
p-linnane 68996b1
coder: update 2.8.2 bottle.
p-linnane 147f4ba
go@1.21: add 1.21.7 bottle.
p-linnane 16f1e04
grafana: update 10.3.3 bottle.
p-linnane 78c3ae6
grafana-agent: update 0.39.2 bottle.
p-linnane 9994dd7
juicefs: update 1.1.2 bottle.
p-linnane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| class GoAT121 < Formula | ||
| desc "Open source programming language to build simple/reliable/efficient software" | ||
| homepage "https://go.dev/" | ||
| url "https://go.dev/dl/go1.21.7.src.tar.gz" | ||
| mirror "https://fossies.org/linux/misc/go1.21.7.src.tar.gz" | ||
chenrui333 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sha256 "00197ab20f33813832bff62fd93cca1c42a08cc689a32a6672ca49591959bff6" | ||
| license "BSD-3-Clause" | ||
|
|
||
| livecheck do | ||
| url "https://go.dev/dl/?mode=json" | ||
| regex(/^go[._-]?v?(1\.21(?:\.\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 | ||
| ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" | ||
|
|
||
| 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 | ||
| (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") | ||
|
|
||
| with_env(GOOS: "freebsd", GOARCH: "amd64") do | ||
| system bin/"go", "build", "hello.go" | ||
| end | ||
|
|
||
| (testpath/"hello_cgo.go").write <<~EOS | ||
| package main | ||
|
|
||
| /* | ||
| #include <stdlib.h> | ||
| #include <stdio.h> | ||
| void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); } | ||
| */ | ||
| import "C" | ||
|
|
||
| func main() { | ||
| C.hello() | ||
| } | ||
| EOS | ||
|
|
||
| # 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also include the patch to ship with go1.22, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patching go.mod / go.sum is prone to conflicts, so we'd have to make a new patch specifically for the old release commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are > 100 commits since the last release, confirming my suspicion: quay/clair@v4.7.2...main