General summary/comments (optional)
Stack 2.1.1 fails to build when module names contain ä. Stack 1.9.3 does NOT fail.
Steps to reproduce
- Clone https://github.com/bjornbm/umlaut-stack.git
stack build --verbose
Expected
A successful build.
Actual
The build fails with (last lines of output, for full output see gist):
2019-07-04 22:13:21.591710: [info] Linking .stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/umlaut-exe/umlaut-exe ...
2019-07-04 22:13:23.467465: [debug] Process finished in 4757ms: /Users/bjorn/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:umlaut exe:umlaut-exe --ghc-options ""
2019-07-04 22:13:23.468057: [debug] Start: getPackageFiles /Users/bjorn/repos/umlaut/umlaut.cabal
2019-07-04 22:13:23.470598: [debug] Finished with exception in 2ms: getPackageFiles /Users/bjorn/repos/umlaut/umlaut.cabal
Exception thrown: ModuleName.fromComponents: invalid components ["T\195\164st"]
CallStack (from HasCallStack):
error, called at ./Distribution/ModuleName.hs:105:46 in Cabal-2.4.0.1-3bZfb3D11r2LsqHGk5ybV3:Distribution.ModuleName
2019-07-04 22:13:23.473932: [error] ModuleName.fromComponents: invalid components ["T\195\164st"]
CallStack (from HasCallStack):
error, called at ./Distribution/ModuleName.hs:105:46 in Cabal-2.4.0.1-3bZfb3D11r2LsqHGk5ybV3:Distribution.ModuleName
The error is reported by a cabal function ModuleName.fromComponents, but since the ChangeLog.md says that Cabal 2.4 has been used since stack-1.9.1 I assume there is a change in how stack passes the module names to cabal.
May be related to UTF normalisation? (ore the absence thereof?)
Interestingly if the Täst module is imported by Main.hs instead of Lib.hs the build completes just fine (see branch named "works").
Stack version
$ stack --version
Version 2.1.1, Git revision f612ea85316bbc327a64e4ad8d9f0b150dc12d4b (7648 commits) x86_64 hpack-0.31.2
Method of installation
stack upgrade --force-download
General summary/comments (optional)
Stack 2.1.1 fails to build when module names contain ä. Stack 1.9.3 does NOT fail.
Steps to reproduce
stack build --verboseExpected
A successful build.
Actual
The build fails with (last lines of output, for full output see gist):
The error is reported by a cabal function
ModuleName.fromComponents, but since the ChangeLog.md says that Cabal 2.4 has been used since stack-1.9.1 I assume there is a change in how stack passes the module names to cabal.May be related to UTF normalisation? (ore the absence thereof?)
Interestingly if the
Tästmodule is imported byMain.hsinstead ofLib.hsthe build completes just fine (see branch named "works").Stack version
Method of installation
stack upgrade --force-download