Skip to content

Backport #3431 to the 1.24 branch#3954

Merged
ezyang merged 1 commit intohaskell:1.24from
23Skidoo:backport-3431
Oct 8, 2016
Merged

Backport #3431 to the 1.24 branch#3954
ezyang merged 1 commit intohaskell:1.24from
23Skidoo:backport-3431

Conversation

@23Skidoo
Copy link
Member

@23Skidoo 23Skidoo commented Oct 8, 2016

No description provided.

On Windows we have serious problems with path lengths. Windows imposes a
maximum path length of 260 chars, and even if we can use the windows
long path APIs ourselves, we cannot guarantee that ghc, gcc, ld, ar, etc
etc all do so too.

So our only choice is to limit the lengths of the paths, and the only
real way to do that is to limit the size of the 'InstalledPackageId's
that we generate. We do this by truncating the package names and
versions and also by truncating the hash sizes.

Truncating the package names and versions is technically ok because they
are just included for human convenience, the full source package id is
included in the hash.

Truncating the hash size is disappointing but also technically ok. We
rely on the hash primarily for collision avoidance not for any securty
properties (at least for now).

(cherry picked from commit 541ac88)
@mention-bot
Copy link

@23Skidoo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dcoutts and @hvr to be potential reviewers.

@ezyang ezyang merged commit bc8e704 into haskell:1.24 Oct 8, 2016
@23Skidoo 23Skidoo deleted the backport-3431 branch October 8, 2016 20:47
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.

4 participants