Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "init: check pkg name and .cabal file name match"
This reverts commit 63c7f48. @harendra-kumar The reverted commit seems to break the 1336-1337-new-package-names integration test on Mac OS X. I did a bit of debugging and it appears that, somewhere along the way, some unicode characters are changing (they look the same when rendered, but the UTF-8 bytes are different) and that is causing the comparison to fail. For example: ``` $ stack new ば日本-4本 [...] Package name as defined in the .cabal file must match the .cabal file name. Please fix the following packages and try again: - ば日本-4本/ば日本-4本.cabal ``` `show (FP.takeBaseName $ toFilePath fp,show $ gpdPackageName gpd)` in this case gives me `("\12399\12441\26085\26412-4\26412","\12400\26085\26412-4\26412")`; note the first two bytes in the fst are different than the first byte in the snd.
- Loading branch information
cf18703
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.
@harendra-kumar I guess when I say "byte" above I should say "codepoint". I wouldn't normally revert right away, but I'm trying to get a release out the door and this looks pretty safe to revert without affecting anything else.
cf18703
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 ok to revert this one. We can fix it post release. I will take a look what's going on.
cf18703
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.
Is
stack build
working fine once this package gets created?cf18703
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.
I raised #1810 to track this.
cf18703
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.
I actually didn't test that.
cf18703
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.
If its not just a problem with the comparison, meaning
stack new
is really creating a filename which is different than the package name thenstack build
will fail because it performs the same check. In that case this revert will push the problem to later which is in fact a tad worse than pre-revert.cf18703
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.
Ok, I just tested and
stack build
does indeed fail for this case.cf18703
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.
Uncicode is fun. I suspect the problem is somewhere in String->Text->String conversion, since Text handles unicode differently than String.
cf18703
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.
I've un-reverted this change in master, since it is just making a pre-existing problem happen sooner. Since it causes integration tests to fail on Mac OS X, I'm giving this priority P1: Must. Ideally, the old bug should also have caused integration tests to fail.