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: drive letter is missing in source file path when reporting error #25263
Comments
@alexbrainman does this happen with recent stable versions too? /cc @griesemer |
I checked as far as go1.4.3, and it always has been broken. Alex |
Do tools like gofmt and vet also have the same issue? I'm asking because at the moment the position information they report is slightly different: #24344 |
@alexbrainman Does this also occur if you invoke the compiler with the filenames explicitly? For instance, as in:
|
I had to change my program to make gofmt and vet complain:
So gofmt and vet look OK to me.
Compiler also looks OK to me;
Alex |
@alexbrainman Thanks for checking. Thus suggests that the bug is actually with the go command, not the compiler. |
Fair enough. I will try and debug this when I have time. Unless someone beats me to it. Alex |
I am confused by this issue. I thought the go command tool always tried to convert a absolute path from the compile program to a relative path to current dir. Since current dir is c: \ , so "c:\users\alex\dev\src\a\main.go" is converted to "users\alex\dev\src\a\main.go", anything I misunderstood? Or do you mean such a "users\alex\dev\src\a\main.go" is unclear? should be something like ".\users\alex\dev\src\a\main.go" ? |
Fair enough. I also checked my Linux computer, and it behaves the same way:
So, it looks like, I confused myself. Sorry for wasting your time. Closing this as invalid issue. Alex |
What version of Go are you using (
go version
)?go version devel +5cf3e34f96 Sat May 5 16:27:20 2018 +0000 windows/amd64
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Alex\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=c:\users\alex\dev
set GORACE=
set GOROOT=c:\users\alex\dev\go
set GOTMPDIR=
set GOTOOLDIR=c:\users\alex\dev\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
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\Alex\AppData\Local\Temp\go-build038240854=/tmp/go-build -gno-record-gcc-switches
What did you do?
What did you expect to see?
What did you see instead?
Alex
The text was updated successfully, but these errors were encountered: