[Hackage] #714: cabal: Couldn't read cabal file
".\\HaTeX\\1.0.0\\HaTeX.cabal"
Hackage
cvs-ghc at haskell.org
Fri Jul 30 10:33:11 EDT 2010
#714: cabal: Couldn't read cabal file ".\\HaTeX\\1.0.0\\HaTeX.cabal"
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.6.0.3
Severity: normal | Keywords:
Difficulty: normal | Ghcversion: 6.12.1
Platform: Windows |
---------------------------------+------------------------------------------
Comment(by duncan):
Ah, found the problem.
When we read a .cabal file from disk we use readUTF8File which ignores the
BOM. We do not do the same when reading the .cabal entry from the index
tarball in cabal-install.
Really we should make `parsePackageDescription` take a `ByteString` and
have it do all the decoding (utf, bom, line ending conversion) there in a
single place.
Ross: the temporary solution is to change the hackage-scripts upload
script to read the .cabal file from disk using a modified readUTF8File
that does not ignore the BOM:
{{{
readUTF8File_LeavingBOMIntact :: FilePath -> IO String
readUTF8File_LeavingBOMIntact f = fmap fromUTF8
. hGetContents =<< openBinaryFile f
ReadMode
}}}
We should also edit the two HaTex .cabal files in the current archive to
strip off the BOM.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/714#comment:6>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list