Skip to content

allow-newer in global-project doesn't work #3685

Closed
@jeiea

Description

@jeiea

I expected allow-newer in global-project\stack.yaml affects in all path, but it seems not. Is it expected behavior?

Steps to reproduce

  1. Make the C:\sr\global-project\stack.yaml content as the follows.
packages: []
resolver: lts-10.0
allow-newer: true
  1. Run stack install intero-0.1.23 on the path where stack.yaml doesn't exists.

Expected

C:\sr\global-project> stack install intero
WARNING: Ignoring out of range dependency (allow-newer enabled): ghc-8.2.2. intero requires: >=7.8 && <8.2.2
...

Actual

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

In the dependencies for intero-0.1.23:
    ghc-8.2.2 from stack configuration does not match >=7.8 && <8.2.2 (latest matching version
              is 8.2.1)
needed since intero is a build target.

Some potential ways to resolve this:

  * Recommended action: try adding the following to your extra-deps
    in C:\sr\global-project\stack.yaml:

- ghc-8.2.1

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * You may also want to try using the 'stack solver' command.

Plan construction failed.

Stack version

PS> stack --version
Version 1.6.1, Git revision f25811329bbc40b0c21053a8160c56f923e1201b (5435 commits) x86_64 hpack-0.20.0

Method of installation

  • Official binary, downloaded from Github releases

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions