golang/go

cmd/go/internal/modconv: TestConvertLegacyConfig/github.com_golang_dep_v0.4.0 broken on Ubuntu 16.04

Closed this issue · 2 comments

It appears that git 2.7.4 can't resolve one of the converted versions, whereas git 2.18.0 can. (See also #26653.)

bcmills@dev-bcmills-ubuntu16:~/go/src$ go test cmd/go/internal/modconv -run=TestConvertLegacyConfig/github.com/golang_dep
go: downloading github.com/golang/dep v0.4.0
go: converting /tmp/modconv-test-916651728/pkg/mod/github.com/golang/dep@v0.4.0/Gopkg.lock: stat github.com/Masterminds/semver@a93e51b5a57ef416dac8bb02d11407b6f55d8929: unknown revision a93e51b5a57ef416dac8bb02d11407b6f55d8929
go: downloading github.com/docker/distribution v0.0.0-20150410205453-85de3967aa93
go: converting /tmp/modconv-test-916651728/pkg/mod/github.com/docker/distribution@v0.0.0-20150410205453-85de3967aa93/Godeps/Godeps.json: stat code.google.com/p/go-uuid/uuid@35bc42037350f0078e3c974c6ea690f1926603ab: unrecognized import path "code.google.com/p/go-uuid/uuid" (parse https://code.google.com/p/go-uuid/uuid?go-get=1: no go-import meta tags ())
go: downloading github.com/fishy/gcsbucket v0.0.0-20150410205453-618d60fe84e0
--- FAIL: TestConvertLegacyConfig (24.17s)
    --- FAIL: TestConvertLegacyConfig/github.com_golang_dep_v0.4.0 (3.78s)
        convert_test.go:170: final go.mod:
            module github.com/golang/dep

            require (
                github.com/Masterminds/vcs v1.11.1
                github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7
                github.com/boltdb/bolt v1.3.1
                github.com/go-yaml/yaml v0.0.0-20170407172122-cd8b52f8269e
                github.com/golang/protobuf v0.0.0-20170901042739-5afd06f9d81a
                github.com/jmank88/nuts v0.3.0
                github.com/nightlyone/lockfile v0.0.0-20170707060451-e83dc5e7bba0
                github.com/pelletier/go-toml v0.0.0-20171218135716-b8b5e7696574
                github.com/pkg/errors v0.8.0
                github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
                golang.org/x/net v0.0.0-20170828231752-66aacef3dd8a
                golang.org/x/sync v0.0.0-20170517211232-f52d1811a629
                golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea
            )


            want:
            module github.com/golang/dep

            require (
                github.com/Masterminds/semver v0.0.0-20170726230514-a93e51b5a57e
                github.com/Masterminds/vcs v1.11.1
                github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7
                github.com/boltdb/bolt v1.3.1
                github.com/go-yaml/yaml v0.0.0-20170407172122-cd8b52f8269e
                github.com/golang/protobuf v0.0.0-20170901042739-5afd06f9d81a
                github.com/jmank88/nuts v0.3.0
                github.com/nightlyone/lockfile v0.0.0-20170707060451-e83dc5e7bba0
                github.com/pelletier/go-toml v0.0.0-20171218135716-b8b5e7696574
                github.com/pkg/errors v0.8.0
                github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
                golang.org/x/net v0.0.0-20170828231752-66aacef3dd8a
                golang.org/x/sync v0.0.0-20170517211232-f52d1811a629
                golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea
            )
FAIL
FAIL    cmd/go/internal/modconv 24.413s

The commit in question appears to not be reachable from any branch:

$ git --no-pager branch -r --contains a93e51b5a57ef416dac8bb02d11407b6f55d8929

$

So it's not terribly surprising that an older git can't find it.

Change https://golang.org/cl/129800 mentions this issue: cmd/go/internal/modconv: fix TestConvertLegacyConfig expectations