cmd/go: failing to resolve nested modules in tagged fossil repos #64104
Labels
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
I've spent more than 3 days figuring out what the heck is wrong with GO in combination with fossil SCM. Solved various errors but the projects.local/pizzeria/pizza: module projects.local/pizzeria/pizza@latest found (v0.0.0-20231113162218-fcd622746656), but does not contain package projects.local/pizzeria/pizza error is
simply nerve wrecking.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, tested it with 1.19 aswell. same issue. Experimetned with multiple versions. Same thing.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Sample project: see attached file. A simple project with modules and submodules.
pizzeria.go:
go.mod
pizza/tasty.go:
pizza/go.mod
pizza/toppings/good.go
pizza/toppings/go.mod
Go mod tidy and go get fails for ALL types of projects which contain modules and submodules using Fossil Scm - Including the same project it's in!
Any command such as go get/go mod tidy fails. I experimented with workspaces. When I experimented with a self hosted GIT and it only works untill I push tags, then if I want a specific tag, it fails again, which makes me think there is a huge bug somewhere in the go implementation and usage of Fossil & git. Or I might be using it wrong. I tagged versions with both fossil & git and tried keeping my repo\s the same.
The data in the zip files and folders located at /home/myuser/go/pkg/mod/cache/download/projects.local/pizzeria and /home/myuser/go/pkg/mod/cache/download/projects.local/pizzeria/toppings are all empty in fossil and only seem to contain data when using a Git repo.
I tried adding tags to projects.local/pizzeria and even code.myproject.local/pizzeria-example/ which fail
A local NGINX/Caddy instance exists to redirect projects.local (mapped to local IP in /etc/hosts) the correct code.myproject.local (which reverse proxies both fossil & git) including redirecting meta
<-
IN essence everything is set up for this to work correctly but it still won't work properly.
Is there a different folder structure required with fossil? I've searched the net wide and open for examples, read documentation and even experimented with chiselapp which gives the same error. For most projects. This is a big dealbreaker.
Due to various constraints, the projects require Fossil.
What did you expect to see?
GOPRIVATE=.local,projects.local/pizzeria GOVCS=*:all GOPROXY=direct go mod tidy
go: finding module for package projects.local/pizzeria/pizza
go: downloading projects.local/pizzeria v0.0.0-20231113171659-96083a33d6b9
go: downloading projects.local/pizzeria/pizza v0.0.0-20231113171659-96083a33d6b9
go: found projects.local/pizzeria/pizza in projects.local/pizzeria/pizza v0.0.0-20231113171659-96083a33d6b9
go: finding module for package projects.local/pizzeria/pizza/toppings
go: downloading projects.local/pizzeria/pizza/toppings v0.0.0-20231113171659-96083a33d6b9
go: found projects.local/pizzeria/pizza/toppings in projects.local/pizzeria/pizza/toppings v0.0.0-20231113171659-96083a33d6b9
(the above example uses a local GIt service which does seem to work UNTILL i push a tag and sync it, afterwards, when fetching a specific versioned module, it fails as with git)
What did you see instead?
GOPRIVATE=.local,projects.local/pizzeria GOVCS=*:all GOPROXY=direct go mod tidy
go: finding module for package projects.local/pizzeria/pizza
go: downloading projects.local/pizzeria/pizza v0.0.0-20231113162218-fcd622746656
go: downloading projects.local/pizzeria v0.0.0-20231113162218-fcd622746656
go: pizzatest imports
projects.local/pizzeria/pizza: module projects.local/pizzeria/pizza@latest found (v0.0.0-20231113162218-fcd622746656), but does not contain package projects.local/pizzeria/pizza
The text was updated successfully, but these errors were encountered: