Skip to content

Commit 017bcc9

Browse files
authored
Merge pull request #3853 from AkihiroSuda/go1.25
CI: use Go 1.25
2 parents 19865ed + 1981788 commit 017bcc9

File tree

40 files changed

+200
-143
lines changed

40 files changed

+200
-143
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3939
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
4040
with:
41-
go-version: 1.24.x
41+
go-version: 1.25.x
4242
- name: Make darwin artifacts
4343
run: make artifacts-darwin
4444
- name: "Upload artifacts"
@@ -65,7 +65,7 @@ jobs:
6565
path: _artifacts/
6666
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
6767
with:
68-
go-version: 1.24.x
68+
go-version: 1.25.x
6969
- name: Install gcc
7070
run: |
7171
sudo apt-get update

.github/workflows/test.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3030
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3131
with:
32-
go-version: 1.24.x
32+
go-version: 1.25.x
3333
- name: Install protoc and Go plugins
3434
run: |
3535
sudo apt-get update
@@ -82,7 +82,7 @@ jobs:
8282
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8383
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
8484
with:
85-
go-version: 1.24.x
85+
go-version: 1.25.x
8686
- id: golangci-lint-version
8787
shell: bash
8888
working-directory: hack/tools
@@ -121,7 +121,7 @@ jobs:
121121
fail-fast: false
122122
matrix:
123123
# For non-Homebrew we have to support an old release of Go
124-
go-version: ["1.23.x", "1.24.x"]
124+
go-version: ["1.24.x", "1.25.x"]
125125
steps:
126126
- name: Install test dependencies
127127
run: |
@@ -181,7 +181,7 @@ jobs:
181181
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
182182
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
183183
with:
184-
go-version: 1.24.x
184+
go-version: 1.25.x
185185
- name: Unit tests
186186
run: go test -v ./...
187187
- name: Make
@@ -209,7 +209,7 @@ jobs:
209209
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
210210
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
211211
with:
212-
go-version: 1.24.x
212+
go-version: 1.25.x
213213
- name: Make
214214
run: make
215215
- name: Install QEMU
@@ -234,7 +234,7 @@ jobs:
234234
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
235235
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
236236
with:
237-
go-version: 1.24.x
237+
go-version: 1.25.x
238238
- name: Unit tests
239239
run: go test -v ./...
240240
- name: Make
@@ -303,7 +303,7 @@ jobs:
303303
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
304304
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
305305
with:
306-
go-version: 1.24.x
306+
go-version: 1.25.x
307307
- name: Make
308308
run: make
309309
- name: Install
@@ -356,7 +356,7 @@ jobs:
356356
ref: ${{ github.event.pull_request.head.sha }}
357357
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
358358
with:
359-
go-version: 1.24.x
359+
go-version: 1.25.x
360360
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
361361
with:
362362
path: ~/.cache/lima/download
@@ -399,7 +399,7 @@ jobs:
399399
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
400400
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
401401
with:
402-
go-version: 1.24.x
402+
go-version: 1.25.x
403403
- name: Make
404404
run: make
405405
- name: Install
@@ -460,7 +460,7 @@ jobs:
460460
filter: tree:0
461461
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
462462
with:
463-
go-version: 1.24.x
463+
go-version: 1.25.x
464464
- name: Cache image used by ${{ matrix.oldver }}/examples/ubuntu-lts.yaml
465465
uses: ./.github/actions/setup_cache_for_template
466466
with:
@@ -494,7 +494,7 @@ jobs:
494494
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
495495
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
496496
with:
497-
go-version: 1.24.x
497+
go-version: 1.25.x
498498
- name: Make
499499
run: make
500500
- name: Install
@@ -527,7 +527,7 @@ jobs:
527527
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
528528
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
529529
with:
530-
go-version: 1.24.x
530+
go-version: 1.25.x
531531
- name: Install gomodjail
532532
run: |
533533
set -eux -o pipefail
@@ -552,7 +552,7 @@ jobs:
552552
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
553553
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
554554
with:
555-
go-version: 1.24.x
555+
go-version: 1.25.x
556556
- run: GOOS=netbsd go build ./...
557557
- run: GOOS=dragonfly go build ./...
558558

@@ -564,7 +564,7 @@ jobs:
564564
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
565565
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
566566
with:
567-
go-version: 1.24.x
567+
go-version: 1.25.x
568568
- name: Make
569569
run: make
570570
- name: Install

cmd/lima-guestagent/daemon_linux.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func newDaemonCommand() *cobra.Command {
3232
}
3333

3434
func daemonAction(cmd *cobra.Command, _ []string) error {
35+
ctx := cmd.Context()
3536
socket := "/run/lima-guestagent.sock"
3637
tick, err := cmd.Flags().GetDuration("tick")
3738
if err != nil {
@@ -86,7 +87,8 @@ func daemonAction(cmd *cobra.Command, _ []string) error {
8687
l = vsockL
8788
logrus.Infof("serving the guest agent on vsock port: %d", vSockPort)
8889
} else {
89-
socketL, err := net.Listen("unix", socket)
90+
var lc net.ListenConfig
91+
socketL, err := lc.Listen(ctx, "unix", socket)
9092
if err != nil {
9193
return err
9294
}

cmd/lima-guestagent/install_systemd_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func newInstallSystemdCommand() *cobra.Command {
3030
}
3131

3232
func installSystemdAction(cmd *cobra.Command, _ []string) error {
33+
ctx := cmd.Context()
3334
vsockPort, err := cmd.Flags().GetInt("vsock-port")
3435
if err != nil {
3536
return err
@@ -66,7 +67,7 @@ func installSystemdAction(cmd *cobra.Command, _ []string) error {
6667
{"try-restart", "lima-guestagent.service"},
6768
}
6869
for _, args := range args {
69-
cmd := exec.Command("systemctl", append([]string{"--system"}, args...)...)
70+
cmd := exec.CommandContext(ctx, "systemctl", append([]string{"--system"}, args...)...)
7071
cmd.Stdout = os.Stdout
7172
cmd.Stderr = os.Stderr
7273
logrus.Infof("Executing: %s", strings.Join(cmd.Args, " "))

cmd/limactl/copy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func newCopyCommand() *cobra.Command {
4848
}
4949

5050
func copyAction(cmd *cobra.Command, args []string) error {
51+
ctx := cmd.Context()
5152
recursive, err := cmd.Flags().GetBool("recursive")
5253
if err != nil {
5354
return err
@@ -161,7 +162,7 @@ func copyAction(cmd *cobra.Command, args []string) error {
161162
}
162163
sshArgs := sshutil.SSHArgsFromOpts(sshOpts)
163164

164-
sshCmd := exec.Command(arg0, append(sshArgs, scpArgs...)...)
165+
sshCmd := exec.CommandContext(ctx, arg0, append(sshArgs, scpArgs...)...)
165166
sshCmd.Stdin = cmd.InOrStdin()
166167
sshCmd.Stdout = cmd.OutOrStdout()
167168
sshCmd.Stderr = cmd.ErrOrStderr()

cmd/limactl/hostagent.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func newHostagentCommand() *cobra.Command {
4040
}
4141

4242
func hostagentAction(cmd *cobra.Command, args []string) error {
43+
ctx := cmd.Context()
4344
pidfile, err := cmd.Flags().GetString("pidfile")
4445
if err != nil {
4546
return err
@@ -117,7 +118,8 @@ func hostagentAction(cmd *cobra.Command, args []string) error {
117118
if err != nil {
118119
return err
119120
}
120-
l, err := net.Listen("unix", socket)
121+
var lc net.ListenConfig
122+
l, err := lc.Listen(ctx, "unix", socket)
121123
logrus.Infof("hostagent socket created at %s", socket)
122124
if err != nil {
123125
return err

cmd/limactl/shell.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func newShellCommand() *cobra.Command {
6060
}
6161

6262
func shellAction(cmd *cobra.Command, args []string) error {
63+
ctx := cmd.Context()
6364
// simulate the behavior of double dash
6465
newArg := []string{}
6566
if len(args) >= 2 && args[1] == "--" {
@@ -254,7 +255,7 @@ func shellAction(cmd *cobra.Command, args []string) error {
254255
"--",
255256
script,
256257
}...)
257-
sshCmd := exec.Command(sshExe.Exe, sshArgs...)
258+
sshCmd := exec.CommandContext(ctx, sshExe.Exe, sshArgs...)
258259
sshCmd.Stdin = os.Stdin
259260
sshCmd.Stdout = os.Stdout
260261
sshCmd.Stderr = os.Stderr

cmd/limactl/tunnel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func newTunnelCommand() *cobra.Command {
4747
}
4848

4949
func tunnelAction(cmd *cobra.Command, args []string) error {
50+
ctx := cmd.Context()
5051
flags := cmd.Flags()
5152
tunnelType, err := flags.GetString("type")
5253
if err != nil {
@@ -108,7 +109,7 @@ func tunnelAction(cmd *cobra.Command, args []string) error {
108109
"-p", strconv.Itoa(inst.SSHLocalPort),
109110
inst.SSHAddress,
110111
}...)
111-
sshCmd := exec.Command(sshExe.Exe, sshArgs...)
112+
sshCmd := exec.CommandContext(ctx, sshExe.Exe, sshArgs...)
112113
sshCmd.Stdout = stderr
113114
sshCmd.Stderr = stderr
114115
logrus.Debugf("executing ssh (may take a long)): %+v", sshCmd.Args)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// gomodjail:confined
22
module github.com/lima-vm/lima/v2
33

4-
go 1.23.0
4+
go 1.24.0
55

66
require (
77
al.essio.dev/pkg/shellescape v1.6.0

hack/tools/go.mod

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tool (
1414

1515
require (
1616
github.com/containerd/ltag v0.3.0
17-
github.com/golangci/golangci-lint/v2 v2.2.2
17+
github.com/golangci/golangci-lint/v2 v2.4.0
1818
github.com/yoheimuta/protolint v0.55.6
1919
google.golang.org/grpc v1.74.2
2020
google.golang.org/protobuf v1.36.7
@@ -25,21 +25,23 @@ require (
2525
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
2626
4d63.com/gochecknoglobals v0.2.2 // indirect
2727
codeberg.org/chavacava/garif v0.2.0 // indirect
28-
github.com/4meepo/tagalign v1.4.2 // indirect
28+
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect
29+
dev.gaijin.team/go/golib v0.6.0 // indirect
30+
github.com/4meepo/tagalign v1.4.3 // indirect
2931
github.com/Abirdcfly/dupword v0.1.6 // indirect
3032
github.com/AlwxSin/noinlineerr v1.0.5 // indirect
3133
github.com/Antonboom/errname v1.1.0 // indirect
3234
github.com/Antonboom/nilnil v1.1.0 // indirect
3335
github.com/Antonboom/testifylint v1.6.1 // indirect
3436
github.com/BurntSushi/toml v1.5.0 // indirect
3537
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
36-
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
3738
github.com/Masterminds/semver/v3 v3.3.1 // indirect
3839
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
39-
github.com/alecthomas/chroma/v2 v2.19.0 // indirect
40+
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
4041
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
4142
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
4243
github.com/alexkohler/prealloc v1.0.0 // indirect
44+
github.com/alfatraining/structtag v1.0.0 // indirect
4345
github.com/alingse/asasalint v0.0.11 // indirect
4446
github.com/alingse/nilnesserr v0.2.0 // indirect
4547
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
@@ -49,7 +51,7 @@ require (
4951
github.com/bkielbasa/cyclop v1.2.3 // indirect
5052
github.com/blizzy78/varnamelen v0.8.0 // indirect
5153
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
52-
github.com/bombsimon/wsl/v5 v5.1.0 // indirect
54+
github.com/bombsimon/wsl/v5 v5.1.1 // indirect
5355
github.com/breml/bidichk v0.3.3 // indirect
5456
github.com/breml/errchkjson v0.4.1 // indirect
5557
github.com/butuzov/ireturn v0.4.0 // indirect
@@ -66,7 +68,7 @@ require (
6668
github.com/chavacava/garif v0.1.0 // indirect
6769
github.com/ckaznocha/intrange v0.3.1 // indirect
6870
github.com/curioswitch/go-reassign v0.3.0 // indirect
69-
github.com/daixiang0/gci v0.13.6 // indirect
71+
github.com/daixiang0/gci v0.13.7 // indirect
7072
github.com/dave/dst v0.27.3 // indirect
7173
github.com/davecgh/go-spew v1.1.1 // indirect
7274
github.com/denis-tingaikin/go-header v0.5.0 // indirect
@@ -129,7 +131,7 @@ require (
129131
github.com/lasiar/canonicalheader v1.1.2 // indirect
130132
github.com/ldez/exptostd v0.4.4 // indirect
131133
github.com/ldez/gomoddirectives v0.7.0 // indirect
132-
github.com/ldez/grignotin v0.9.0 // indirect
134+
github.com/ldez/grignotin v0.10.0 // indirect
133135
github.com/ldez/tagliatelle v0.7.1 // indirect
134136
github.com/ldez/usetesting v0.5.0 // indirect
135137
github.com/leonklingele/grouper v1.1.2 // indirect
@@ -145,15 +147,15 @@ require (
145147
github.com/mattn/go-isatty v0.0.20 // indirect
146148
github.com/mattn/go-runewidth v0.0.16 // indirect
147149
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
148-
github.com/mgechev/revive v1.10.0 // indirect
150+
github.com/mgechev/revive v1.11.0 // indirect
149151
github.com/mitchellh/go-homedir v1.1.0 // indirect
150152
github.com/mitchellh/mapstructure v1.5.0 // indirect
151153
github.com/moricho/tparallel v0.3.2 // indirect
152154
github.com/muesli/termenv v0.16.0 // indirect
153155
github.com/nakabonne/nestif v0.3.1 // indirect
154156
github.com/nishanths/exhaustive v0.12.0 // indirect
155157
github.com/nishanths/predeclared v0.2.2 // indirect
156-
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
158+
github.com/nunnatsa/ginkgolinter v0.20.0 // indirect
157159
github.com/oklog/run v1.2.0 // indirect
158160
github.com/pelletier/go-toml v1.9.5 // indirect
159161
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
@@ -177,10 +179,10 @@ require (
177179
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
178180
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
179181
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
180-
github.com/securego/gosec/v2 v2.22.5 // indirect
182+
github.com/securego/gosec/v2 v2.22.7 // indirect
181183
github.com/sirupsen/logrus v1.9.3 // indirect
182184
github.com/sivchari/containedctx v1.0.3 // indirect
183-
github.com/sonatard/noctx v0.3.5 // indirect
185+
github.com/sonatard/noctx v0.4.0 // indirect
184186
github.com/sourcegraph/go-diff v0.7.0 // indirect
185187
github.com/spf13/afero v1.14.0 // indirect
186188
github.com/spf13/cast v1.5.0 // indirect
@@ -214,20 +216,17 @@ require (
214216
go-simpler.org/sloglint v0.11.1 // indirect
215217
go.augendre.info/arangolint v0.2.0 // indirect
216218
go.augendre.info/fatcontext v0.8.0 // indirect
217-
go.uber.org/atomic v1.7.0 // indirect
218219
go.uber.org/automaxprocs v1.6.0 // indirect
219-
go.uber.org/multierr v1.6.0 // indirect
220-
go.uber.org/zap v1.24.0 // indirect
220+
go.uber.org/multierr v1.10.0 // indirect
221+
go.uber.org/zap v1.27.0 // indirect
221222
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect
222-
golang.org/x/mod v0.26.0 // indirect
223+
golang.org/x/mod v0.27.0 // indirect
223224
golang.org/x/net v0.43.0 // indirect
224225
golang.org/x/sync v0.16.0 // indirect
225226
golang.org/x/sys v0.35.0 // indirect
226227
golang.org/x/term v0.34.0 // indirect
227228
golang.org/x/text v0.28.0 // indirect
228-
golang.org/x/tools v0.35.0 // indirect
229-
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
230-
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
229+
golang.org/x/tools v0.36.0 // indirect
231230
google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect
232231
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect
233232
gopkg.in/ini.v1 v1.67.0 // indirect

0 commit comments

Comments
 (0)