Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
- Loading branch information