Skip to content

Run go mod tidy and bump Go version to 1.25 in generated module template#5980

Open
lvhg wants to merge 2 commits into
mainfrom
APP-16176-go-mod-tidy
Open

Run go mod tidy and bump Go version to 1.25 in generated module template#5980
lvhg wants to merge 2 commits into
mainfrom
APP-16176-go-mod-tidy

Conversation

@lvhg
Copy link
Copy Markdown
Member

@lvhg lvhg commented Apr 29, 2026

After generating a Go module, automatically run go mod tidy in the new module directory to resolve dependencies. Also updates the go.mod template from go 1.23 to 1.25.

https://viam.atlassian.net/browse/APP-16176

After generating a Go module, automatically run `go mod tidy` in the new
module directory to resolve dependencies. Also updates the go.mod template
from go 1.23 to 1.25.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Apr 29, 2026
@lvhg lvhg requested review from a team, lia-viam and njooma and removed request for a team April 29, 2026 17:51
Comment thread cli/module_generate.go
err = runGoImports(moduleFile)
if err != nil {
return errors.Wrap(err, "cannot generate go stubs -- unable to sort imports")
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good change, but I would put it somewhere down here instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you think it would be okay to move the go mod tidy back to where it was previously given that the tests are failing after moving it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, but let's talk about why the tests are failing here

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 1, 2026
@lvhg lvhg requested a review from njooma May 1, 2026 21:25
Copy link
Copy Markdown
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

approved, ready to merge once the checks start passing

Comment thread cli/module_generate.go
err = runGoImports(moduleFile)
if err != nil {
return errors.Wrap(err, "cannot generate go stubs -- unable to sort imports")
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, but let's talk about why the tests are failing here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants