FS#58797 - [haskell-colour] [haskell-test-framework] [haskell-ansi-terminal] circular dependencies

Attached to Project: Community Packages
Opened by Erich Eckner (deepthought) - Wednesday, 30 May 2018, 15:12 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 25 June 2018, 02:09 GMT
Task Type Support Request
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The dependency cycle:

[haskell-colour] -(makedepends)-> [haskell-test-framework] -(depends)-> [haskell-ansi-terminal] -(depends)->
[haskell-colour]

prevents downstream distributions like archlinux32 from switching to a new ghc-libs version. Any package from that cycle cannot be compiled with the new ghc, because it complains about broken dependencies like:
"==> Starting build()...
Configuring colour-2.3.4...
Error:
The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
installed package ansi-terminal-0.7.1.1 is broken due to missing package base-4.10.1.0
installed package ansi-wl-pprint-0.6.8.2 is broken due to missing package base-4.10.1.0
installed package colour-2.3.4 is broken due to missing package base-4.10.1.0
..."
(taken from the log of haskell-colour's build)

How have these packages been built?

cheers,
deep42thought
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Monday, 25 June 2018, 02:09 GMT
Reason for closing:  Fixed
Comment by Felix Yan (felixonmars) - Wednesday, 06 June 2018, 05:52 GMT
This requires a two-pass build, the first pass changes --enable-tests to --disable-tests and builds with --nocheck, and the second pass changed back. Note that the soname will also change when flags were changed.
Comment by Eli Schwartz (eschwartz) - Wednesday, 13 June 2018, 18:27 GMT
Felix, is there any way to tell haskell to only build the testsuite during check()?
Comment by Eli Schwartz (eschwartz) - Thursday, 14 June 2018, 01:55 GMT
So, haskell is sort of difficult about this, however, we can do the next best thing. See https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/haskell-colour&id=b320b1953e3cbac8bde4f4c14c2b24271c28b343

checkdepends are now back in checkdepends=() and the tests are conditional on whether $CHECKFUNC is set (indicating makepkg will be executing a check() function). It should now be possible to build bootstrapped packages just by using --nocheck... although this will result in non-reproducible packages since haskell considers this to be ABI-breaking, and all other packages will need to be rebuilt if you re-enable the check(), so yeah... fun.

Loading...