-
Notifications
You must be signed in to change notification settings - Fork 841
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
Avoid MAX_PATH for precompiled cache #3649 #3702
Conversation
Consider rebasing this to the |
0487b61
to
880efce
Compare
Good point! I have rebased and retargetted stable |
880efce
to
2a69f1e
Compare
Regression was in 9991156
2a69f1e
to
6e6934d
Compare
I tried this new version on Windows and I'm still getting what appear to be path length errors building projects. An error occurs after building a small number of dependencies, usually less than ten. The weird thing is that when I restart the build it continues as if nothing had gone wrong, and then fails again after building a few more dependencies. If the build is repeatedly restarted then it will eventually finish. I deleted stack's cache ( This is the output from a couple of turns around this loop:
|
@mungre Curious! Could you please add some debug logging? Maybe something like |
@mgsloan I extended the logging to show both the original path and the shortened path; they were always identical. So I added logging to the case expression that checks the path length. It always took the maxPathLength=Nothing branch. Of course, the error lies in the one thing the compiler doesn't validate!
It seems to have been able to resume failed builds because the files it is creating are just pointers to other files (as far as I can see) and they don't actually seem to be required. |
@mgsloan Thanks for fixing this. I've just had another silly failure: it doesn't work when the path length is exactly 260 characters. Microsoft's MAX_PATH includes room for a terminating null character, so the maximum path is actually 259 characters. So the "Just 260" should be "Just 259". I think this could still fail with astral plane characters (Haskell counts them as one but Windows counts them as two) but they are unlikely in this context anyway. |
@mungre Good catch! I was a little worried about corner cases with the number. Feel like opening a PR adjusting that? Would be great to fix the astral plane char thing too, shouldn't be too hard, just a fold over Text |
@mgsloan Yes, I'll have a go. |
Regression was in 9991156
I have not tested this change, since I do not currently have easy access to windows.
Please include the following checklist in your PR: