You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go version
go version devel +b9b01ed56f Fri Mar 29 12:18:07 2019 +0100 linux/amd64
Does this issue reproduce with the latest release?
Yes
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:
go mod tidy removes the replaced module's go.sum lines. The lines are technically not used, but will be when the main is not the main module, e.g. someone imports github.com/eliasnaur/gomodtidy/main.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
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:
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:What did you expect to see?
The go.sum lines were kept for the lib module.
What did you see instead?
go mod tidy
removes the replaced module's go.sum lines. The lines are technically not used, but will be when the main is not the main module, e.g. someone importsgit.luolix.top/eliasnaur/gomodtidy/main
.The text was updated successfully, but these errors were encountered: