• Duncan Coutts's avatar
    Split TargetSelectorNoTargets case into two sub-cases · 5dd6a76f
    Duncan Coutts authored
    In resolveTargetSelectors we return [TargetSelectorProblem] which
    includes a case TargetSelectorNoTargets. We split this into two cases:
    TargetSelectorNoTargetsInCwd and TargetSelectorNoTargetsInProject.
    The latter covers the important special case when there are no targets
    in the project as a whole. The former covers the same remaining cases as
    the original.
    This is a useful special case since it corresponds to running commands
    in a directory where there is no .cabal files and that is not underneath
    a project. Add a hopefully useful error message for this case.
    Also adjust the integration tests covering this case, which now split
    into two separate cases.
IntegrationTests2.hs 34.4 KB