Skip to content

Commit 083d03e

Browse files
dmathieuXSAM
andauthored
Add support for go 1.23 (#5720)
Go 1.23 was released a few days ago. https://go.dev/blog/go1.23 This also upgrades golangci-lint (and fixes new issues), since it appears 1.59 doesn't work nicely with Go 1.23. --------- Co-authored-by: Sam Xie <[email protected]>
1 parent b213e25 commit 083d03e

File tree

8 files changed

+74
-67
lines changed

8 files changed

+74
-67
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ on:
33
push:
44
branches:
55
- main
6-
workflow_dispatch:
6+
workflow_dispatch:
77

88
env:
9-
DEFAULT_GO_VERSION: "~1.22.5"
9+
DEFAULT_GO_VERSION: "~1.23.0"
1010
jobs:
1111
benchmark:
1212
name: Benchmarks

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
# backwards compatibility with the previous two minor releases and we
1313
# explicitly test our code for these versions so keeping this at prior
1414
# versions does not add value.
15-
DEFAULT_GO_VERSION: "~1.22.5"
15+
DEFAULT_GO_VERSION: "~1.23.0"
1616
jobs:
1717
lint:
1818
runs-on: ubuntu-latest
@@ -118,7 +118,7 @@ jobs:
118118
compatibility-test:
119119
strategy:
120120
matrix:
121-
go-version: ["~1.22.5", "~1.21.12"]
121+
go-version: ["1.23.0", "~1.22.5", "~1.21.12"]
122122
platform:
123123
- os: ubuntu-latest
124124
arch: "386"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
## [Unreleased]
1010

11+
This release is the last to support [Go 1.21].
12+
The next release will require at least [Go 1.22].
13+
1114
### Added
1215

1316
- Add macOS ARM64 platform to the compatibility testing suite. (#5577)
@@ -17,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1720
See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5629)
1821
- Add `InstrumentationScope` field to `SpanStub` in `go.opentelemetry.io/otel/sdk/trace/tracetest`, as a replacement for the deprecated `InstrumentationLibrary`. (#5627)
1922
- Zero value of `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` no longer panics. (#5665)
23+
- Support [Go 1.23]. (#5720)
2024

2125
### Changed
2226

@@ -3126,6 +3130,7 @@ It contains api and sdk for trace and meter.
31263130

31273131
<!-- Released section ended -->
31283132

3133+
[Go 1.23]: https://go.dev/doc/go1.23
31293134
[Go 1.22]: https://go.dev/doc/go1.22
31303135
[Go 1.21]: https://go.dev/doc/go1.21
31313136
[Go 1.20]: https://go.dev/doc/go1.20

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,25 @@ Currently, this project supports the following environments.
4949

5050
| OS | Go Version | Architecture |
5151
|----------|------------|--------------|
52+
| Ubuntu | 1.23 | amd64 |
5253
| Ubuntu | 1.22 | amd64 |
5354
| Ubuntu | 1.21 | amd64 |
55+
| Ubuntu | 1.23 | 386 |
5456
| Ubuntu | 1.22 | 386 |
5557
| Ubuntu | 1.21 | 386 |
58+
| Linux | 1.23 | arm64 |
5659
| Linux | 1.22 | arm64 |
5760
| Linux | 1.21 | arm64 |
61+
| macOS 13 | 1.23 | amd64 |
5862
| macOS 13 | 1.22 | amd64 |
5963
| macOS 13 | 1.21 | amd64 |
64+
| macOS | 1.23 | arm64 |
6065
| macOS | 1.22 | arm64 |
6166
| macOS | 1.21 | arm64 |
67+
| Windows | 1.23 | amd64 |
6268
| Windows | 1.22 | amd64 |
6369
| Windows | 1.21 | amd64 |
70+
| Windows | 1.23 | 386 |
6471
| Windows | 1.22 | 386 |
6572
| Windows | 1.21 | 386 |
6673

exporters/zipkin/env_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package zipkin
55

66
import (
7-
"os"
87
"testing"
98

109
"github.com/stretchr/testify/assert"
@@ -41,7 +40,7 @@ func TestEnvOrWithCollectorEndpointOptionsFromEnv(t *testing.T) {
4140
}()
4241
for _, tc := range testCases {
4342
t.Run(tc.name, func(t *testing.T) {
44-
require.NoError(t, os.Setenv(envEndpoint, tc.envEndpoint))
43+
t.Setenv(envEndpoint, tc.envEndpoint)
4544

4645
endpoint := envOr(envEndpoint, tc.defaultCollectorEndpoint)
4746

internal/tools/go.mod

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module go.opentelemetry.io/otel/internal/tools
22

3-
go 1.21
3+
go 1.22.1
4+
5+
toolchain go1.23.0
46

57
require (
68
github.com/client9/misspell v0.3.4
79
github.com/gogo/protobuf v1.3.2
8-
github.com/golangci/golangci-lint v1.59.1
10+
github.com/golangci/golangci-lint v1.60.1
911
github.com/itchyny/gojq v0.12.16
1012
github.com/jcchavezs/porto v0.6.0
1113
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
@@ -26,11 +28,11 @@ require (
2628
github.com/Abirdcfly/dupword v0.0.14 // indirect
2729
github.com/Antonboom/errname v0.1.13 // indirect
2830
github.com/Antonboom/nilnil v0.1.9 // indirect
29-
github.com/Antonboom/testifylint v1.3.1 // indirect
30-
github.com/BurntSushi/toml v1.4.0 // indirect
31-
github.com/Crocmagnon/fatcontext v0.2.2 // indirect
31+
github.com/Antonboom/testifylint v1.4.3 // indirect
32+
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
33+
github.com/Crocmagnon/fatcontext v0.4.0 // indirect
3234
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
33-
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect
35+
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect
3436
github.com/Masterminds/semver/v3 v3.2.1 // indirect
3537
github.com/Microsoft/go-winio v0.6.1 // indirect
3638
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
@@ -44,7 +46,7 @@ require (
4446
github.com/beorn7/perks v1.0.1 // indirect
4547
github.com/bkielbasa/cyclop v1.2.1 // indirect
4648
github.com/blizzy78/varnamelen v0.8.0 // indirect
47-
github.com/bombsimon/wsl/v4 v4.2.1 // indirect
49+
github.com/bombsimon/wsl/v4 v4.4.1 // indirect
4850
github.com/breml/bidichk v0.2.7 // indirect
4951
github.com/breml/errchkjson v0.3.6 // indirect
5052
github.com/butuzov/ireturn v0.3.0 // indirect
@@ -83,7 +85,7 @@ require (
8385
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
8486
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
8587
github.com/gobwas/glob v0.2.3 // indirect
86-
github.com/gofrs/flock v0.8.1 // indirect
88+
github.com/gofrs/flock v0.12.1 // indirect
8789
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
8890
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
8991
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect
@@ -107,7 +109,7 @@ require (
107109
github.com/jgautheron/goconst v1.7.1 // indirect
108110
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
109111
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
110-
github.com/jjti/go-spancheck v0.6.1 // indirect
112+
github.com/jjti/go-spancheck v0.6.2 // indirect
111113
github.com/julz/importas v0.1.0 // indirect
112114
github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect
113115
github.com/kevinburke/ssh_config v1.2.0 // indirect
@@ -129,10 +131,10 @@ require (
129131
github.com/mattn/go-colorable v0.1.13 // indirect
130132
github.com/mattn/go-isatty v0.0.20 // indirect
131133
github.com/mattn/go-runewidth v0.0.15 // indirect
132-
github.com/mgechev/revive v1.3.7 // indirect
134+
github.com/mgechev/revive v1.3.9 // indirect
133135
github.com/mitchellh/go-homedir v1.1.0 // indirect
134136
github.com/mitchellh/mapstructure v1.5.0 // indirect
135-
github.com/moricho/tparallel v0.3.1 // indirect
137+
github.com/moricho/tparallel v0.3.2 // indirect
136138
github.com/nakabonne/nestif v0.3.1 // indirect
137139
github.com/nishanths/exhaustive v0.12.0 // indirect
138140
github.com/nishanths/predeclared v0.2.2 // indirect
@@ -141,7 +143,7 @@ require (
141143
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
142144
github.com/pjbgf/sha1cd v0.3.0 // indirect
143145
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
144-
github.com/polyfloyd/go-errorlint v1.5.2 // indirect
146+
github.com/polyfloyd/go-errorlint v1.6.0 // indirect
145147
github.com/prometheus/client_golang v1.19.0 // indirect
146148
github.com/prometheus/client_model v0.6.1 // indirect
147149
github.com/prometheus/common v0.48.0 // indirect
@@ -152,20 +154,20 @@ require (
152154
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
153155
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
154156
github.com/rivo/uniseg v0.4.7 // indirect
155-
github.com/ryancurrah/gomodguard v1.3.2 // indirect
157+
github.com/ryancurrah/gomodguard v1.3.3 // indirect
156158
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
157159
github.com/sagikazarmark/locafero v0.4.0 // indirect
158160
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
159161
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
160162
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
161163
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
162-
github.com/sashamelentyev/usestdlibvars v1.26.0 // indirect
164+
github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect
163165
github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 // indirect
164166
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
165167
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
166168
github.com/sirupsen/logrus v1.9.3 // indirect
167169
github.com/sivchari/containedctx v1.0.3 // indirect
168-
github.com/sivchari/tenv v1.7.1 // indirect
170+
github.com/sivchari/tenv v1.10.0 // indirect
169171
github.com/skeema/knownhosts v1.2.2 // indirect
170172
github.com/sonatard/noctx v0.0.2 // indirect
171173
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -180,7 +182,6 @@ require (
180182
github.com/stretchr/objx v0.5.2 // indirect
181183
github.com/stretchr/testify v1.9.0 // indirect
182184
github.com/subosito/gotenv v1.6.0 // indirect
183-
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
184185
github.com/tdakkota/asciicheck v0.2.0 // indirect
185186
github.com/tetafro/godot v1.4.16 // indirect
186187
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
@@ -189,15 +190,15 @@ require (
189190
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
190191
github.com/ultraware/funlen v0.1.0 // indirect
191192
github.com/ultraware/whitespace v0.1.1 // indirect
192-
github.com/uudashr/gocognit v1.1.2 // indirect
193+
github.com/uudashr/gocognit v1.1.3 // indirect
193194
github.com/xanzy/ssh-agent v0.3.3 // indirect
194195
github.com/xen0n/gosmopolitan v1.2.2 // indirect
195196
github.com/yagipy/maintidx v1.0.0 // indirect
196197
github.com/yeya24/promlinter v0.3.0 // indirect
197198
github.com/ykadowak/zerologlint v0.1.5 // indirect
198199
gitlab.com/bosi/decorder v0.4.2 // indirect
199200
go-simpler.org/musttag v0.12.2 // indirect
200-
go-simpler.org/sloglint v0.7.1 // indirect
201+
go-simpler.org/sloglint v0.7.2 // indirect
201202
go.opentelemetry.io/build-tools v0.14.0 // indirect
202203
go.uber.org/automaxprocs v1.5.3 // indirect
203204
go.uber.org/multierr v1.11.0 // indirect
@@ -215,7 +216,7 @@ require (
215216
gopkg.in/warnings.v0 v0.1.2 // indirect
216217
gopkg.in/yaml.v2 v2.4.0 // indirect
217218
gopkg.in/yaml.v3 v3.0.1 // indirect
218-
honnef.co/go/tools v0.4.7 // indirect
219+
honnef.co/go/tools v0.5.0 // indirect
219220
mvdan.cc/gofumpt v0.6.0 // indirect
220221
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
221222
)

0 commit comments

Comments
 (0)