You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Found an interesting issue with module resolution. When trying to use v8 of tollbooth:
go get github.com/didip/tollbooth/v8 fails with: "go: module github.com/didip/tollbooth@upgrade found (v4.0.2+incompatible), but does not contain package github.com/didip/tollbooth/v8"
At the same time go get github.com/didip/tollbooth/v7 works fine
While also showing "The highest tagged major version is v8"
The issue appears to be related to the old v4.0.2 version which didn't have go.mod and is marked as "+incompatible". This seems to interfere with Go's module resolution for v8, while v7 works fine.
For users, clearing the module cache (go clean -modcache) fixes the issue, but this suggests there might be a problem with how the module versions are published/cached.
Steps to reproduce:
go get github.com/didip/tollbooth/v8 -> fails
go clean -modcache
go get github.com/didip/tollbooth/v8 -> works
I was able to reproduce it on two different computers. Both have been using v7 before.
Would be great to understand why this happens and if there's a way to fix it on the package level.
The text was updated successfully, but these errors were encountered:
So, I tested it on a brand new project and it seems to work:
go mod init
go: creating new go.mod: module github.com/didip/test
go get github.com/didip/tollbooth/v8
go: downloading github.com/didip/tollbooth/v8 v8.0.1
go: added github.com/didip/tollbooth/v8 v8.0.1
go: added github.com/go-pkgz/expirable-cache/v3 v3.0.0
Hi! Found an interesting issue with module resolution. When trying to use v8 of tollbooth:
go get github.com/didip/tollbooth/v8
fails with: "go: module github.com/didip/tollbooth@upgrade found (v4.0.2+incompatible), but does not contain package github.com/didip/tollbooth/v8"go get github.com/didip/tollbooth/v7
works fineThe issue appears to be related to the old v4.0.2 version which didn't have go.mod and is marked as "+incompatible". This seems to interfere with Go's module resolution for v8, while v7 works fine.
For users, clearing the module cache (
go clean -modcache
) fixes the issue, but this suggests there might be a problem with how the module versions are published/cached.Steps to reproduce:
go get github.com/didip/tollbooth/v8
-> failsgo clean -modcache
go get github.com/didip/tollbooth/v8
-> worksI was able to reproduce it on two different computers. Both have been using v7 before.
Would be great to understand why this happens and if there's a way to fix it on the package level.
The text was updated successfully, but these errors were encountered: