Skip to content

Best effort stack init when some of the source packages have conflicts #1621

@harendra-kumar

Description

@harendra-kumar

When there are a number of packages under the directory tree and even one of them is not compatible with the snapshot compiler then stack init fails. Sometimes there is stray or old unmaintained package under the tree or maybe even a test package which is designed to fail.

Instead what we can do is to filter out the failing packages and init the stack.yaml based on the rest. This will allow more repositories/packages to be automatically initialized by stack init. We can keep the failing packages as commented out in stack.yaml with an appropriate reason comment automatically inserted.

For example the diagrams-ci tree fails with this:

* Rejected lts-4.0
    ghc-7.10.3 cannot be used for these packages:
        - active-semantics
        - dhtest
    base version 4.8.2.0 found
        - active-semantics requires ==4.6.*
        - dhtest requires ==4.6.*
        - dhtest flags: inside = False

These packages can be moved out of the way automatically.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions