Skip to content

Update shellwords to v1.0.1, relax Go version directive#3464

Merged
moskyb merged 1 commit into
mainfrom
relax-go-requirement
Sep 16, 2025
Merged

Update shellwords to v1.0.1, relax Go version directive#3464
moskyb merged 1 commit into
mainfrom
relax-go-requirement

Conversation

@moskyb

@moskyb moskyb commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Description

We previously relied on a dependency, shellwords, that required that the Agent to be on a very specific version of Go (1.24.3). In Shellwords v1.0.1, we relaxed this requirement to 1.24, so we should continue up the stream and make the agent as a go module a little more usable

Note that in general, we don't recommend that people use the agent as a go module, and don't consider it to be versioned at all. However, people are going to be doing it anyway, and we should endeavour to not make their lives needlessly difficult.

This PR also adds a toolchain directive to the go.mod, which will do the work of actually selecting a go version to run commands like go test etc, where that heavy lifting was previously done by an overly-zealous go directive.

This work is pretty much taken wholesale from @haydentherapper's #3449, but with a couple tweaks.

Context

#3449
buildkite/shellwords#5

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

Thanks to @haydentherapper and @vpnachev for pushing this!

closes #3449

Comment thread go.mod Outdated
go 1.24.3
go 1.24

toolchain go1.25.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Go 1.25 here could cause a repeat of #3224...

@moskyb moskyb force-pushed the relax-go-requirement branch from 63967b0 to aede20a Compare September 10, 2025 00:41
Co-Authored-By: Hayden <8418760+haydentherapper@users.noreply.github.com>
@moskyb moskyb force-pushed the relax-go-requirement branch from aede20a to d8a5e07 Compare September 10, 2025 00:43
@moskyb

moskyb commented Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

@DrJosh9000 i've bumped the toolchain directive down to latest 1.24

Comment thread go.mod
go 1.24.3
go 1.24.0

toolchain go1.24.5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says 1.24.5, and if I'm understanding the issue correctly, we may not want to specify a toolchain line at all?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We looked at the docs again and this is probably fine 👍

@moskyb moskyb merged commit 5481bc2 into main Sep 16, 2025
1 check passed
@moskyb moskyb deleted the relax-go-requirement branch September 16, 2025 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants