Repository navigation
Open
Labels
Description
The Cabal.cabal file has to declare parsec as a dependency of the setup script. This problem exists in current versions of master as well as in the 2.2.0.1 release.
$ ghc --make Setup.hs
[ 1 of 217] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, Distribution/Compat/Binary.o )
[ 2 of 217] Compiling Distribution.Compat.Directory ( Distribution/Compat/Directory.hs, Distribution/Compat/Directory.o )
[ 3 of 217] Compiling Distribution.Compat.Exception ( Distribution/Compat/Exception.hs, Distribution/Compat/Exception.o )
[ 4 of 217] Compiling Distribution.Compat.Internal.TempFile ( Distribution/Compat/Internal/TempFile.hs, Distribution/Compat/Internal/TempFile.o )
[ 5 of 217] Compiling Distribution.Compat.Map.Lazy ( Distribution/Compat/Map/Lazy.hs, Distribution/Compat/Map/Lazy.o )
[ 6 of 217] Compiling Distribution.Compat.Map.Strict ( Distribution/Compat/Map/Strict.hs, Distribution/Compat/Map/Strict.o )
[ 7 of 217] Compiling Distribution.Compat.MonadFail ( Distribution/Compat/MonadFail.hs, Distribution/Compat/MonadFail.o )
[ 8 of 217] Compiling Distribution.Compat.Newtype ( Distribution/Compat/Newtype.hs, Distribution/Compat/Newtype.o )
[ 9 of 217] Compiling Distribution.Compat.Semigroup ( Distribution/Compat/Semigroup.hs, Distribution/Compat/Semigroup.o )
[ 10 of 217] Compiling Distribution.Compat.Stack ( Distribution/Compat/Stack.hs, Distribution/Compat/Stack.o )
[ 11 of 217] Compiling Distribution.Compat.Prelude ( Distribution/Compat/Prelude.hs, Distribution/Compat/Prelude.o )
[ 12 of 217] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, Distribution/Compat/ReadP.o )
[ 13 of 217] Compiling Distribution.Compat.Parsing ( Distribution/Compat/Parsing.hs, Distribution/Compat/Parsing.o )
Distribution/Compat/Parsing.hs:61:1: error:
Could not find module ‘Text.Parsec’
Use -v to see a list of the files searched for.
|
61 | import qualified Text.Parsec as Parsec
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Reacted by Greg Berns
Activity
PostProcess.hs: Cabal 2.2.0.1 has undeclared setup dependencies
hvr commentedon Jun 23, 2018
@peti there's not much we can do here;
pkg:Cabalis abuild-type: Simplepackage so by definition its containedSetup.hsis supposed to be redundant, and thus there's also nosetup-depends; and such aSetup.hsfile is supposed to be compatible w/ anylib:Cabalversion. The special case of bootstrappinglib:Cabalw/o having anylib:Cabalpre-installed is very special (because, the original CABAL specification in fact demands that every compiler environment comes with alib:Cabalfile pre-installed!), and so this has to be treated manually by packagers of Haskell environments (which themselves constitute a special case).peti commentedon Jul 19, 2018
Why does Cabal have to be a
build-type: Simplepackage? I mean, those setup dependencies just exist. It's a matter of fact. So why not declare them?phadej commentedon Jul 19, 2018
Cabalisbuild-type: Simplepackage. I think because we havehs-source-dirs: ., the stuff is picked up which shouldn't. I d on't remember why we didn't move sources undersrc/, IIRC there was some good reason too. Maybe it was exactly bootstrapping (though, couldn't we then use-isrc?)hvr commentedon Jul 19, 2018
Long time ago, cabal was
build-type: Custom, but everyone (and even more so now w/ nix-style builds in combination withcustom-setupstanzas which happily recompile multiple lib:Cabal versions even within the same build-plan...) had to pay twice the build-time (which is no joke as lib:Cabal is likely in the top percentile of build-time length for Hackage packages) forlib:Cabal; so this was changed already back in 2015 via #2847 / #2845, and then there also was also the #3003 issue lateron.I don't agree here; the code in
Setup.hsper-se does not require any depedencies (besidesbaseandCabal+ transitive deps)!If you compile it with
ghc -i --make Setup.hsit will work essentially everywherelib:baseandlib:Cabalare exposed! Maybe we should go back to moving everything intosrc/sub-folder and usehs-source-dirs: srcto make this more obvious/explicit.PostProcess.hs: Cabal 2.2.0.1 has undeclared setup dependencies