matthewmueller / joy

A delightful Go to Javascript compiler (ON HOLD)
https://mat.tm/joy
GNU General Public License v3.0
1.32k stars 35 forks source link

Small fixes for windows #84

Closed tryy3 closed 6 years ago

tryy3 commented 6 years ago

Because windows uses a different filesystem, it's better to use the filepath package, I am sure there is more problems, but this fix will at least make joy work.

There is a few more windows related issues I have found.

matthewmueller commented 6 years ago

Ahh I was hoping to account for that by using the filepath.Separator, but I guess not. Thanks for the fixes!

The relative issue seems like it might be tough unless we rewrite/fork Go's default importer (https://golang.org/src/go/build/build.go#L1130)

It errors out if I try to give it absolute paths.

tryy3 commented 6 years ago

Yeah I am not sure if the relative issue should be fixed either... becuase in most cases you are supposed to have your code in the $GOPATH, so I don't know how many people will encounter my problem. For now I simply set a different tmp folder path, but if we make the streaming that you mentioned https://github.com/matthewmueller/joy/issues/73#issuecomment-352639096 here my issue will be resolved.

So the question regarding relative issue is, should we try to fix it or should all paths be relative and it's up to the user who use joy to make sure the paths can be relative?