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
exclude and replace directives only operate on the current (“main”) module. exclude and replace directives in modules other than the main module are ignored when building the main module. The replace and exclude statements, therefore, allow the main module complete control over its own build, without also being subject to complete control by dependencies.
@seankhliao@andybons I see. Thanks. But should this be a drawback? With this, it's hard and unreliable to require other modules which have replace . Even the replace is not ignored, the "main" module can still complete control all dependencies by it's own replace.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Project B (latest version is v1.0.0) with mod file:
Project C with mod file:
Build project C, the code of C still references to github.com/xxx/a v1.2.0
What did you expect to see?
The code of C should reference to github.com/xxx/a-fork v1.2.1 instead
What did you see instead?
The code of C references to github.com/xxx/a v1.2.0
The text was updated successfully, but these errors were encountered: