Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go mod edit does not sort resulting go.mod file with multiline replace block #32359

Open
dmitris opened this issue May 31, 2019 · 1 comment
Labels
modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitris
Copy link
Contributor

dmitris commented May 31, 2019

follow-up on #30897 regading go.mod sorting (after go mod edit)

What version of Go are you using (go version)?

$ go version
go version go1.12.5 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
darwin

What did you do?

ran the following command with an existing go.mod file that include a multiline replace clause:
go mod edit -replace='github.com/google/go-github/v25=git.myxyz.com/mirror-github/google--go-github/v25@v25.0.4'

What did you expect to see?

the new replacement added in the existing multiline replace ( [...] ) block in the sorted order

What did you see instead?

The following line appended at the end of the go.mod file - therefore not inside the existing replace block and not sorted with other entries:
replace github.com/google/go-github/v25 => git.myxyz.com/mirror-github/google--go-github/v25 v25.0.4

@julieqiu julieqiu changed the title go mod edit commands does not sort the resulting go.mod file with multiline replace block cmd/go: go mod edit commands does not sort the resulting go.mod file with multiline replace block Jun 1, 2019
@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 1, 2019
@julieqiu
Copy link
Member

julieqiu commented Jun 1, 2019

/cc @bcmills @jayconrod

@julieqiu julieqiu changed the title cmd/go: go mod edit commands does not sort the resulting go.mod file with multiline replace block cmd/go: go mod edit does not sort resulting go.mod file with multiline replace block Jun 1, 2019
@jayconrod jayconrod added this to the Go1.14 milestone Jun 7, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants