cmd/go: go list -json -m
does not provide Replace.Path
relative to current directory when using workspaces
#54263
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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?
Given a monorepo setup as follow:
With the following
go.work
:When getting the list of replaced modules, the
.Replace.Path
entry is given relative to thego.work
file instead of relative to the current folder the command was invoked from. The command ran was the following:What did you expect to see?
Path
being appropriately set to reflect the current directoryWhat did you see instead?
The text was updated successfully, but these errors were encountered: