-
Notifications
You must be signed in to change notification settings - Fork 844
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 #1810: Unicode-normalized pkg name comparison #2397
Fix #1810: Unicode-normalized pkg name comparison #2397
Conversation
FWIW, the affected integration test appears to still work for me on my OS X machine with this PR. Here's the complete transcript (sorry for the noise), grep for
|
@@ -560,8 +562,10 @@ cabalPackagesCheck cabalfps noPkgMsg dupErrMsg = do | |||
-- Just the latter check is enough to cover both the cases | |||
|
|||
let packages = zip cabalfps gpds | |||
-- XXX taken from https://github.com/ppelleti/normalization-insensitive, see #1810 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its just a String to Text conversion and back. I don't think you need this comment here. You can call it normalizeString to indicate that this is for String.
I'm on holiday, but I'll address the comments and rebase the PR next week. |
The filename gets normalized to NFD on OS X causing spurious failures. Let's normalize both sides to NFC in case the Cabal file is in some other normalization for any reason. This is a slight hack.
… X, for now (commercialhaskell#1810)" This reverts commit 87fec57, now that we have a proper fix.
65c4a37
to
ccb120e
Compare
I just ran the integration tests locally on OS X (ahem, with LTS-6.6), tests passed, and it seems uncontroversial enough. Hence I'm merging the PR (this seems OK for stack, though discouraged for other projects). Thanks to @harendra-kumar for his comments! |
Hurrah! |
(Untested yet).
Potential quick fix to the most urgent part #1810, based on @harendra-kumar's pure Haskell normalization library. A more proper and systematic fix, replacing
text
with a normalizing version, remains for future work.Includes one line from normalization-insensitive, pending https://github.com/ppelleti/normalization-insensitive#2—maybe I should add @ppelleti's copyright or is this line too trivial?