mirror of https://github.com/golang/go.git
Now that workspace module mode generates a combined go.sum there are relatively few blockers to enabling -mod=readonly. Fix them and do it. This CL is a bit of a grab bag, but the fixes are relatively separate. I can split it into multiple CLs if desired. - If module A depends on module B at v1.0.0, the go command will want to upgrade the workspace module from v0.0.0-goplsworkspace to v1.0.0. To prevent that, use vN.999999.0 as the base pseudoversion, adjusting v0 to v1 where appropriate. A few test cases needed updating as a result. - For old Go versions, sort the generated workspace module and synthesize a go statement from the maximum go version declared in the workspace. - Some regtests need go.sum files created. - matchErrorToModule created incorrect quick fixes: it would try to download the top-level module mentioned in the error message, not the one that actually caused the problem. Now it issues quick fixes for the lowest-level module. - TestMultiModuleModDiagnostics accidentally included the same module in the workspace twice. Fix it, and make that an error. Fixes golang/go#43346. Change-Id: I605f762a4d23bedd914241525e64c1b3ecc42150 Reviewed-on: https://go-review.googlesource.com/c/tools/+/287032 Trust: Heschi Kreinick <heschi@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
|---|---|---|
| .. | ||
| analysisinternal | ||
| apidiff | ||
| event | ||
| fakenet | ||
| fastwalk | ||
| gocommand | ||
| gopathwalk | ||
| imports | ||
| jsonrpc2 | ||
| lsp | ||
| memoize | ||
| packagesinternal | ||
| proxydir | ||
| span | ||
| stack | ||
| testenv | ||
| tool | ||
| typesinternal | ||
| xcontext | ||