Skip to content

Commit 331aaf7

Browse files
authored
Merge pull request #432 from symflower/go-1.24.1
Upgrade Go to 1.24.1 (from 1.23.6) and all Go packages
2 parents 95acdcd + a7592ca commit 331aaf7

25 files changed

+279
-138
lines changed

.github/workflows/job-lint.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ jobs:
1111
- name: Set up Go
1212
uses: actions/setup-go@v5
1313
with:
14-
go-version: "1.23.6"
15-
16-
- name: Install ack
17-
run: sudo apt-get update && sudo apt-get install -y ack-grep
18-
shell: bash # Explicitly use Bash because otherwise failing Windows jobs are not erroring.
19-
20-
- name: Install testing linting
21-
run: make install-tools-linting
22-
shell: bash # Explicitly use Bash because otherwise failing Windows jobs are not erroring.
14+
go-version-file: "go.mod"
2315

2416
- name: Lint
2517
run: make lint

.github/workflows/job-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: "1.23.6"
24+
go-version-file: "go.mod"
2525

2626
- name: Set up Java
2727
uses: actions/setup-java@v4
@@ -61,7 +61,6 @@ jobs:
6161

6262
- name: Install testing tools
6363
run: |
64-
make install-tools-testing
6564
go run scripts/github-ci/main.go
6665
shell: bash # Explicitly use Bash because otherwise failing Windows jobs are not erroring.
6766

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ ENV JAVA_HOME="/app/.eval-dev-quality/amazon-corretto-11.0.24.8.1-linux-x64"
9090
ENV PATH="${PATH}:${JAVA_HOME}/bin"
9191

9292
# Install Go.
93-
RUN wget https://go.dev/dl/go1.23.6.linux-amd64.tar.gz && \
94-
tar -xf go1.23.6.linux-amd64.tar.gz -C /app/.eval-dev-quality/ && \
95-
rm go1.23.6.linux-amd64.tar.gz
93+
RUN wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && \
94+
tar -xf go1.24.1.linux-amd64.tar.gz -C /app/.eval-dev-quality/ && \
95+
rm go1.24.1.linux-amd64.tar.gz
9696
ENV PATH="${PATH}:/app/.eval-dev-quality/go/bin"
9797
ENV GOROOT="/app/.eval-dev-quality/go"
9898
ENV PATH="${PATH}:/home/ubuntu/go/bin"
@@ -108,5 +108,4 @@ RUN sed -i "s/args: \[\(.*\)\]/args: [\1, '--single-process']/" /home/ubuntu/.np
108108
# Install the binary.
109109
COPY --from=builder --chown=ubuntu:ubuntu /app/eval-dev-quality /app/.eval-dev-quality/bin/
110110
ENV PATH="${PATH}:/app/.eval-dev-quality/bin"
111-
RUN make install-tools-testing
112111
RUN make install-tools /app/.eval-dev-quality/bin

Makefile

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,23 @@ install: # [Go package] - # Build and install everything, or only the specified
4747
go install -v -ldflags="$(GO_LDFLAGS)" $(PACKAGE)
4848
.PHONY: install
4949

50-
install-all: install install-tools install-tools-linting install-tools-testing # Install everything for and of this repository.
50+
install-all: install install-tools # Install everything for and of this repository.
5151
.PHONY: install-all
5252

5353
install-tools: # Install tools that are required for running the evaluation.
54+
go install -v gotest.tools/[email protected]
5455
eval-dev-quality install-tools $(if $(ARGS), --install-tools-path $(word 1,$(ARGS)))
5556
.PHONY: install-tools
5657

57-
install-tools-linting: # Install tools that are used for linting.
58-
go install -v github.com/kisielk/[email protected]
59-
go install -v github.com/mgechev/[email protected]
60-
go install -v golang.org/x/tools/cmd/[email protected] # Aligned with version `gopls/v0.17.1`.
61-
go install -v honnef.co/go/tools/cmd/[email protected]
62-
.PHONY: install-tools-linting
63-
64-
install-tools-testing: # Install tools that are used for testing.
65-
go install -v github.com/vektra/mockery/[email protected]
66-
go install -v gotest.tools/[email protected]
67-
.PHONY: install-tools-testing
68-
6958
generate: # Run code generation.
70-
mockery
59+
go tool github.com/vektra/mockery/v2
7160
.PHONY: generate
7261

7362
lint: # Check repository.
74-
errcheck ./...
63+
go tool github.com/kisielk/errcheck ./...
7564
go vet ./...
76-
revive -config $(ROOT_DIR)/conf/language/golang/revive.toml -set_exit_status ./...
77-
staticcheck ./...
65+
go tool github.com/mgechev/revive -config $(ROOT_DIR)/conf/language/golang/revive.toml -set_exit_status ./...
66+
go tool honnef.co/go/tools/cmd/staticcheck ./...
7867
go run scripts/deadcode/main.go
7968
.PHONY: lint
8069

@@ -93,5 +82,5 @@ require-clean-worktree: # Check if there are uncommitted changes.
9382

9483
test: # [<Go package] - # Test everything, or only the specified package.
9584
@# WORKAROUND We run all tests sequentially until we have a better concurrency-safe solution for Ollama.
96-
gotestsum --format standard-verbose --hide-summary skipped -- $(NO_UNIT_TEST_CACHE) -p 1 -race -test.timeout $(UNIT_TEST_TIMEOUT)s -test.run='$(word 2,$(ARGS))' -v $(if $(ARGS), $(word 1,$(ARGS)), $(PACKAGE))
85+
go tool gotest.tools/gotestsum --format standard-verbose --hide-summary skipped -- $(NO_UNIT_TEST_CACHE) -p 1 -race -test.timeout $(UNIT_TEST_TIMEOUT)s -test.run='$(word 2,$(ARGS))' -v $(if $(ARGS), $(word 1,$(ARGS)), $(PACKAGE))
9786
.PHONY: test

cmd/eval-dev-quality/cmd/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func Execute(logger *log.Logger, arguments []string) {
7676
if parser.Active == nil {
7777
var sb strings.Builder
7878
parser.WriteHelp(&sb)
79-
logger.PrintfWithoutMeta(sb.String())
79+
logger.PrintWithoutMeta(sb.String())
8080
}
8181
}
8282

evaluate/evaluate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ func TestEvaluate(t *testing.T) {
570570
ExpectedResultFiles: map[string]func(t *testing.T, filePath string, data string){
571571
"evaluation.log": nil,
572572
filepath.Join(string(evaluatetask.IdentifierWriteTests), log.CleanModelNameForFileSystem(mockedModelID), "golang", "golang", "plain", "evaluation.log"): func(t *testing.T, filePath, data string) {
573-
assert.Contains(t, data, "DONE 0 tests, 1 error")
573+
assert.Contains(t, data, "DONE 0 tests, 1 failure, 1 error")
574574
},
575575
"evaluation.csv": nil,
576576
},

evaluate/task/transpile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ func TestTranspileRun(t *testing.T) {
606606
},
607607
ExpectedProblemContains: []string{
608608
"expected 'package', found invalid",
609-
"A fatal error happened. Please take a look at the logs", // This is `symflower fix` unable to read the broken Go file.
609+
"expected 'package', found invalid",
610610
},
611611
ValidateLog: func(t *testing.T, data string) {
612612
assert.Contains(t, data, "expected 'package', found invalid")

evaluate/task/write-test_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ func TestWriteTestsRun(t *testing.T) {
302302
}
303303
expectedProblems := []string{
304304
"expected declaration, found this",
305-
"unable to format source code",
306305
"expected declaration, found this",
307-
"unable to format source code",
306+
"expected declaration, found this",
307+
"expected declaration, found this",
308308
}
309309
validateGo(t, "Model generated test that is unfixable", &golang.Language{}, bytesutil.StringTrimIndentations(`
310310
package plain

go.mod

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,89 @@
11
module github.com/symflower/eval-dev-quality
22

3-
go 1.23.6
3+
go 1.24.1
44

55
require (
6+
github.com/Masterminds/semver/v3 v3.3.1
67
github.com/avast/retry-go v3.0.0+incompatible
7-
github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df
8+
github.com/google/uuid v1.6.0
9+
github.com/jessevdk/go-flags v1.6.1
810
github.com/kr/pretty v0.3.1
911
github.com/pkg/errors v0.9.1
10-
github.com/sashabaranov/go-openai v1.36.2-0.20250131190529-45aa99607be0
12+
github.com/sashabaranov/go-openai v1.38.0
1113
github.com/stretchr/testify v1.10.0
1214
github.com/symflower/lockfile v0.0.0-20240419143922-aa3b60940c84
13-
github.com/zimmski/osutil v1.4.0
14-
golang.org/x/exp v0.0.0-20250207012021-f9890c6ad9f3
15-
golang.org/x/mod v0.23.0
16-
gonum.org/v1/gonum v0.15.0 // WORKAROUND v0.15.1 is only supported for Go 1.22+ so explicitly use v0.15.0 to stick with our older Go version.
15+
github.com/zimmski/osutil v1.7.1
16+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
17+
golang.org/x/mod v0.24.0
18+
gonum.org/v1/gonum v0.16.0
1719
)
1820

1921
require (
20-
github.com/Masterminds/semver/v3 v3.3.1
21-
github.com/google/uuid v1.6.0
22-
)
23-
24-
require (
25-
github.com/davecgh/go-spew v1.1.1 // indirect
22+
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
23+
github.com/bitfield/gotestdox v0.2.2 // indirect
24+
github.com/chavacava/garif v0.1.0 // indirect
25+
github.com/chigopher/pathlib v0.19.1 // indirect
26+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
27+
github.com/dnephin/pflag v1.0.7 // indirect
28+
github.com/fatih/color v1.18.0 // indirect
29+
github.com/fatih/structtag v1.2.0 // indirect
30+
github.com/fsnotify/fsnotify v1.8.0 // indirect
31+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
32+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
33+
github.com/hashicorp/go-version v1.7.0 // indirect
34+
github.com/huandu/xstrings v1.5.0 // indirect
35+
github.com/iancoleman/strcase v0.3.0 // indirect
36+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
37+
github.com/jinzhu/copier v0.4.0 // indirect
38+
github.com/kisielk/errcheck v1.9.0 // indirect
2639
github.com/kr/text v0.2.0 // indirect
40+
github.com/mattn/go-colorable v0.1.14 // indirect
41+
github.com/mattn/go-isatty v0.0.20 // indirect
42+
github.com/mattn/go-runewidth v0.0.16 // indirect
43+
github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect
44+
github.com/mgechev/revive v1.7.0 // indirect
2745
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
28-
github.com/pmezard/go-difflib v1.0.0 // indirect
46+
github.com/mitchellh/go-homedir v1.1.0 // indirect
47+
github.com/mitchellh/mapstructure v1.5.0 // indirect
48+
github.com/olekukonko/tablewriter v0.0.5 // indirect
49+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
50+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
2951
github.com/rivo/uniseg v0.4.7 // indirect
30-
github.com/rogpeppe/go-internal v1.9.0 // indirect
52+
github.com/rogpeppe/go-internal v1.14.1 // indirect
53+
github.com/rs/zerolog v1.33.0 // indirect
54+
github.com/sagikazarmark/locafero v0.8.0 // indirect
3155
github.com/schollz/progressbar/v3 v3.18.0 // indirect
56+
github.com/sourcegraph/conc v0.3.0 // indirect
57+
github.com/spf13/afero v1.14.0 // indirect
58+
github.com/spf13/cast v1.7.1 // indirect
59+
github.com/spf13/cobra v1.9.1 // indirect
60+
github.com/spf13/pflag v1.0.6 // indirect
61+
github.com/spf13/viper v1.20.0 // indirect
3262
github.com/stretchr/objx v0.5.2 // indirect
63+
github.com/subosito/gotenv v1.6.0 // indirect
64+
github.com/symflower/pretty v1.0.0 // indirect
3365
github.com/termie/go-shutil v0.0.0-20140729215957-bcacb06fecae // indirect
3466
github.com/ulikunitz/xz v0.5.12 // indirect
35-
github.com/yuin/goldmark v1.7.0 // indirect
36-
golang.org/x/sys v0.30.0 // indirect
37-
golang.org/x/term v0.29.0 // indirect
67+
github.com/vektra/mockery/v2 v2.53.2 // indirect
68+
github.com/yuin/goldmark v1.7.8 // indirect
69+
go.uber.org/multierr v1.11.0 // indirect
70+
golang.org/x/exp/typeparams v0.0.0-20250305212735-054e65f0b394 // indirect
71+
golang.org/x/sync v0.12.0 // indirect
72+
golang.org/x/sys v0.31.0 // indirect
73+
golang.org/x/telemetry v0.0.0-20250310203348-fdfaad844314 // indirect
74+
golang.org/x/term v0.30.0 // indirect
75+
golang.org/x/text v0.23.0 // indirect
76+
golang.org/x/tools v0.31.0 // indirect
3877
gopkg.in/yaml.v3 v3.0.1 // indirect
78+
gotest.tools/gotestsum v1.12.1 // indirect
79+
honnef.co/go/tools v0.6.1 // indirect
80+
)
81+
82+
tool (
83+
github.com/kisielk/errcheck
84+
github.com/mgechev/revive
85+
github.com/vektra/mockery/v2
86+
golang.org/x/tools/cmd/deadcode
87+
gotest.tools/gotestsum
88+
honnef.co/go/tools/cmd/staticcheck
3989
)

0 commit comments

Comments
 (0)