-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: get -u pulls in unreferenced v2 version #32495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What is the exact issue ? Is it that after running go mod graph again, you get a blackfriday@v2 ? If that is so, I am unable to reproduce it. For me, it's always that one line of 1.5.2. I am on 1.12.4 though. |
Yes. I added a newline to my initial comment (seems GitHub hid the important "go get -u" step). I just tried the above again, and now I get another (but related error), indicating that there is some cache thing going on: # github.com/cpuguy83/go-md2man/md2man
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:11:16: undefined: blackfriday.EXTENSION_NO_INTRA_EMPHASIS
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:12:16: undefined: blackfriday.EXTENSION_TABLES
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:13:16: undefined: blackfriday.EXTENSION_FENCED_CODE
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:14:16: undefined: blackfriday.EXTENSION_AUTOLINK
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:15:16: undefined: blackfriday.EXTENSION_SPACE_HEADERS
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:16:16: undefined: blackfriday.EXTENSION_FOOTNOTES
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:17:16: undefined: blackfriday.EXTENSION_TITLEBLOCK
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/md2man.go:19:29: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(doc, renderer, extensions)
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/roff.go:19:9: cannot use &roffRenderer literal (type *roffRenderer) as type blackfriday.Renderer in return argument:
*roffRenderer does not implement blackfriday.Renderer (missing RenderFooter method)
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/roff.go:102:11: undefined: blackfriday.LIST_TYPE_ORDERED
../../../go/pkg/mod/github.com/cpuguy83/go-md2man@v1.0.10/md2man/roff.go:102:11: too many errors |
One of the invariants of Go modules is that each import path indicates one unique version of the package. So Semantic import paths in module mode are specifically intended to address this problem, but unfortunately they don't help with dependencies that made breaking changes before the introduction of modules. |
As popular Go modules tend to spread, I think this problem is widespread (people having problems doing
go get -u
on their Go projects) (see spf13/cobra#805 gohugoio/hugo#5954).I have tried to understand what's going on, but I fail to understand it, so I suspect it's a bug in Go itself.
/cc @spf13
My env:
The text was updated successfully, but these errors were encountered: