Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(GoMod): Use option
-json
with go list
to get module names
The `-json` option allows specifying a comma separated list of property names to include in the output. The `go list` command has a mechanism for skipping certain processing steps which are not needed for computing the values corresponding to those specified property names, see [^1],[^2] and [^3]. Such a mechanism is not in place for the `-f` option. Migrate from `-f` to `-json` to benefit from above mechanism, removing potential sources of issues. It could be that this allows to drop the parameter `-buildvcs=false`, which is left for future investigation. The primary reason for switching to `-json` is to extend the mentioned mechanism [^4] in `go list` to conditionally skip computing embed files in an analog way which would fix [^5]. [^1]: https://github.com/golang/go/blob/0cd309e12818f988693bf8e4d9f1453331dcf9f2/src/cmd/go/internal/load/pkg.go#L2768-L2776 [^2]: https://github.com/golang/go/blob/0cd309e12818f988693bf8e4d9f1453331dcf9f2/src/cmd/go/internal/list/list.go#L605-L606 [^3]: golang/go#29666 [^4]: golang/go#49534 (comment) [^5]: #5560 Signed-off-by: Frank Viernau <frank_viernau@epam.com>
- Loading branch information