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

Failure to build filepath library #5025

Closed
ndmitchell opened this issue Sep 5, 2019 · 6 comments
Closed

Failure to build filepath library #5025

ndmitchell opened this issue Sep 5, 2019 · 6 comments

Comments

@ndmitchell
Copy link
Contributor

Using stack-2.1.3 x86_64 on Windows.

Steps to reproduce

  1. Checkout filepath git clone https://github.com/haskell/filepath.git
  2. Run stack init --resolver=nightly-2019-04-24 --ignore-subdirs --force to create a simple stack.yaml file.
  3. Run stack test

Expected

I expected it to run successfully, and indeed it did 4 months ago, using an older stack but the same resolver. See the trace at https://ci.appveyor.com/project/ndmitchell/filepath/builds/24067399.

Actual

C:\Neil\filepath>stack test

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

In the dependencies for random-1.1:
    time needed, but the stack configuration has no specified version  (latest matching version is 1.9.3)
needed due to filepath-1.4.2.1 -> random-1.1

In the dependencies for tf-random-0.5:
    time needed, but the stack configuration has no specified version  (latest matching version is 1.9.3)
needed due to filepath-1.4.2.1 -> tf-random-0.5

Some different approaches to resolving this:

  * Recommended action: try adding the following to your extra-deps in C:\Neil\filepath\stack.yaml:

- time-1.9.3@sha256:8f1b5448722a12a952248b356c9eb366e351226543d9086a2da71270522d5f45,5679

Plan construction failed.

Note that adding the time extra-deps does work, as does adding the time that is in the stackage snapshot. The problem only occurs when filepath is the package name, so I guess that is messing with its dependencies some way?

Stack version

$ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2

Installed via stack upgrade.

Tracked at haskell/filepath#72 as well.

@qrilka
Copy link
Contributor

qrilka commented Sep 16, 2019

@ndmitchell I think this problem could be related to GHC boot packages pruning added in #4547. Unfortunately I'm not sure if I will have time to have a close look into the details of it soon.

@qrilka
Copy link
Contributor

qrilka commented Sep 17, 2019

I couldn't reproduce it using Linux unfortunately and that raises some doubts in my hypothesis above

@qrilka
Copy link
Contributor

qrilka commented Sep 20, 2019

@ndmitchell could you run this with verbose logging?

@ndmitchell
Copy link
Contributor Author

@qrilka - the output of stack test --verbose --color=never is at https://gist.github.com/ndmitchell/3b0ac88c49ac1233efb7d94bfb1527c6

@qrilka
Copy link
Contributor

qrilka commented Sep 30, 2019

Sorry for being late with a reply. It looks like the main problem here comes from a dependency cycle through the Win32 package and probably new Stack is theoretically more correct here but as we still don't have component-based builds in Stack we get this failure here. But that's just a rough understanding, I need to find some more time to analyze this (and without Windows at hand it's a bit more complicated)

@mpilgrem
Copy link
Member

mpilgrem commented Mar 17, 2024

I am closing given the passage of time and because I can build the current version of filepath (1.5.2.0) and its test-suite on Windows 11 with the current version of Stack and snapshot:

snapshot: lts-22.13
extra-deps:
- directory-1.3.8.2
- process-1.6.18.0
- time-1.12.2
- Win32-2.14.0.0
flags:
 Win32:
   os-string: true
 directory:
   os-string: true

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

No branches or pull requests

3 participants