Small fixes for windows#84
Conversation
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.
|
Ahh I was hoping to account for that by using the 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. |
|
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. 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? |
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.
The relative method https://github.com/matthewmueller/joy/blob/master/internal/mains/mains.go#L43 will not work when you have Go installed on a different disk then the file you are compiling on. In my case I have Golang installed on my D: drive and I was trying to compile a file in the tmp folder which is on my C: drive
Related error is: error building code: error finding mains: unable to get relative path: Rel: can't make C:\Users\tryy3\AppData\Local\Temp\sandbox578858875\main.go relative to D:\Codes\Golang\src\github.com\tryy3\joyplayground\sandbox
The command "joy" is already an existing command on windows that opens the "Game controller" application, there is probably not much to do about this issue other than maybe an alias or a note on the README?