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/go2go: tests fail on windows in draft go packages supporting contracts (CL 187317) #39211

Closed
AndrewWPhillips opened this issue May 22, 2020 · 4 comments
Assignees
Milestone

Comments

@AndrewWPhillips
Copy link

@AndrewWPhillips AndrewWPhillips commented May 22, 2020

In Brief

I believe there is a portability bug in src/cmd/go2go/main.go. Uses of the string ":" in four places (lines 80, 83, 115, and 129) should be replaced with string(os.PathListSeparator). Without this fix go2go.exe has a bug on Windows and several of the go2go tests (in src/cmd/go2go/go2go_test.go) fail.

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

$ go version
go version devel +af2b592260 Wed Apr 22 14:12:34 2020 -0700 windows/amd64

Does this issue reproduce with the latest release?

NA

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

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\XXX\AppData\Local\go-build
set GOENV=C:\Users\XXX\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\XXX\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\XXX\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\goroot
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\goroot\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\XXX\Temp\go-build665904782=/tmp/go-build -gno-record-gcc-switches

What did you do?

$ git clone https://go.googlesource.com/go goroot
$ cd goroot
$ git fetch "https://go.googlesource.com/go" refs/changes/17/187317/16
$ git checkout FETCH_HEAD
$ cd src
$ .\all.bat

What did you expect to see?

...
ALL TESTS PASS

What did you see instead?

...
ok cmd/go/internal/work 1.799s
--- FAIL: TestGO2PATH (38.62s)
go2go_test.go:58: running [go build -o C:\Users\XXX\Temp\go2gotest404412347\go2go.exe]
--- FAIL: TestGO2PATH/alg (0.34s)
go2go_test.go:115: running [C:\Users\XXX\Temp\go2gotest308375555\go2go.exe test] in C:\Users\XXX\Temp\go2go308375555\testdata\go2path\src\alg
go2go_test.go:118: alg
go2go_test.go:119: alg.go2:6: cannot find package "contracts" in any of:
D:\goroot\src\contracts (from $GOROOT)
C:\Users\XXX\Temp\go2go724857963:C:\Users\XXX\Temp\go2gotest308375555\testdata\go2path:C:\Users\XXX\go\src\contracts (from $GOPATH)
D:\goroot\bin\go [test] failed: exit status 1
go2go_test.go:122: error testing alg: exit status 1
--- FAIL: TestGO2PATH/chans (1.42s)
...
[further similar errors]
FAIL
FAIL cmd/go2go 42.767s
...

@ALTree ALTree changed the title go2go portability bug cmd/go2go: tests fail on windows in draft go packages supporting contracts (CL 187317) May 22, 2020
@ALTree ALTree added this to the Unplanned milestone May 22, 2020
@ALTree
Copy link
Member

@ALTree ALTree commented May 22, 2020

@bsiegert
Copy link
Contributor

@bsiegert bsiegert commented May 22, 2020

Issues in pending CLs should generally be posted in the code review thread, not here.

@AndrewWPhillips
Copy link
Author

@AndrewWPhillips AndrewWPhillips commented May 22, 2020

Thanks @bsiegert I tried to find a better place, or even submit a pull request but could not find any info on how to do so. Could you tell me where the code review thread is or point me to some doc, please?

@griesemer
Copy link
Contributor

@griesemer griesemer commented May 23, 2020

Thanks for the bug report. You can comment here: https://go-review.googlesource.com/c/go/+/187317 .

Note that this is a rough prototype and there are a lot of things that don't work correctly (and we know about it).

gopherbot pushed a commit that referenced this issue Jun 16, 2020
Don't assume that path lists use colon separators.

Fixes #39211

Change-Id: Ibce7295dcc290a7826ee6b25a06aa36b8e40f961
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go2-dev/+/755784
Reviewed-by: Ian Lance Taylor <iant@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.