Closed SantiMunin closed 9 years ago
It seems like the function writePackageDescription in cabal is broken or changed its behaviour in a newer version of cabal.
I tried to manually create a package description in ghci (loading the file Bnfc-cabal.hs
) as follows
let config = Config [0,1] "bnfc"
let pd = updatePd config "Haskell" emptyPackageDescription
Evaluating pd
in ghci prints the correct package description (also containing the dependencies).
When using the function writePackageDescription to write that very package description to a file, the dependencies are missing in the generated file:
writePackageDescription "/tmp/fooooo.cabal" pd
The function writePackageDescription
internally uses showPackageDescription, which causes the package dependecies to disappear.
I will ask the cabal developers whether this is a bug or they changed it on purpose.
The global build depends attribute is depricated, hence I assigned the dependencies to the library.
Hello,
I re-run the program with the newest changes. What I get is close to compile but some fields needs to be added (basically build-depends with base and array dependencies). Looking at the source code it should work, so I open this issue because I don't know how to fix it.
Generated file:
Lines 123-127 has the required fields but they are not written then.
Thanks!