Description
When using nix style package ids, we get very long paths, e.g.
C:\Users\hvr\AppData\Roaming/cabal/store/ghc-8.0.0.20160421/unordered-containers-0.2.7.0-983a8e913817af8e0a8d0bb61ab730ac015f7cd650d0c8e1f28eac6ab8b068a8/lib/libHSunordered-containers-0.2.7.0-983a8e913817af8e0a8d0bb61ab730ac015f7cd650d0c8e1f28eac6ab8b068a8.a
This is 258 chars long. The Windows max path is 260 (including the driver letter etc).
While it's certainly possible to use the Windows APIs to get long file name support, all the programs that work with these files have to support that, this includes not just cabal but ghc, gcc, linker utils etc. So it is impractical to take that approach. The only workable approach is to keep the lengths down.
Given that we are using a nix style store, there is no reason to include the full package id into the paths within each store entry. While we can link multiple versions of a package into one exe, we cannot link multiple instances of the same package (right @ezyang) in which case we don't need to duplicate the id into the .a
library name.
When did this change incidentally? We used to only use the package name + version for the lib name.