Skip to content
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

Fix off-by-one and char encoding issue #3649 #3702 #3735

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

mungre
Copy link

@mungre mungre commented Jan 1, 2018

As described in #3649, stack fails on Windows when building project dependencies because the paths it generates for cached files are too long. #3702 and 36c1226 are fixes to this but contain an off-by-one error so builds still fail when a cache path is exactly 260 characters long. This patch fixes the off-by-one error.

Additionally, the Windows 260 character path limit is counted in 16-bit utf-16 code units, not unicode characters. This patch also addresses this.

This is only tested on Windows, but the non-Windows functionality should not have changed.

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

To test this I rebuilt stack and a simple yesod app and all their dependencies using this modified stack. This had previously failed. I also edited the CPP constant to ensure the non-Windows branch of the code compiles without error.

@mgsloan
Copy link
Contributor

mgsloan commented Jan 11, 2018

This looks great, @mungre, thanks! My bad on the delay in merging.

@mgsloan mgsloan merged commit 0497183 into commercialhaskell:stable Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants