Open snoyberg opened 6 years ago
Sounds like a duplicate of #2557 to me
It looks like a dup indeed, apparently not limited to OS X. Please do test on OSX though; since NFD filename normalization might cause similar problems to what we’ve seen in Stack, and https://github.com/commercialhaskell/stack/issues/1337 shows at least some would like Unicode package names.
@Blaisorblade Well, I'm very keen on getting Cabal Unicode-proper, to the extent that the underlying operating systems allows this... but once I fix #2557 I'll clearly have to check whether less transparent OS fileystems APIs such as Win32 or OSX need some OS-specific quirks... :-)
@hvr Did you look at this after fixing #2557?
First, the repro, then the background. This likely only repros on OS X (explained below). Place the following files in a directory:
Setup.hs
:package.cabal
:Then run the following series of commands:
Expected: Builds the package correctly
Actual: complains repeatedly about corrupt file header. Re-running 'configure' does not help.
Background
This popped up when debugging a failing integration test in Stack. It turns out that this specific name for a package has a long history on the Stack side, since (on OS X) it appears that some Unicode normalization is applied to filenames, therefore making the sequence of code points stored in the cabal file mismatch the sequence returned by the OS from the generated file name. For a lot more information, see these issues:
I'm guessing that a similar file name codepoint modification is occurring inside the
dist
directory.