|author||Russ Cox <email@example.com>||Thu May 06 14:08:50 2021 -0400|
|committer||Russ Cox <firstname.lastname@example.org>||Wed May 12 18:23:55 2021 +0000|
modfile: be less strict about go version syntax in dependency go.mod files It is unclear what the future holds for the go line in go.mod files. Perhaps at some point we will switch to semver numbering. Perhaps at some point we will allow specifying minor versions or even betas and release candidates. Those kinds of changes are difficult today because the go line is parsed in dependency modules, meaning that older versions of the Go toolchain need to understand newer go lines. This CL makes that case - parsing a go line in a dependency's go.mod file - a bit more lax about how to find the version. It allows a leading v and any trailing non-digit-prefixed string after the MAJOR.MINOR section. There are no concrete plans to make use of any of these changes, but if in the future we want to make them, having a few Go releases under out belt that will accept the syntax in dependencies will make any changes significantly easier. See also CL 317690 in the main repo. Change-Id: I7c7733c62259b3f25683ed618bc4918c98061396 Reviewed-on: https://go-review.googlesource.com/c/mod/+/317689 Trust: Russ Cox <email@example.com> Run-TryBot: Russ Cox <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Bryan C. Mills <firstname.lastname@example.org>
This repository holds packages for writing tools that work directly with Go module mechanics. That is, it is for direct manipulation of Go modules themselves.
It is NOT about supporting general development tools that need to do things like load packages in module mode. That use case, where modules are incidental rather than the focus, should remain in x/tools, specifically x/tools/go/packages.
The specific case of loading packages should still be done by invoking the go command, which remains the single point of truth for package loading algorithms.