Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeiea opened this issue Dec 20, 2017 · 4 comments
Closed

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

jeiea opened this issue Dec 20, 2017 · 4 comments

Comments

@jeiea
Copy link

jeiea commented Dec 20, 2017

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
@mgsloan
Copy link
Contributor

mgsloan commented Dec 23, 2017

See the description of the config files in https://docs.haskellstack.org/en/stable/yaml_configuration/ , you want to edit C:\sr\config.yaml instead.

@mgsloan mgsloan added this to the Support milestone Dec 23, 2017
@mgsloan mgsloan closed this as completed Dec 23, 2017
@letmaik
Copy link

letmaik commented Apr 26, 2018

Please re-open. In the error message the user is advised where to put extra-deps, and assumes that this applies to the following point. Since that's not the case, this should be added:

Instead of:

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

It should something like:

* Set 'allow-newer: true' in C:\sr\config.yaml to ignore all version constraints and build anyway.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 11, 2018

@letmaik Good point! Re-opening this issue as a problem with the clarity of output.

@mpilgrem
Copy link
Member

I understand the original issue as this: the online documentation states that non-project-specific configuration options (such as allow-newer) can be included in project-level configuration files. However, that is not the case for the project-level configuration file in the global-project directory. Non-project-specific configuration options (such as allow-newer) in that file are ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants