Skip to content

Prevent go.mod file pollution with development dependencies #82

@arcticicestudio

Description

@arcticicestudio

Currently when installing development dependencies through mage, the go.mod file will be updated to include the installed packages since this the default behavior of the go get command when running in module mode.
To prevent the pollution of the project's Go module definition the module mode should be disabled when installing the dev/build packages.
This is a necessary workaround until the Go toolchain is able to install packages globally without updating the module file when the go get command is run from within the project root directory.

See golang/go#30515 for more details and proposed solutions that might be added to Go's build tools in future versions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions