Add better handling for empty component assignments
This commit is contained in:
parent
baf5cad809
commit
a6d3f477bc
@ -172,7 +172,15 @@ targetGhcOptions crdl sefnmn = do
|
|||||||
let mdlcs = moduleComponents mcs `zipMap` Set.toList sefnmn
|
let mdlcs = moduleComponents mcs `zipMap` Set.toList sefnmn
|
||||||
candidates = Set.unions $ map snd mdlcs
|
candidates = Set.unions $ map snd mdlcs
|
||||||
|
|
||||||
when (Set.null candidates) $
|
let noCandidates = Set.null candidates
|
||||||
|
noModuleHasAnyAssignment = all (Set.null . snd) mdlcs
|
||||||
|
|
||||||
|
if noCandidates && noModuleHasAnyAssignment
|
||||||
|
then do
|
||||||
|
gmLog GmWarning "" $ strDoc $ "Could not find a componenet assignment, falling back to sandbox only project options."
|
||||||
|
sandboxOpts crdl
|
||||||
|
else do
|
||||||
|
when noCandidates $
|
||||||
throwError $ GMECabalCompAssignment mdlcs
|
throwError $ GMECabalCompAssignment mdlcs
|
||||||
|
|
||||||
let cn = pickComponent candidates
|
let cn = pickComponent candidates
|
||||||
|
Loading…
Reference in New Issue
Block a user