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 module trace new version for branches #30972

Closed
guhan121 opened this issue Mar 21, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@guhan121
Copy link

commented Mar 21, 2019

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

$ go version
go version go1.11.1 darwin/amd64

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/qiantao/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/qiantao/work/GoTestSrc"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.1/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c7/4l8jfrp1699b8mhj2qjltwjr0000gn/T/go-build796658272=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

We have two project : lib-a and project-a

the project-a import lib-a ; if we need Implement a new feature ;
we checkout two new branches : lib-a-love-feature and project-a-love-feature

and project-a-love-feature import the codes in lib-a-love-feature

so go.mod in project-a-love-feature must is

module git.hezi.com/qiantao/project-a

require (
	git.hezi.com/qiantao/lib-a lib-a-love-feature
	github.com/go-log/log v0.1.0
	github.com/micro/go-micro v0.24.0
	rsc.io/quote v1.5.2
)

after go run main.go

go.mod in project-a-love-feature updated like this

module git.hezi.com/qiantao/project-a

require (
	git.hezi.com/qiantao/lib-a v0.0.0-20190321071845-f40956c1bfe6
	github.com/go-log/log v0.1.0
	github.com/micro/go-micro v0.24.0
	rsc.io/quote v1.5.2
)

v0.0.0-20190321071845-f40956c1bfe6 is a latest version for branch lib-a-love-feature

next !!
we push new codes to branch lib-a-love-feature

but in branch project-a-love-feature, because the go.mod is modified, we do not get the new codes!

have any way to keep go.mod

@guhan121 guhan121 changed the title go module trace new version for branches cmd/go: go module trace new version for branches Mar 22, 2019

@katiehockman

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

This seems like a question about how to use modules, rather than a bug or feature request. For questions about Go, see https://golang.org/wiki/Questions.

I'm going to close this issue, but please file another one if there is a bug or proposal that you would like to bring forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.