Skip to content

hsc2hs invocation picks up too many flags from pkgdb #2971

Closed
@ezyang

Description

@ezyang

Cabal computes the transitive dependency of packages, and uses include-paths and other fields to determine what to pass to hsc2hs. But it grabs too many packages: it does the entire set of all packages that ANY component in the package might need, rather than the component that is being built. Test case attached. I'll push a comment to the code that needs to be fixed too.
test.zip

To run the test, first build p and q, and note that it fails. Now touch /tmp/asdf.h, and observe that it now succeeds. p adds /tmp to import path, but q's buildable executable does not refer to p and should not see it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions