]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: remove likely vestigial ability to infer module path from...
authorthepudds <thepudds1460@gmail.com>
Wed, 9 Apr 2025 21:43:14 +0000 (17:43 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 20 May 2025 14:58:55 +0000 (07:58 -0700)
commit312ceba3185b158a89d022bdaf64f3cf7670c891
treefd1d06b762089cf90ce61802068fad91a558981e
parent4f1146e6614676126d3810ea319e3f658d4f8116
cmd/go/internal/modload: remove likely vestigial ability to infer module path from Godeps.json and vendor.json

CL 518776 deleted the cmd/go/internal/modconv package and dropped the
ability to import dependency requirements from ~nine or so legacy
pre-module dependency configuration files. Part of the rationale from
Russ in 2023 for dropping that support was that "by now no one is
running into those configs anymore during 'go mod init'".

For two of those legacy file formats, Godeps.json and vendor.json, the
ability to import their listed dependencies was dropped in CL 518776,
but what remained for those two formats was the ability to guess the
resulting module name in the absence of a name being supplied to 'go mod
init'.

This could be explained by the fact that this smaller functionality for
guessing a module name was separate, did not rely on the deleted modconv
package, and instead only relied on simple JSON parsing.

The name guessing was helpful as part of the transition when module
support was initially released, but it was never perfect, including the
various third-party dependency managers did not all have the same naming
rules that were enforced by modules.

In short, it is very unlikely anyone is relying on this now, so we
delete it.

This CL was spawned from discussion in two related documentation CLs
(CL 662675 and CL 662695).

Updates #71537

Change-Id: I9e087aa296580239562a0ecee58913c5edc533ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/664315
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sam Thanawalla <samthanawalla@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/mod_find.txt