Skip to content

x/playground: if Imports is checked, run 'go mod tidy' when the Format button is pressed #32614

@bcmills

Description

@bcmills

CL 177421 added formatting for go.mod files in the Playground.

However, that isn't really enough to result in a reproducible build: as noted in #31944 (comment), unresolved dependencies are re-resolved whenever the cache is invalidated, which is difficult to predict.

One simple fix to add stability would be to have the existing Imports checkbox trigger a go mod tidy after running goimports. That would make the versions in use much clearer in the code and more stable over time, without the need for humans to manually resolve and copy over their go.mod files.

CC @dmitshur @ysmolsky

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wantedmodules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions