What version of Go are you using (go version)?
$ go version
go version go1.20.4 darwin/arm64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE="on"
GOARCH="arm64"
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOVERSION="go1.20.4"
What did you do?
Using the following go.mod file run go list -json -m -u all
module testt
go 1.20
require (
github.com/arungudelli/Retract-Go-Module-Versions v0.2.0
)
replace github.com/arungudelli/Retract-Go-Module-Versions => github.com/golang/protobuf v1.5.0
What did you expect to see?
A JSON with the Retracted field.
...
{
"Path": "github.com/arungudelli/Retract-Go-Module-Versions",
"Version": "v0.2.0",
"Time": "2021-02-13T09:07:04Z",
"Replace": {
"Path": "github.com/golang/protobuf",
"Version": "v1.5.0",
"Time": "2021-03-18T00:15:31Z",
"Update": {
"Path": "github.com/golang/protobuf",
"Version": "v1.5.3",
"Time": "2021-09-16T00:37:10Z"
},
"Dir": ".../go/pkg/mod/github.com/golang/protobuf@v1.5.0",
"GoMod": ".../go/pkg/mod/cache/download/github.com/golang/protobuf/@v/v1.5.0.mod",
"GoVersion": "1.9",
"Deprecated": "Use the \"google.golang.org/protobuf\" module instead."
},
"Update": {
"Path": "github.com/arungudelli/Retract-Go-Module-Versions",
"Version": "v0.3.1",
"Time": "2021-02-13T09:39:05Z"
},
"Dir": ".../go/pkg/mod/github.com/arungudelli/!retract-!go-!module-!versions@v0.2.0",
"GoMod": ".../go/pkg/mod/cache/download/github.com/arungudelli/!retract-!go-!module-!versions/@v/v0.2.0.mod",
"GoVersion": "1.16",
"Retracted": [
"Mistake happened in the version DO NOT USE"
]
}
What did you see instead?
A JSON without the Retracted field.
...
{
"Path": "github.com/arungudelli/Retract-Go-Module-Versions",
"Version": "v0.2.0",
"Replace": {
"Path": "github.com/golang/protobuf",
"Version": "v1.5.0",
"Time": "2021-03-18T00:15:31Z",
"Update": {
"Path": "github.com/golang/protobuf",
"Version": "v1.5.3",
"Time": "2021-09-16T00:37:10Z"
},
"Dir": ".../go/pkg/mod/github.com/golang/protobuf@v1.5.0",
"GoMod": ".../go/pkg/mod/cache/download/github.com/golang/protobuf/@v/v1.5.0.mod",
"GoVersion": "1.9",
"Deprecated": "Use the \"google.golang.org/protobuf\" module instead."
},
"Update": {
"Path": "github.com/arungudelli/Retract-Go-Module-Versions",
"Version": "v0.3.1",
"Time": "2021-02-13T09:39:05Z"
},
"Dir": ".../go/pkg/mod/github.com/golang/protobuf@v1.5.0",
"GoMod": ".../go/pkg/mod/cache/download/github.com/golang/protobuf/@v/v1.5.0.mod",
"GoVersion": "1.9"
}
Why is it important?
Dependent packages will get the required dependency, not the replacement. As a developer, I want to be notified if the declared dependency is retracted or deprecated.
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
Using the following
go.modfile rungo list -json -m -u allWhat did you expect to see?
A JSON with the Retracted field.
What did you see instead?
A JSON without the Retracted field.
Why is it important?
Dependent packages will get the required dependency, not the replacement. As a developer, I want to be notified if the declared dependency is retracted or deprecated.