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: conflicting replacements for example.com/test:
use "go work edit -replace example.com/test=[override]" to resolve
It appears that when checking for replacement conflicts, go work sync does not resolve relative replacement paths. While this may work for flat workspaces, this causes problems when module replacements are used within sub folders. Perhaps go work sync should resolve relative paths to absolute paths before performing its check for conflicts so that when two replacements point to exactly the same place the command doesn't fail.
The text was updated successfully, but these errors were encountered:
FWIW, I don't think this is specific to go work sync. Investigating.
changed the title
go work sync does not properly resolve paths when checking for replace conflicts
cmd/go: relative replacements in a workspace are not resolved relative to their go.mod files
Feb 15, 2022