On Tuesday, March 5, 2024 at 9:29:58 AM UTC-6 Bryan C. Mills wrote:
Part of the intent with modules is that you do not need to do a full `git
clone` of each dependency — you should really only need to do that if you
need to author upstream changes yourself,
Yes, I'm authoring upstream changes myself on my own code as I tinker.
Nowadays, I usually just make 1 repo per package. That was easier before as
go get would recursively clone all of them.
in which case you can use `git clone` directly (instead of having the `go`
command do that).
Okay, no problem, I'll make something to automate that, so I'm all good.
Others might not be so happy with go version 1.22 since it is not a simple
replacement method.
For users like me, having the prior release have fmt.Println("Use of
GO111MODULE=off" will be deprecated in 1.22") might have prompted slackers
like me that procrastinate until the last minute to attempt to submit
patches or fix their things!
The Go proxy doesn't necessary serve origin information for
previously-fetched modules, but you can force the use of the upstream git
server using `GOPROXY=direct`:
$ go clean -modcache
$ GOPROXY=direct go list -json -m go.uber.org/zap@latest
Someone on irc was also cool and pointed to internal/vcs
<https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/vcs/vcs.go>
and friends. It would be ideal to use the same code go uses to resolve the
git clone path.
As you pointed out the use of the go.work file, I'll have to make
something that works the old way and the new way. I've only been using a
go.work file for running the fantastically helpful pkgsite. Kudos to
everyone that's put that marvelousness together.
I wonder, can the go.sum and go.mod files go in .git/ ? If not, I'll
experiment with that too.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/fa8221c5-f2c7-401d-b55d-66cc47813bc0n%40googlegroups.com.