$ go version
go version devel +b9b01ed56f Fri Mar 29 12:18:07 2019 +0100 linux/amd64
Does this issue reproduce with the latest release?
What did you do?
I have a repository with two submodules, a library module and a main module depending on the library module. For convenience when working on both modules at the same time, I want to use a replace directive to point to the local path of the library. It's described in https://github.com/golang/go/wiki/Modules:
replace also can be used to inform the go tooling of the relative or absolute on-disk location of
modules in a multi-module project, such as:
replace example.com/project/foo => ../foo
I plan to check in the replace directive to the project repository, because it will be ignored by external modules importing main.
However, running go mod tidy when the main module contains a replace directive, the go.sum entries disappear: