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: conversion from legacy dependency managers puts replacement module path in require section #33406

Closed
liuchang0812 opened this issue Aug 1, 2019 · 6 comments
Labels
help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@liuchang0812
Copy link

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

$ go version
go version go1.12.6 linux/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
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/liuchang/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/liuchang/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build510154135=/tmp/go-build -gno-record-gcc-switches"

What did you do?

run go mod init with a dep project that contains source config.

What did you expect to see?

go.mod should put module's old path in require section.

What did you see instead?

go.mod put module's new path in require section.

@bcmills bcmills changed the title cmd/go: go mod init command puts replace's new module path in require section cmd/go: conversion from Dep puts replacement module path in require section Aug 2, 2019
@bcmills bcmills added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 2, 2019
@bcmills bcmills added this to the Go1.14 milestone Aug 2, 2019
@bcmills
Copy link
Contributor

bcmills commented Sep 16, 2019

@liuchang0812, is this still an issue?

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 16, 2019
@bcmills
Copy link
Contributor

bcmills commented Sep 16, 2019

Never mind, spotted an issue in src/cmd/go/testdata/script/mod_init_dep.txt that reproduces it.

@bcmills
Copy link
Contributor

bcmills commented Sep 16, 2019

CC @jayconrod @oiooj

@liuchang0812
Copy link
Author

@bcmills I added a test case in src/cmd/go/internal/modconv/convert_test.go, see #33343

@bcmills bcmills changed the title cmd/go: conversion from Dep puts replacement module path in require section cmd/go: conversion from legacy dependency managers puts replacement module path in require section Sep 26, 2019
@bcmills
Copy link
Contributor

bcmills commented Sep 26, 2019

@liuchang0812, I don't think we even need a new test case. We need to fix the existing mod_init_dep test case as described in CL 126915.

@bcmills
Copy link
Contributor

bcmills commented Dec 11, 2023

This is no longer needed due to #53327.

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 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

3 participants