Skip to content

cmd/go: When go list -m -json -versions returns no versions, it does not include an Origin #66077

@mondy

Description

@mondy

Go version

go version go1.22.0 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\myname\AppData\Local\go-build
set GOENV=C:\Users\myname\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\myname\go\pkg\mod
set GONOPROXY=github.com/myname/*
set GONOSUMDB=github.com/myname/*
set GOOS=windows
set GOPATH=C:\Users\myname\go
set GOPRIVATE=github.com/myname/*
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\myname\scoop\apps\go\current
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Users\myname\scoop\apps\go\current\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\myname\AppData\Local\Temp\go-build3669545043=/tmp/go-build -gno-record-gcc-switches

What did you do?

Execute go list -m -json -versions fyne.io/fyne/v2/cmd/fyne on go version 1.22.0 and 1.21.7.

What did you see happen?

Execute go list -m -json -versions fyne.io/fyne/v2/cmd/fyne.
Output:

{
        "Path": "fyne.io/fyne/v2/cmd/fyne"
}

Origin field is not output.

Execute with go version 1.21.7.

{
        "Path": "fyne.io/fyne/v2/cmd/fyne",
        "Origin": {
                "VCS": "git",
                "URL": "https://github.com/fyne-io/fyne",
                "Subdir": "cmd/fyne",
                "TagPrefix": "cmd/fyne/",
                "TagSum": "t1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
        }
}

Origin field is output.

What did you expect to see?

I would like to get the output of the Origin field in go version 1.22.0 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions