-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wantedmodules
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.13.1 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 GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/budougumi0617/Library/Caches/go-build" GOENV="/Users/budougumi0617/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/budougumi0617/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/opt/go/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/budougumi0617/go/src/github.com/budougumi0617/til/go/tui/promptui/go.mod" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sy/ls4cfp216x774g54brzl67yw0000gn/T/go-build596997761=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
https://play.golang.org/p/LTTwK6ldWiB
I put below files in current directory.
main.go
package main
import (
"fmt"
"github.com/manifoldco/promptui"
)
func main() {
fmt.Println(promptui.FGRed)
}
go.mod
module github.com/budougumi0617/til/go/tui/promptui
go 1.13
require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/alecthomas/units v0.0.0-20190910110746-680d30ca3117 // indirect
github.com/manifoldco/promptui v0.3.2
github.com/nicksnyder/go-i18n v1.10.1 // indirect
gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c // indirect
)
replace github.com/nicksnyder/go-i18n v1.10.1 => github.com/nicksnyder/go-i18n/v2 v2.0.2
go build
command is success.
$ go clean --modcache
$ rm go.sum
$ go build . // build ok
And, I did go mod tidy
command for format go.mod
. As a result, go mod tidy
changed go.mod
file.
$ cp go.mod go.mod.before // keep original go.mod file
$ go mod tidy
$ diff go.mod.before go.mod
--- go.mod.before 2019-10-01 16:25:03.000000000 +0900
+++ go.mod 2019-10-01 16:25:11.000000000 +0900
@@ -7,6 +7,7 @@
github.com/alecthomas/units v0.0.0-20190910110746-680d30ca3117 // indirect
github.com/manifoldco/promptui v0.3.2
github.com/nicksnyder/go-i18n v1.10.1 // indirect
+ github.com/nicksnyder/go-i18n/v2 v2.0.2 // indirect
gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20180810215634-df19058c872c // indirect
)
But, go build
now failed.
$ go build .
go: github.com/nicksnyder/go-i18n/v2@v2.0.2 used for two different module paths (github.com/nicksnyder/go-i18n and github.com/nicksnyder/go-i18n/v2)
What did you expect to see?
I expect the result of go mod tidy
is able to buld, or go mod tidy
failed if go.mod
file is invalid.
What did you see instead?
I tried same procedures, on docker. Unfortunately, I get same result.
$ docker container run -it --name my_golang -v $(pwd):/go/src/ golang:latest
go env
Output ( on container)
$ root@734e4aabfb61:/go/src# go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/go/src/go.mod" 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-build324591870=/tmp/go-build -gno-record-gcc-switches"
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wantedmodules