diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e63adfac..46d8a76ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - (SDK) [\#7925](https://github.com/cosmos/cosmos-sdk/pull/7925) Updated dependencies to use gRPC v1.33.2 * Updated gRPC dependency to v1.33.2 * Updated iavl dependency to v0.15-rc2 - +* (version) [\#7848](https://github.com/cosmos/cosmos-sdk/pull/7848) [\#7941](https://github.com/cosmos/cosmos-sdk/pull/7941) `version --long` output now shows the list of build dependencies and replaced build dependencies. ## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 diff --git a/version/version.go b/version/version.go index 25995932f..a179b37fe 100644 --- a/version/version.go +++ b/version/version.go @@ -85,6 +85,13 @@ type buildDep struct { *debug.Module } -func (d buildDep) String() string { return fmt.Sprintf("%s@%s", d.Path, d.Version) } +func (d buildDep) String() string { + if d.Replace != nil { + return fmt.Sprintf("%s@%s => %s@%s", d.Path, d.Version, d.Replace.Path, d.Replace.Version) + } + + return fmt.Sprintf("%s@%s", d.Path, d.Version) +} + func (d buildDep) MarshalJSON() ([]byte, error) { return json.Marshal(d.String()) } func (d buildDep) MarshalYAML() (interface{}, error) { return d.String(), nil }