Skip to content

GopherJS created some strange directory paths for compiled files. #60

Closed
@dmitshur

Description

@dmitshur

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/...

$ tree /Users/Dmitri/Dropbox/Work/2013/GoLanding:/
/Users/Dmitri/Dropbox/Work/2013/GoLanding:/
└── Users
    └── Dmitri
        ├── Dropbox
        │   └── Work
        │       └── 2013
        │           └── GoLand
        │               └── pkg
        │                   ├── darwin_amd64_js
        │                   │   ├── runtime.a
        │                   │   └── syscall.a
        │                   ├── darwin_amd64_js-min
        │                   │   ├── runtime.a
        │                   │   └── syscall.a
        │                   ├── darwin_js
        │                   │   ├── bufio.a
        │                   │   ├── bytes.a
        │                   │   ├── errors.a
        │                   │   ├── flag.a
        │                   │   ├── fmt.a
        │                   │   ├── go
        │                   │   │   ├── scanner.a
        │                   │   │   └── token.a
        │                   │   ├── io
        │                   │   │   └── ioutil.a
        │                   │   ├── io.a
        │                   │   ├── math.a
        │                   │   ├── os
        │                   │   │   └── exec.a
        │                   │   ├── os.a
        │                   │   ├── path
        │                   │   │   └── filepath.a
        │                   │   ├── reflect.a
        │                   │   ├── regexp
        │                   │   │   └── syntax.a
        │                   │   ├── regexp.a
        │                   │   ├── runtime
        │                   │   │   └── pprof.a
        │                   │   ├── sort.a
        │                   │   ├── strconv.a
        │                   │   ├── strings.a
        │                   │   ├── sync
        │                   │   │   └── atomic.a
        │                   │   ├── sync.a
        │                   │   ├── testing.a
        │                   │   ├── text
        │                   │   │   └── tabwriter.a
        │                   │   ├── time.a
        │                   │   ├── unicode
        │                   │   │   └── utf8.a
        │                   │   └── unicode.a
        │                   └── darwin_js-min
        │                       ├── bufio.a
        │                       ├── bytes.a
        │                       ├── errors.a
        │                       ├── flag.a
        │                       ├── fmt.a
        │                       ├── io
        │                       │   └── ioutil.a
        │                       ├── io.a
        │                       ├── math.a
        │                       ├── os
        │                       │   └── exec.a
        │                       ├── os.a
        │                       ├── path
        │                       │   └── filepath.a
        │                       ├── reflect.a
        │                       ├── regexp
        │                       │   └── syntax.a
        │                       ├── regexp.a
        │                       ├── runtime
        │                       │   └── pprof.a
        │                       ├── sort.a
        │                       ├── strconv.a
        │                       ├── strings.a
        │                       ├── sync
        │                       │   └── atomic.a
        │                       ├── sync.a
        │                       ├── testing.a
        │                       ├── text
        │                       │   └── tabwriter.a
        │                       ├── time.a
        │                       ├── unicode
        │                       │   └── utf8.a
        │                       └── unicode.a
        └── Local
            └── GoTrLand:
                └── Users
                    └── Dmitri
                        └── Dropbox
                            └── Work
                                └── 2013
                                    └── GoLand
                                        └── pkg
                                            ├── darwin_amd64_js
                                            │   ├── runtime.a
                                            │   └── syscall.a
                                            ├── darwin_amd64_js-min
                                            │   ├── runtime.a
                                            │   └── syscall.a
                                            ├── darwin_js
                                            │   ├── bufio.a
                                            │   ├── bytes.a
                                            │   ├── errors.a
                                            │   ├── fmt.a
                                            │   ├── io
                                            │   │   └── ioutil.a
                                            │   ├── io.a
                                            │   ├── math.a
                                            │   ├── os
                                            │   │   └── exec.a
                                            │   ├── os.a
                                            │   ├── path
                                            │   │   └── filepath.a
                                            │   ├── reflect.a
                                            │   ├── regexp
                                            │   │   └── syntax.a
                                            │   ├── regexp.a
                                            │   ├── sort.a
                                            │   ├── strconv.a
                                            │   ├── strings.a
                                            │   ├── sync
                                            │   │   └── atomic.a
                                            │   ├── sync.a
                                            │   ├── time.a
                                            │   ├── unicode
                                            │   │   └── utf8.a
                                            │   └── unicode.a
                                            └── darwin_js-min
                                                ├── bufio.a
                                                ├── bytes.a
                                                ├── errors.a
                                                ├── fmt.a
                                                ├── io
                                                │   └── ioutil.a
                                                ├── io.a
                                                ├── math.a
                                                ├── os
                                                │   └── exec.a
                                                ├── os.a
                                                ├── path
                                                │   └── filepath.a
                                                ├── reflect.a
                                                ├── regexp
                                                │   └── syntax.a
                                                ├── regexp.a
                                                ├── sort.a
                                                ├── strconv.a
                                                ├── strings.a
                                                ├── sync
                                                │   └── atomic.a
                                                ├── sync.a
                                                ├── time.a
                                                ├── unicode
                                                │   └── utf8.a
                                                └── unicode.a

53 directories, 102 files

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions