Re: [go-nuts] Re: Should dev tools be tracked by go.mod?

2022-01-25 Thread Sean Liao
Go's dependency resolution doesn't work at that fine-grained of a level, it works on the module (unit of versioning) graph, not the package import graph. If your library is imported and used, all the dependency versions in your `go.mod` participate in version selection. This could present a

Re: [go-nuts] Re: Should dev tools be tracked by go.mod?

2022-01-25 Thread Paul Jolly
I have nothing to add to Sean's excellent reply, other than to mention... > Most of my experience has been with external tooling, and here I prefer using > `go install pkg@version` > over pinning with go.mod as this ensures no interference in dependency > versions between tools, > and can be

Re: [go-nuts] Re: Should dev tools be tracked by go.mod?

2022-01-24 Thread Kevin Wan
I'm separating go.mod files for framework and cli tool in our project . It works well. On Tuesday, January 25, 2022 at 5:45:29 AM UTC+8 sv...@redhat.com wrote: > Hi Sean, > > Thanks a lot for your answer! > > On Mon, Jan 24, 2022 at 9:01 PM Sean Liao

Re: [go-nuts] Re: Should dev tools be tracked by go.mod?

2022-01-24 Thread Sven Anderson
Hi Sean, Thanks a lot for your answer! On Mon, Jan 24, 2022 at 9:01 PM Sean Liao wrote: > As a (hypothetical) consumer of your library, I would definitely > appreciate fewer dependencies, > mostly to reduce the chance of (or difficulty of resolving) conflicts with > any other dependencies I