Proposal Details
Introduction:
The current behavior of go get -u PKG does not adequately handle packages that have been replaced in the go.mod file. This proposal aims to improve the user experience by providing clearer information when a replaced package is encountered during the go get -u operation.
Details:
When a user runs go get -u PKG and PKG has a replacement specified in the go.mod file, the go get command currently does not download the latest version of PKG.
Proposed Enhancement:
Modify the behavior of go get -u to detect when a package has been replaced in the go.mod file.
If PKG is replaced, display a clear message to the user indicating that PKG is not updated due to the replacement.
Provide guidance to the user, suggesting they check the go.mod file for the replacement settings.
Ideally, include a link to documentation that explains how to update replaces in the go.mod file.
The message displayed to the user should be informative and actionable, helping them understand why PKG was not updated and what steps they can take to resolve the issue.
The link provided in the message should direct users to relevant documentation that explains the concept of replaces in the go.mod file and provides instructions on updating them.
Impact:
Improved user experience: Users will receive clearer feedback when attempting to update replaced packages, reducing confusion and frustration.
Better understanding of go.mod functionality: Users will be guided to documentation that helps them understand and manage replaces in the go.mod file.
Proposal Details
Introduction:
The current behavior of go
get -u PKGdoes not adequately handle packages that have been replaced in thego.modfile. This proposal aims to improve the user experience by providing clearer information when a replaced package is encountered during thego get -uoperation.Details:
When a user runs
go get -u PKGand PKG has a replacement specified in thego.modfile, the go get command currently does not download the latest version of PKG.Proposed Enhancement:
Modify the behavior of
go get -uto detect when a package has been replaced in thego.modfile.If PKG is replaced, display a clear message to the user indicating that PKG is not updated due to the replacement.
Provide guidance to the user, suggesting they check the go.mod file for the replacement settings.
Ideally, include a link to documentation that explains how to update replaces in the
go.modfile.The message displayed to the user should be informative and actionable, helping them understand why PKG was not updated and what steps they can take to resolve the issue.
The link provided in the message should direct users to relevant documentation that explains the concept of replaces in the
go.modfile and provides instructions on updating them.Impact:
Improved user experience: Users will receive clearer feedback when attempting to update replaced packages, reducing confusion and frustration.
Better understanding of go.mod functionality: Users will be guided to documentation that helps them understand and manage replaces in the go.mod file.