Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Install tools with modules enabled #2700

Merged
merged 9 commits into from
Aug 27, 2019
Merged

Install tools with modules enabled #2700

merged 9 commits into from
Aug 27, 2019

Conversation

stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Aug 15, 2019

This change installs the Go tools with modules enabled, if the user is on Go >= 1.11. The reason for this is to ensure that the user gets the latest tagged version for a tool, rather than the master (which can be unstable).

In particular, this is necessary for gopls, since we have begun tagging stable versions. To avoid modifying the user's go.mod file (#1919), we run the go get command in a temporary directory.

Fixes #2671

src/util.ts Outdated Show resolved Hide resolved
src/goInstallTools.ts Outdated Show resolved Hide resolved
src/goInstallTools.ts Outdated Show resolved Hide resolved
const args = ['get', '-v'];
// Only get tools at master if we are not using modules.
if (modulesOff) {
args.push('-u');
Copy link
Contributor

Choose a reason for hiding this comment

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

In module mode we don't need -u to get the latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, -u will update all of the dependencies, and in module mode, we just want to get the latest tagged version with the correct versions of the dependencies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use gopls@latest rather than master
2 participants