Problem
Go mod tidy has stopped working for go.mod that imports signalfx due to issues with the smartystreets imports. This seems to happen specifically when the dependency is 2 or more levels deep (this does not happen to the go.mod directly importing signalfx). This is likely due to the recent rebranding that cause smarty/smartystreets libs to rename their imports/modules.
To replicate:
import github.com/signalfx/golib/v3 in a go.mod and push to a remote repository (eg git push example-branch in a repo github.com/example-project).
Import the branch in git repo via a separate go.mod (eg require github.com/example-project <example-branch> or require github.com/example-project + replace github.com/example-project => github.com/example-project <exampe-branch>)
Run go mod tidy on new project
As stated above, running go mod tidy on the module directly seems to work. This seems to only happen if the dependency is 2 layers down or more. I suspect it might have something to with the way golang attempts to download dependencies and find tags for branches (this also happens for master if master is requiring signalfx/golib/v3 and you require as github.com/example-project master instead of the explicit tag). Also open to workarounds if anyone has any, but I propose a potential solution below:
Proposed Solution
In go.mod, update goconvey to a later version to
Also update smartystreets/assertionsOR add replace directives to point this to smarty/assertions instead.
Problem Go mod tidy has stopped working for go.mod that imports signalfx due to issues with the smartystreets imports. This seems to happen specifically when the dependency is 2 or more levels deep (this does not happen to the go.mod directly importing signalfx). This is likely due to the recent rebranding that cause smarty/smartystreets libs to rename their imports/modules.
To replicate:
github.com/signalfx/golib/v3
in a go.mod and push to a remote repository (eggit push example-branch
in a repogithub.com/example-project
).require github.com/example-project <example-branch>
orrequire github.com/example-project
+replace github.com/example-project => github.com/example-project <exampe-branch>
)go mod tidy
on new projectAs stated above, running
go mod tidy
on the module directly seems to work. This seems to only happen if the dependency is 2 layers down or more. I suspect it might have something to with the way golang attempts to download dependencies and find tags for branches (this also happens for master if master is requiringsignalfx/golib/v3
and you require asgithub.com/example-project master
instead of the explicit tag). Also open to workarounds if anyone has any, but I propose a potential solution below:Proposed Solution In go.mod, update goconvey to a later version to Also update smartystreets/assertions OR add replace directives to point this to smarty/assertions instead.