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

x/vgo: mod -sync -json produces duplicates in the output #25972

Closed
dlsniper opened this issue Jun 20, 2018 · 1 comment

Comments

@dlsniper
Copy link
Contributor

commented Jun 20, 2018

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

go version go1.10.3 linux/amd64
golang/vgo@f574d31

Does this issue reproduce with the latest release?

yes

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

cross-platform issue

What did you do?

In the following case, having the files outside of GOPATH:

  • main.go
package main

import "github.com/gorilla/mux"

func main() {
	m := mux.NewRouter()
	_ = m
}
  • go.mod
module awesomevgoProject

require (
	github.com/gorilla/context v1.1.1
	github.com/gorilla/mux v1.6.2
)

What did you expect to see?

I ran vgo mod -sync -json

What did you expect to see?

{
  "Module":{
    "Path":"awesomevgoProject",
    "Version":""
  },
  "Require":[
    {
      "Path":"github.com/gorilla/context",
      "Version":"v1.1.1"
    },
    {
      "Path":"github.com/gorilla/mux",
      "Version":"v1.6.2"
    }
  ],
  "Exclude":null,
  "Replace":null
}

What did you see instead?

{
  "Module":{
    "Path":"awesomevgoProject",
    "Version":""
  },
  "Require":[
    {
      "Path":"github.com/gorilla/context",
      "Version":"v1.1.1"
    },
    {
      "Path":"github.com/gorilla/mux",
      "Version":"v1.6.2"
    },
    {
      "Path":"github.com/gorilla/context",
      "Version":"v1.1.1"
    },
    {
      "Path":"github.com/gorilla/mux",
      "Version":"v1.6.2"
    },
    {
      "Path":"github.com/gorilla/context",
      "Version":"v1.1.1"
    },
    {
      "Path":"github.com/gorilla/mux",
      "Version":"v1.6.2"
    }
  ],
  "Exclude":null,
  "Replace":null
}

@gopherbot gopherbot added this to the vgo milestone Jun 20, 2018

@bcmills bcmills added the NeedsFix label Jun 20, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jun 23, 2018

Change https://golang.org/cl/120656 mentions this issue: cmd/go/internal/modfile: fix producing unquoted module path duplicates

@golang golang deleted a comment from gopherbot Jul 1, 2018

@golang golang locked and limited conversation to collaborators Jul 1, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.