I'm trying to vendor in x/tools into the stdlib to add a new vet analysis pass.
I'm trying to follow the instructions in src/README.vendor, and to some extent src/cmd/README.vendor. So I do:
$ cd src/cmd
$ ../../bin/go get -d golang.org/x/tools@latest
go get: downgraded golang.org/x/tools v0.1.1-0.20210312185553-8e4f4c86593a => v0.1.0
That downgraded sentence looks bad. But I asked for "latest". Is there something else I should ask for?
$ ../../bin/go mod tidy
go: finding module for package golang.org/x/tools/go/analysis/passes/sigchanyzer
golang.org/x/tools/go/analysis/passes/sigchanyzer: module golang.org/x/tools@latest found (v0.1.0), but does not contain package golang.org/x/tools/go/analysis/passes/sigchanyzer
Nothing else subsequent in those instructions work either.
Using @b261fe96097f8db197a1033090651783e8eb8350 in my go get command seems to help somewhat. That's the SHA1 hash of the CL I'm trying to pull into the stdlib (CL 308209). I get farther, but the code in that CL doesn't seem to get pulled in after the tidy/vendor command combo. I get
$ git status
On branch issue45242
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
no changes added to commit (use "git add" and/or "git commit -a")
That change (the inspect.go file) looks like CL 302989, not my change.