prep for go1.21: use -e in go list

For some reason, in go1.21, go list does not allow
importing main packages anymore, even if it is for
the sake of tracking dependencies (which is a valid
use case).

A suggestion to work around this is to use -e flag to
permit processing of erroneous packages. However, this
doesn't seem prudent.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
This commit is contained in:
Madhav Jivrajani 2023-07-03 11:10:52 +05:30
parent f563910656
commit a422d11c77

View File

@ -277,7 +277,7 @@ while IFS= read -r repo; do
echo "=== computing imports for ${repo}"
go list all
echo "=== computing tools imports for ${repo}"
go list -tags=tools all
go list -e -tags=tools all
}
# capture module dependencies