Skip to content

Commit eb7086b

Browse files
authored
Merge pull request #413 from symflower/go-1.23.6
Upgrade Go to 1.23.6 (from 1.21.5)
2 parents d2683d5 + a802b52 commit eb7086b

File tree

25 files changed

+92
-42
lines changed

25 files changed

+92
-42
lines changed

.github/workflows/job-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Go
1212
uses: actions/setup-go@v5
1313
with:
14-
go-version: '1.21'
14+
go-version: "1.23.6"
1515

1616
- name: Install ack
1717
run: sudo apt-get update && sudo apt-get install -y ack-grep

.github/workflows/job-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: '1.21'
24+
go-version: "1.23.6"
2525

2626
- name: Set up Java
2727
uses: actions/setup-java@v4
2828
with:
29-
distribution: 'corretto'
30-
java-version: '11'
29+
distribution: "corretto"
30+
java-version: "11"
3131

3232
- name: Set up Maven
3333
uses: stCarolas/setup-maven@v5
3434
with:
35-
maven-version: '3.9.1'
35+
maven-version: "3.9.1"
3636

3737
- name: Set up Ruby
3838
uses: ruby/setup-ruby@v1
3939
with:
40-
ruby-version: '3.3.4'
40+
ruby-version: "3.3.4"
4141

4242
- name: Set up Git
4343
run: |

Dockerfile

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

6666
# Install Go
67-
RUN wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && \
68-
tar -xf go1.21.5.linux-amd64.tar.gz -C /app/.eval-dev-quality/ && \
69-
rm go1.21.5.linux-amd64.tar.gz
67+
RUN wget https://go.dev/dl/go1.23.6.linux-amd64.tar.gz && \
68+
tar -xf go1.23.6.linux-amd64.tar.gz -C /app/.eval-dev-quality/ && \
69+
rm go1.23.6.linux-amd64.tar.gz
7070
ENV PATH="${PATH}:/app/.eval-dev-quality/go/bin"
7171
ENV GOROOT="/app/.eval-dev-quality/go"
7272
ENV PATH="${PATH}:/home/ubuntu/go/bin"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ install-tools: # Install tools that are required for running the evaluation.
5757
install-tools-linting: # Install tools that are used for linting.
5858
go install -v github.com/kisielk/[email protected]
5959
go install -v github.com/mgechev/[email protected]
60-
go install -v golang.org/x/tools/cmd/deadcode@v0.16.1
60+
go install -v golang.org/x/tools/cmd/deadcode@v0.27.1-0.20241219162658-575221bfbda3 # Aligned with version `gopls/v0.17.1`.
6161
go install -v honnef.co/go/tools/cmd/[email protected]
6262
.PHONY: install-tools-linting
6363

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,10 @@ func (command *Evaluate) evaluateDocker(ctx *evaluate.Context) (err error) {
629629
Command: cmd,
630630
})
631631
if err != nil {
632-
ctx.Log.Error("ERROR: Unable to pull image", pkgerrors.WithMessage(pkgerrors.WithStack(err), commandOutput))
632+
ctx.Log.Error(
633+
"ERROR: unable to pull image",
634+
"error", pkgerrors.WithMessage(pkgerrors.WithStack(err), commandOutput),
635+
)
633636
}
634637
}
635638

evaluate/task/symflower.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func symflowerTemplate(logger *log.Logger, repositoryPath string, language langu
5959
// ExecuteWithSymflowerFix runs the "symflower fix" command and calculates the new assessments.
6060
func ExecuteWithSymflowerFix(ctx evaltask.Context, logger *log.Logger, packagePath string) (testResult *language.TestResult, processingTime uint64, problems []error, err error) {
6161
// Run "symflower fix" if the model response fails to execute.
62-
logger.Info("model response alone failed execution, attempting to fix with \"symflower fix \"")
62+
logger.Info("model response alone failed execution, attempting to fix with \"symflower fix\"")
6363

6464
duration, err := symflowerFix(logger, packagePath, ctx.Language)
6565
if err != nil {

evaluate/task/write-test_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestWriteTestsRun(t *testing.T) {
4444

4545
repositoryPath := filepath.Join(temporaryDirectoryPath, "golang", "plain")
4646
require.NoError(t, os.MkdirAll(repositoryPath, 0700))
47-
require.NoError(t, os.WriteFile(filepath.Join(repositoryPath, "go.mod"), []byte("module plain\n\ngo 1.21.5"), 0600))
47+
require.NoError(t, os.WriteFile(filepath.Join(repositoryPath, "go.mod"), []byte("module plain\n\ngo 1.23.6"), 0600))
4848
require.NoError(t, os.WriteFile(filepath.Join(repositoryPath, "caseA.go"), []byte("package plain\n\nfunc caseA(){}"), 0600))
4949
require.NoError(t, os.WriteFile(filepath.Join(repositoryPath, "caseB.go"), []byte("package plain\n\nfunc caseB(){}"), 0600))
5050

go.mod

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

3-
go 1.21.5
3+
go 1.23.6
44

55
require (
66
github.com/avast/retry-go v3.0.0+incompatible
77
github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df
88
github.com/kr/pretty v0.3.1
99
github.com/pkg/errors v0.9.1
1010
github.com/sashabaranov/go-openai v1.36.2-0.20250131190529-45aa99607be0
11-
github.com/stretchr/testify v1.9.0
11+
github.com/stretchr/testify v1.10.0
1212
github.com/symflower/lockfile v0.0.0-20240419143922-aa3b60940c84
13-
github.com/zimmski/osutil v1.3.0
14-
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
15-
golang.org/x/mod v0.16.0
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
1616
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.
1717
)
1818

1919
require (
20-
github.com/Masterminds/semver/v3 v3.3.1 // indirect
20+
github.com/Masterminds/semver/v3 v3.3.1
21+
github.com/google/uuid v1.6.0
22+
)
23+
24+
require (
2125
github.com/davecgh/go-spew v1.1.1 // indirect
22-
github.com/google/uuid v1.6.0 // indirect
2326
github.com/kr/text v0.2.0 // indirect
2427
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
2528
github.com/pmezard/go-difflib v1.0.0 // indirect
2629
github.com/rivo/uniseg v0.4.7 // indirect
2730
github.com/rogpeppe/go-internal v1.9.0 // indirect
28-
github.com/schollz/progressbar/v3 v3.14.2 // indirect
31+
github.com/schollz/progressbar/v3 v3.18.0 // indirect
2932
github.com/stretchr/objx v0.5.2 // indirect
3033
github.com/termie/go-shutil v0.0.0-20140729215957-bcacb06fecae // indirect
31-
github.com/ulikunitz/xz v0.5.11 // indirect
34+
github.com/ulikunitz/xz v0.5.12 // indirect
3235
github.com/yuin/goldmark v1.7.0 // indirect
33-
golang.org/x/sys v0.18.0 // indirect
34-
golang.org/x/term v0.18.0 // indirect
36+
golang.org/x/sys v0.30.0 // indirect
37+
golang.org/x/term v0.29.0 // indirect
3538
gopkg.in/yaml.v3 v3.0.1 // indirect
3639
)

go.sum

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,54 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
2727
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
2828
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
2929
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
30-
github.com/sashabaranov/go-openai v1.20.4 h1:095xQ/fAtRa0+Rj21sezVJABgKfGPNbyx/sAN/hJUmg=
31-
github.com/sashabaranov/go-openai v1.20.4/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
3230
github.com/sashabaranov/go-openai v1.36.2-0.20250131190529-45aa99607be0 h1:WlepprDHs6tUt2/ihnvTL7DvXpO6IOllVP+oPWn2U0k=
3331
github.com/sashabaranov/go-openai v1.36.2-0.20250131190529-45aa99607be0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
3432
github.com/schollz/progressbar/v3 v3.14.2 h1:EducH6uNLIWsr560zSV1KrTeUb/wZGAHqyMFIEa99ks=
3533
github.com/schollz/progressbar/v3 v3.14.2/go.mod h1:aQAZQnhF4JGFtRJiw/eobaXpsqpVQAftEQ+hLGXaRc4=
34+
github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=
35+
github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
3636
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
3737
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
3838
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
3939
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
4040
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
4141
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
42+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
43+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
4244
github.com/symflower/lockfile v0.0.0-20240419143922-aa3b60940c84 h1:yhPz6r3LLBDjoV0rIDUlyuvWQg9L4MTfdksLVX6/q0s=
4345
github.com/symflower/lockfile v0.0.0-20240419143922-aa3b60940c84/go.mod h1:W/87GmsQmvlsvcXeuAlTGjIpTHrTTHDEIVH936LjnqI=
4446
github.com/termie/go-shutil v0.0.0-20140729215957-bcacb06fecae h1:vgGSvdW5Lqg+I1aZOlG32uyE6xHpLdKhZzcTEktz5wM=
4547
github.com/termie/go-shutil v0.0.0-20140729215957-bcacb06fecae/go.mod h1:quDq6Se6jlGwiIKia/itDZxqC5rj6/8OdFyMMAwTxCs=
4648
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
4749
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
50+
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
51+
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
4852
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
4953
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
50-
github.com/zimmski/osutil v1.2.0 h1:M0Xau+QdEIN0urgr7RZUqgs5dxsT1pDJ3/mDqd7uexk=
51-
github.com/zimmski/osutil v1.2.0/go.mod h1:TZrA1ZvRIeylQ0ECaANmCVlT0WR/62zJxMdQX9SyLvY=
5254
github.com/zimmski/osutil v1.3.0 h1:433lf7bULKaZGBVtBI0j0Nt6t9mveo0vXEnTpD7jidw=
5355
github.com/zimmski/osutil v1.3.0/go.mod h1:TZrA1ZvRIeylQ0ECaANmCVlT0WR/62zJxMdQX9SyLvY=
56+
github.com/zimmski/osutil v1.4.0 h1:tEFk3Q5A9h3xi5XglgZ7GN+tpk7bgd8KUlWD5ki2V4E=
57+
github.com/zimmski/osutil v1.4.0/go.mod h1:e19OGVlot2UkwWHwcOFu5FeSNF3/TLMNeGcZcCy5UDg=
5458
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw=
5559
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ=
60+
golang.org/x/exp v0.0.0-20250207012021-f9890c6ad9f3 h1:qNgPs5exUA+G0C96DrPwNrvLSj7GT/9D+3WMWUcUg34=
61+
golang.org/x/exp v0.0.0-20250207012021-f9890c6ad9f3/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
5662
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
5763
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
64+
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
65+
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
5866
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
5967
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6068
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6169
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
6270
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
71+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
72+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6373
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
6474
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
6575
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
76+
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
77+
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
6678
gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ=
6779
gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo=
6880
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

language/golang/language.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ func parseSymflowerTestOutput(data string) (testsTotal int, testsPass int, err e
140140
}
141141
}
142142
testsPass = testsTotal - testsFail
143+
if testsPass < 0 { // Go does not count tests on syntax errors, but marks it as a failing test. This results in total tests 0 minus failing tess 1, hence, -1. Passing tests should be always >=0.
144+
testsPass = 0
145+
}
143146

144147
return testsTotal, testsPass, nil
145148
}

0 commit comments

Comments
 (0)