Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Custom build root does not work on Windows #666

Open
snowleopard opened this issue Aug 29, 2018 · 2 comments
Open

Custom build root does not work on Windows #666

snowleopard opened this issue Aug 29, 2018 · 2 comments

Comments

@snowleopard
Copy link
Owner

snowleopard commented Aug 29, 2018

I've tried changing the build root on Windows like this:

$ ./build.stack.bat -j --flavour=quickest --integer-simple -c -o/d/test

and this:

$ ./build.stack.bat -j --flavour=quickest --integer-simple -c -oD:\test

But both fail with errors:

C:/msys/home/nam83/ghc/D:/test/stage0/utils/compare_sizes\: openBinaryTempFileWithDefaultPermissions: invalid argument (Invalid argument)

and

cp: cannot create directory ‘D:test/mingw’: No such file or directory

Clearly we are not handling paths correctly. I suspect we oversimplified our implementation of -/-:

https://github.com/snowleopard/hadrian/blob/master/src/Hadrian/Utilities.hs#L133-L140

There is already an issue about -/-: #434, but I'm not sure if it's necessarily a duplicate.

@alpmestan
Copy link
Collaborator

Hmm. Isn't there an implementation of this somewhere, that we could just use or steal?

@snowleopard
Copy link
Owner Author

@alpmestan Presumable </> does the right thing and we used to have a -/- b = unifyPath (a </> b) but that was very slow due to unifyPath, which we need, as otherwise Windows paths are a mess of slashes looking in random directions. We should clearly be able to do better, but noone has yet come up with a good plan.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants