Skip to content
  • Rodrigo Mesquita's avatar
    802a326f
    Apply local configuration to install targets · 802a326f
    Rodrigo Mesquita authored
    The target of `cabal install` is not considered to be a local package,
    which means local configuration (e.g. in cabal.project, or flags like
    --enable-profiling) does not apply to it.
    
    In 76670ebd, we changed the behaviour to
    applying the local flags to cabal install targets, but it used the
    literal target string as a package name to which the flags were
    additionally applied.
    
    However, `cabal install` targets are NOT necessarily package names, so,
    e.g., if we did `cabal install exe:mycomp`, the local flags would not
    apply since "exe:mycomp" is not a recognized /package/.
    
    The solution is to parse the target selectors first, and apply the local
    flags to the package of the resolved targets.
    
    Fixes #7297, #8909, the install part of #7236, #8529, #7832
    802a326f
    Apply local configuration to install targets
    Rodrigo Mesquita authored
    The target of `cabal install` is not considered to be a local package,
    which means local configuration (e.g. in cabal.project, or flags like
    --enable-profiling) does not apply to it.
    
    In 76670ebd, we changed the behaviour to
    applying the local flags to cabal install targets, but it used the
    literal target string as a package name to which the flags were
    additionally applied.
    
    However, `cabal install` targets are NOT necessarily package names, so,
    e.g., if we did `cabal install exe:mycomp`, the local flags would not
    apply since "exe:mycomp" is not a recognized /package/.
    
    The solution is to parse the target selectors first, and apply the local
    flags to the package of the resolved targets.
    
    Fixes #7297, #8909, the install part of #7236, #8529, #7832
Loading