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

stack init fails for packages that depend on Win32 #4508

Closed
ndmitchell opened this issue Jan 17, 2019 · 2 comments
Closed

stack init fails for packages that depend on Win32 #4508

ndmitchell opened this issue Jan 17, 2019 · 2 comments

Comments

@ndmitchell
Copy link
Contributor

If I have a package that depends on Win32, stack init doesn't work.

Steps to reproduce

Using stack-1.9.3 on Windows, via stack upgrade.

  1. stack init foo && cd foo
  2. Edit package.yaml to include Win32 as a dependency of the library (line 24)
  3. stack build works fine
  4. stack init --force should find the resolver it was already using (lts-13.3 in my case), but:
C:\Neil\temp\stack-win32\foo>stack init --force --resolver=lts-13.3
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- .\

Selected resolver: lts-13.3
Resolver 'lts-13.3' does not have all the packages to match your requirements.
    Win32 not found
        - foo requires -any

This may be resolved by:
    - Using '--solver' to ask cabal-install to generate extra-deps, atop the chosen snapshot.
    - Using '--omit-packages to exclude mismatching package(s).
    - Using '--resolver' to specify a matching snapshot/resolver

I expect it would generate an initial stack.yaml which roughly matches what stack new did. I imagine because Win32 is built in and platform conditional it needs to be ignored when searching for suitable resolvers.

CC @shayne-fletcher-da who is also suffering with the same issue.

@snoyberg
Copy link
Contributor

I think this is fixed on master, where we've set up a global-hints.yaml file which includes Win32 (thanks to @sgraf812 in commercialhaskell/stackage-content#59).

@ndmitchell
Copy link
Contributor Author

Perfect! I confirm this works on HEAD.

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

3 participants