You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create a package and a test for the package in a deep directory structure (for me
this happens with 127 character path)
2. Run "go test" in that directory from the DOS prompt
What is the expected output?
Success or failure from the go test
What do you see instead?
An error from DOS indicating that the temporary directory structure is too deep.
Which compiler are you using (5g, 6g, 8g, gccgo)?
Which operating system are you using?
Windows 7 Pro 64-bit
Which version are you using? (run 'go version')
go version go1.1.2 windows/amd64
Please provide any additional information below.
Here is my command line and the output:
c:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programm
ing-questions\common\code\golang\src\algoutils>go test
# _/c_/dean/courses/algorithms-stanford/design.and.analysis.of.algorithms.1/prog
ramming-questions/common/code/golang/src/algoutils
mkdir C:\Users\dean\AppData\Local\Temp\go-build651070751\_\c_\dean\courses\algor
ithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\
code\golang\src\algoutils\_test\_\c_\dean\courses\algorithms-stanford\design.and
.analysis.of.algorithms.1: The filename or extension is too long.
The Windows API has a problem with path names longer than 255 characters, unless the
path starts with "\\?\"
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out, Alex.
I forgot to mention that this happens when GOPATH is not set and go test is using the
working directory. (The part about using the working directory isn't in the docs or
help for go test and someone on go-nuts told me to try it.)
Should go test even be using the working directory? I didn't know anything in the go
tool chain used the working directory. Does the go tool chain normally include the
working directory or is this a one-off?
go command will always try current directory if you don't provide import path. Most of
the time that current directory will be located under %GOPATH%. If it is not, "go build"
and "go test" commands will still work. I am not sure how "official" these facilities
are, but we use them in a go build script
(https://code.google.com/p/go/source/browse/src/run.bat#66 and others).
Alex
by dean.w.schulze:
The text was updated successfully, but these errors were encountered: