Skip to content

shellFor does not include dependencies of intermediary packages #1619

Closed
@michaelpj

Description

@michaelpj

Consider the following:

  • A is a project package
    • A depends on B
  • B is a Hackage package
    • B depends on C and D
  • C is a Hackage package, which has been overridden locally with source-repository-package
  • D is another Hackage package

Now, here's what I think happens:

  • We realise that A and C are local packages, so their dependencies need to be in the shell
  • We filter out B (?) since it's going to be rebuilt anyway
  • So we populate the shell with the dependencies of A and C, minus B

But in fact after rebuilding C, cabal will want to rebuild B also, but B is missing one of its dependencies: D!

This doesn't matter if you don't set exactDeps=true, since cabal will just happily build D for you. But if you do, it will complain that it can't find it.

This sounds like exactly the concern that was raised by @hamishmack here: #1146 (comment)

@TeofilC do you remember whether your final version addressed this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions