Skip to content

wiki: go modules page still talks about old format conversions that don't work since 1.22 #72916

Closed
@karelbilek

Description

@karelbilek

In go wiki on modules, there are written instructions about conversions from old module formats. For example

https://go.dev/wiki/Modules#how-to-define-a-module

This step converts from any existing dep Gopkg.lock file or any of the other nine total supported dependency formats, adding require statements to match the existing configuration.

https://go.dev/wiki/Modules#i-have-a-problem-with-a-complex-dependency-that-has-not-opted-in-to-modules-can-i-use-information-from-its-current-dependency-manager

When you run go mod init when initializing your own module, it will automatically convert from a prior dependency manager by translating configuration files like Gopkg.lock, glide.lock, or vendor.json into a go.mod file that contains corresponding require directives. The information in a pre-existing Gopkg.lock file for example usually describes version information for all of your direct and indirect dependencies

This is no longer true since go 1.22, which doesn't attempt to convert the old formats anymore.

I tried to convert older code (but not that ancient - 7 years old) from dep to go modules, and I was surprised this no longer works. I needed to dig into source code to realize it's not available since 1.22 (this is not written anywhere on the wiki, only in go 1.22 release notes).

(note: I don't complain that it's no longer supported, just that it's not wrong on the official wiki)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions