Permalink
Browse files

Handle test and bench stanzas without dependencies properly in modula…

…r solver.

During index conversion, the modular solver was discarding test and
bench stanzas without dependencies. As a result, constraints to enable
tests and benchmarks were then ignored in the solver.

This should close issue #940.
  • Loading branch information...
kosmikus committed Apr 25, 2012
1 parent 16ed5a5 commit 4c360d4e6e3a558334880dd0498837171229721b
Showing with 4 additions and 4 deletions.
  1. +4 −4 cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs
@@ -116,16 +116,16 @@ convGPD os arch cid pi
(maybe [] (convCondTree os arch cid pi fds (const True) ) libs ++
concatMap (convCondTree os arch cid pi fds (const True) . snd) exes ++
(prefix (Stanza (SN pi TestStanzas))
(concatMap (convCondTree os arch cid pi fds (const True) . snd) tests)) ++
(L.map (convCondTree os arch cid pi fds (const True) . snd) tests)) ++
(prefix (Stanza (SN pi BenchStanzas))
(concatMap (convCondTree os arch cid pi fds (const True) . snd) benchs)))
(L.map (convCondTree os arch cid pi fds (const True) . snd) benchs)))
fds
[] -- TODO: add encaps
Nothing
prefix :: (FlaggedDeps qpn -> FlaggedDep qpn) -> FlaggedDeps qpn -> FlaggedDeps qpn
prefix :: (FlaggedDeps qpn -> FlaggedDep qpn) -> [FlaggedDeps qpn] -> FlaggedDeps qpn
prefix _ [] = []
prefix f fds = [f fds]
prefix f fds = [f (concat fds)]
-- | Convert flag information.
flagDefaults :: [PD.Flag] -> FlagDefaults

0 comments on commit 4c360d4

Please sign in to comment.