/ go Public
cmd/go: option to initialize go mod from git submodules #47824
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
I have historically used git submodules as the most reliable way to manage library dependencies in my Go projects. I would very much like to migrate to modern Go modules. However, the
go mod initsystem does not appear to support generating go.mod configurations from git submodules.
When I try to do this, I either get NO modules in the resulting go.mod file, or else I get the latest versions of everything, which of course breaks my application. Please include automation for migrating
vendor/directories from git submodules to go.mod.
Furthermore, when I try to explicitly copy the exact same git refs for the dependency versions, then
go modoperations corrupt these.
go modchecks out a completely different version of the dependency tree than I have in the original
vendor/with git submodules.
If someone can help me to reliably migrate the exact same dependency tree to go mod, then I would be grateful.
The text was updated successfully, but these errors were encountered: