From: Bryan C. Mills Date: Thu, 17 Jun 2021 18:12:34 +0000 (-0400) Subject: cmd/go: replace a TODO with an explanatory comment X-Git-Tag: go1.17rc1~83 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ed834853ad8224611f44a3c467e00a22df341d91;p=gostls13.git 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 Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Reviewed-by: Michael Matloob --- 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