Skip to content

Only choose buildable components for build-depends and build-tool-depends dependencies. #5325

Open
@grayjay

Description

@grayjay

See #5304 (comment) and #3978 (comment) for an example involving http-client-0.5.12.1. The library stanza contains

  -- See build failure at https://travis-ci.org/snoyberg/http-client/jobs/359573631
  if impl(ghc < 7.10)
    buildable: False

The solver doesn't backtrack to find an older version with a buildable library, and cabal fails with (from #5304 (comment)):

$ cabal new-build -w ghc-7.8.4 --index-state='2018-05-09T06:20:23Z'
Error:
    Dependency on unbuildable library from http-client
    In the stanza 'library'
    In the inplace package 'zzz-0'

This issue is a continuation of #3978, which described a bad error message for an unbuildable component. Its regression test tests the current error message:

# cabal new-build
Resolving dependencies...
Error:
Dependency on unbuildable library from p
In the stanza 'library'
In the inplace package 'q-1.0'

This issue should probably be fixed as part of #4087.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions