aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-06-17 14:12:34 -0400
committerBryan C. Mills <bcmills@google.com>2021-06-17 19:52:18 +0000
commited834853ad8224611f44a3c467e00a22df341d91 (patch)
tree55ca94354a326f3bfb98d36b053be626d6394a8c /src
parent4dede025507fe6476e9881b4b2bd773a3680d618 (diff)
downloadgo-ed834853ad8224611f44a3c467e00a22df341d91.tar.xz
cmd/go: replace a TODO with an explanatory comment
I left a TODO to decide whether to add 'go get' arguments as indirect (as we have in the past), or to make them direct. I considered both options, and decided to keep the indirect default because it is easier (and less invasive) for users to fix. Updates #45979 Change-Id: I1f23a88db59a01bdd9e6fe48c2fffc8a3b55145a Reviewed-on: https://go-review.googlesource.com/c/go/+/328971 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/go/testdata/script/mod_get_lazy_indirect.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmd/go/testdata/script/mod_get_lazy_indirect.txt b/src/cmd/go/testdata/script/mod_get_lazy_indirect.txt
index 13640cbc23..1cef9d1c0c 100644
--- a/src/cmd/go/testdata/script/mod_get_lazy_indirect.txt
+++ b/src/cmd/go/testdata/script/mod_get_lazy_indirect.txt
@@ -10,10 +10,12 @@ stderr '^m.go:3:8: no required module provides package rsc\.io/quote; to add it:
# When we run the suggested 'go get' command, the new dependency can be used
-# immediately, even though 'go get' marks it as 'indirect'.
+# immediately.
#
-# TODO(#45979): Should we swap this default state, so that new dependencies
-# are added as direct unless otherwise noted?
+# 'go get' marks the new dependency as 'indirect', because it doesn't scan
+# enough source code to know whether it is direct, and it is easier and less
+# invasive to remove an incorrect indirect mark (e.g. using 'go get') than to
+# add one that is missing ('go mod tidy' or 'go mod vendor').
go get rsc.io/quote
grep 'rsc.io/quote v\d+\.\d+\.\d+ // indirect$' go.mod