-
Notifications
You must be signed in to change notification settings - Fork 570
GopherJS created some strange directory paths for compiled files. #60
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
Comments
I have a guess as to what ended up creating that nesting folder structure. Are you assuming the GOPATH env var contains a path to a single workspace? Because mine contains 2-3 workspaces, colon separated.
See the definition of GOPATH env var:
http://golang.org/cmd/go/#hdr-GOPATH_environment_variable I recommend using http://godoc.org/path/filepath#SplitList to process GOPATH env var. See, e.g. here. |
Yep, my guess confirmed: Lines 364 to 367 in 278c542
It doesn't use http://godoc.org/path/filepath#Join to join the path, and doesn't use http://godoc.org/path/filepath#SplitList to split the GOPATH env var into 1 or more GOPATH workspaces. Another instance in Lines 57 to 58 in 278c542
|
Usually I use |
Sure, it will take me a few days to get enough free time though. |
I've just discovered a really puzzling directory, which seems to have been produced by gopherjs incorrectly. My GOPATH contains two workspaces
/Users/Dmitri/Dropbox/Work/2013/GoLand
and/Users/Dmitri/Dropbox/Work/2013/GoLanding
. But there's folder is named/Users/Dmitri/Dropbox/Work/2013/GoLanding:/
, and inside it, there is/Users/Dmitri/Dropbox/Work/2013/GoLanding:/Users/Dmitri/...
It looks like something went wrong in calculating paths. This is on OS X. I highly recommend using
path/filepath
and funcs like http://godoc.org/path/filepath#Join that are safe to use across different OSes (if you're not already), rather than joining strings by hand.The text was updated successfully, but these errors were encountered: