aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-09-09 09:38:55 -0700
committerJay Conrod <jayconrod@google.com>2021-09-20 18:41:57 +0000
commit3c764babe7b5e01a4e04b1a2c7975cdb5c5651a0 (patch)
treeb2c4731167545e8e69b133476d8b21a0b766b7a5 /src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
parent6268468e024ce7fa063611b98a2f11f17fd4bad8 (diff)
downloadgo-3c764babe7b5e01a4e04b1a2c7975cdb5c5651a0.tar.gz
go-3c764babe7b5e01a4e04b1a2c7975cdb5c5651a0.zip
cmd/go: write go.mod requirements more consistently for go 1.17+
If go.mod declares 1.17 or higher, when the go command rewrites go.mod (for example, after 'go mod tidy'), it will be more consistent about moving requirements in two blocks, one containing only direct requirements, and one containing only indirect requirements. The go command will not move requirements into or out of a block with comments. It may still update versions and "// indirect" comments, and it may delete unneeded requirements though. Fixes #47563 Fixes #47733 Change-Id: Ia6fb3e302be53097893abf01aa7cea60ac7b069a Reviewed-on: https://go-review.googlesource.com/c/go/+/343432 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt')
-rw-r--r--src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt b/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
index 44bc58cc6c..a45de5ad8c 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
@@ -72,10 +72,9 @@ go 1.17
replace example.net/indirect v0.1.0 => ./indirect
-require (
- example.net/ambiguous/nested v0.1.0 // indirect
- example.net/indirect v0.1.0
-)
+require example.net/indirect v0.1.0
+
+require example.net/ambiguous/nested v0.1.0 // indirect
-- all-m.txt --
example.com/m
example.net/ambiguous v0.1.0