Skip to content

mega-repo handling #3162

@ivan-m

Description

@ivan-m

General summary/comments (optional)

The current behaviour is that (from the manual):

A location key can be accompanied by a subdirs key to look for cabal files in a list of subdirectories as well in addition to the top level directory.

However, mega-repos that have a package in the top-level directory as well as in sub-directories don't seem to allow those sub-directories to depend on the top-level directory.

Example repositories: fgl (which I maintain) and servant-auth-token.

Steps to reproduce

I'm going to use the fgl repository here as an example (with both fgl and fgl-arbitrary in my build-depends).

In this commit, there is a bump both to the top-level fgl package and the fgl-arbitrary package, which I'm going to try and use:

resolver: lts-8.8
packages:
- '.'
- location:
    git: git@github.com:haskell/fgl
    commit: 12b14b3f30096c9cddc3b93dbee88a3921a3ad55
  subdirs:
    - fgl-arbitrary
  extra-dep: true

I'm going to be running stack install --only-dependencies on this.

Expected

The package in the sub-directory should depend on the package in the root directory.

Actual

$ stack install --only-dependencies

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for fgl-arbitrary-0.2.0.3.1:
    fgl-5.5.3.1 must match >=5.5.3.1.1 && <6
needed due to my-package-0.1 -> fgl-arbitrary-0.2.0.3.1

Stack version

$ stack --version
Version 1.4.0 x86_64 hpack-0.17.0

Method of installation

  • Updated/built using previous version of stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions