Skip to content
  • Duncan Coutts's avatar
    TargetPackage TargetSelector allows multiple package ids · 1fb24861
    Duncan Coutts authored
    That is, the TargetPackage instead of having a single PackageId contains
    a [PackageId].
    
    Ultimately this will allow us to support multiple .cabal files in a
    single directory. But the real reason to do this generalisation now is
    that it helps with the TargetImplicitCwd case. For the implicit CWD case
    we need to be able to parse the target whether or not there is a package
    in the CWD. So the simplest solution is to pass in all the local CWD
    packages (though typically only 0 or 1) and put all of them in. Then at
    the end we can check if in fact there were 0 and fail.
    
    When we do want to support multiple .cabal files in a dir, we'll also
    need to adjust the project config code, and extend the syntax slightly
    so that we render as the package location for the case of multiple
    packages.
    1fb24861