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

Unexpected re-builds with a dependency on GitHub's Win32 #2960

egor-tensin opened this issue Jan 30, 2017 · 9 comments

Unexpected re-builds with a dependency on GitHub's Win32 #2960

egor-tensin opened this issue Jan 30, 2017 · 9 comments


Copy link

egor-tensin commented Jan 30, 2017

This issue is Windows-only. I'm also not sure if it's expected behaviour, so I apologize beforehand if I should've just RTFM.

I'm building a project ( with a dependency on a specific package version from GitHub. This package (Win32) is also present on Stackage, but it is currently falling behind a bit, lacking a bugfix from the upstream, so I'm pulling the correct version from GitHub using

- location:
  extra-dep: true

This version is basically identical to Stackage's, except for the bugfix. A few of my package's dependencies also depend on Win32.

Steps to reproduce

  1. Run cabal build.
  2. The package builds successfully (along with its dependencies).
  3. Run cabal build.


No re-building.


Many of package's dependencies are re-built.

Stack version

$ stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 x86_64 hpack-0.15.0

Method of installation

  • Official binary, downloaded from or fpcomplete's package repository
Copy link

mgsloan commented Feb 1, 2017

Thanks for the report, that indeed shouldn't happen. Perhaps a windows user would like to investigate and fix?

Copy link

egor-tensin commented Feb 2, 2017

The output from the second stack build (windows-env is the name of my package):

WARNING: Ignoring out of range dependency (allow-newer enabled): Win32-
directory requires: >=2.2.2 && <2.4
WARNING: Ignoring out of range dependency (allow-newer enabled): Win32-
process requires: >=2.2 && <2.4
directory- unregistering
optparse-applicative- unregistering
process- unregistering
time- unregistering
windows-env- unregistering (missing dependencies: directory, optparse-applicative)
time- configure
time- build
time- copy/register
directory- configure
directory- build
directory- copy/register
process- configure
process- build
process- copy/register
optparse-applicative- configure
optparse-applicative- build
optparse-applicative- copy/register
windows-env- build (lib + exe)
Preprocessing library windows-env-
Preprocessing executable 'addpath' for windows-env-
Linking .stack-work\dist\b7fec021\build\addpath\addpath.exe ...
Preprocessing executable 'delenv' for windows-env-
Linking .stack-work\dist\b7fec021\build\delenv\delenv.exe ...
Preprocessing executable 'delpath' for windows-env-
Linking .stack-work\dist\b7fec021\build\delpath\delpath.exe ...
Preprocessing executable 'paths' for windows-env-
Linking .stack-work\dist\b7fec021\build\paths\paths.exe ...
Preprocessing executable 'setenv' for windows-env-
Linking .stack-work\dist\b7fec021\build\setenv\setenv.exe ...
windows-env- copy/register
Installing library in
Installing executable(s) in
Registering windows-env-
Completed 5 action(s).

I should've probably mentioned that some of my dependencies disallow the fixed Win32 version ( to be used because of the upper version bound, but its only difference from the previous version is the bugfix, so I have allow-newer: true in my stack.yaml.

Copy link

egor-tensin commented Mar 25, 2017

This issue can be reproduced if you checkout commit bdf50a5e75f9fad6ce9dd318f4bfcaec883514f3 (I'm not going to track whether it'll stay reproducible later).

Copy link

joeyh commented Oct 25, 2017

Having the same trouble with git-annex, also due to overriding the win32 location. My stack builds are taking half an hour or more due to this problem, rather than a few seconds.

I noticed that Cabal is amoung the packages stack rebuilds every time, because it depends on win32. Suspect that being a dep of Cabal might be what makes this special.

Copy link

joeyh commented Oct 25, 2017

And here's the resulting "incremental" build mess:

stack build -j 1 --stack-yaml stack-windows.yaml --no-haddock --dependencies-only
Cabal- unregistering
QuickCheck-2.9.2: unregistering
Win32-notify- unregistering
aeson- unregistering
aeson-compat-0.3.6: unregistering
ansi-terminal- unregistering
ansi-wl-pprint- unregistering
attoparsec-iso8601- unregistering
bifunctors-5.4.2: unregistering (missing dependencies: comonad)
cabal-doctest-1.0.2: unregistering
comonad-5.0.2: unregistering (missing dependencies: Cabal, cabal-doctest, distributive)
concurrent-output-1.9.2: unregistering
conduit-extra-1.1.17: unregistering
cookie- unregistering
crypto-api-0.13.2: unregistering (missing dependencies: entropy)
cryptonite-conduit-0.2.0: unregistering
directory- unregistering
distributive-0.5.3: unregistering (missing dependencies: Cabal, cabal-doctest)
dns-2.0.13: unregistering
easy-file-0.2.1: unregistering
edit-distance- unregistering
entropy-0.3.8: unregistering (missing dependencies: Cabal, directory, process)
fast-logger-2.4.10: unregistering
feed- unregistering
file-embed-0.0.10: unregistering
haskeline- unregistering
hjsmin- unregistering (missing dependencies: optparse-applicative)
hslogger-1.2.10: unregistering
http-api-data- unregistering
http-client- unregistering
monad-logger- unregistering
mwc-random- unregistering
optparse-applicative- unregistering
path-pieces-0.2.1: unregistering
persistent-2.7.0: unregistering
process- unregistering
random-1.1: unregistering
resource-pool- unregistering
shakespeare-2.0.14: unregistering
silently-1.2.5: unregistering
simple-sendfile-0.2.25: unregistering
skein- unregistering (missing dependencies: crypto-api)
streaming-commons-0.1.17: unregistering
tasty-0.11.3: unregistering
tasty-hunit-0.9.2: unregistering
Cannot contact windows-7-pro-x86_64: java.lang.InterruptedException
tasty-quickcheck-0.8.4: unregistering
tasty-quickcheck-0.8.4: unregistering
terminal-size- unregistering
tf-random-0.5: unregistering
time- unregistering
time-locale-compat- unregistering
unix-compat- unregistering
uuid-1.3.13: unregistering
uuid-types-1.0.3: unregistering
wai-app-static- unregistering
wai-extra- unregistering
wai-logger-2.3.0: unregistering
warp-3.2.13: unregistering
x509-store-1.6.5: unregistering
time- configure
time- build
time- copy/register
attoparsec-iso8601- configure
attoparsec-iso8601- build
attoparsec-iso8601- copy/register
cookie- configure
cookie- build
cookie- copy/register
directory- configure
directory- build
directory- copy/register
Win32-notify- configure
Win32-notify- build
Win32-notify- copy/register
easy-file-0.2.1: configure
easy-file-0.2.1: build
easy-file-0.2.1: copy/register
fast-logger-2.4.10: configure
fast-logger-2.4.10: build
fast-logger-2.4.10: copy/register
file-embed-0.0.10: configure
file-embed-0.0.10: build
file-embed-0.0.10: copy/register
mwc-random- configure
mwc-random- build
mwc-random- copy/register
path-pieces-0.2.1: configure
path-pieces-0.2.1: build
path-pieces-0.2.1: copy/register
process- configure
process- build
process- copy/register
Cabal- configure
Cabal- build
Cabal- copy/register
ansi-terminal- configure
ansi-terminal- build
ansi-terminal- copy/register
ansi-wl-pprint- configure
ansi-wl-pprint- build
ansi-wl-pprint- copy/register
cabal-doctest-1.0.2: configure
cabal-doctest-1.0.2: build
cabal-doctest-1.0.2: copy/register
distributive-0.5.3: configure
distributive-0.5.3: build
distributive-0.5.3: copy/register
comonad-5.0.2: configure
comonad-5.0.2: build
comonad-5.0.2: copy/register
bifunctors-5.4.2: configure
bifunctors-5.4.2: build
bifunctors-5.4.2: copy/register
entropy-0.3.8: configure
entropy-0.3.8: build
entropy-0.3.8: copy/register
crypto-api-0.13.2: configure
crypto-api-0.13.2: build
crypto-api-0.13.2: copy/register
haskeline- configure
haskeline- build
haskeline- copy/register
hslogger-1.2.10: configure
hslogger-1.2.10: build
hslogger-1.2.10: copy/register
optparse-applicative- configure
optparse-applicative- build
optparse-applicative- copy/register
hjsmin- configure
hjsmin- build
hjsmin- copy/register
profunctors-5.2.1: configure
profunctors-5.2.1: build
profunctors-5.2.1: copy/register
random-1.1: configure
random-1.1: build
random-1.1: copy/register
edit-distance- configure
edit-distance- build
edit-distance- copy/register
resource-pool- configure
resource-pool- build
resource-pool- copy/register
semigroupoids-5.2.1: configure
semigroupoids-5.2.1: build
semigroupoids-5.2.1: copy/register
free-4.12.4: configure
free-4.12.4: build
free-4.12.4: copy/register
adjunctions-4.3: configure
adjunctions-4.3: build
adjunctions-4.3: copy/register
kan-extensions-5.0.2: configure
kan-extensions-5.0.2: build
kan-extensions-5.0.2: copy/register
lens-4.15.4: configure
lens-4.15.4: build
lens-4.15.4: copy/register
reducers-3.12.2: configure
reducers-3.12.2: build
reducers-3.12.2: copy/register
silently-1.2.5: configure
silently-1.2.5: build
silently-1.2.5: copy/register
skein- configure
skein- build
skein- copy/register
clientsession- configure
clientsession- build
clientsession- copy/register
streaming-commons-0.1.17: configure
streaming-commons-0.1.17: build
streaming-commons-0.1.17: copy/register
conduit-extra-1.1.17: configure
conduit-extra-1.1.17: build
conduit-extra-1.1.17: copy/register
cryptonite-conduit-0.2.0: configure
cryptonite-conduit-0.2.0: build
cryptonite-conduit-0.2.0: copy/register
dns-2.0.13: configure
dns-2.0.13: build
dns-2.0.13: copy/register
http-client- configure
http-client- build
http-client- copy/register
monad-logger- configure
monad-logger- build
monad-logger- copy/register
simple-sendfile-0.2.25: configure
simple-sendfile-0.2.25: build
simple-sendfile-0.2.25: copy/register
tasty-0.11.3: configure
tasty-0.11.3: build
tasty-0.11.3: copy/register
tasty-hunit-0.9.2: configure
tasty-hunit-0.9.2: build
tasty-hunit-0.9.2: copy/register
tasty-rerun-1.1.7: configure
tasty-rerun-1.1.7: build
tasty-rerun-1.1.7: copy/register
terminal-size- configure
terminal-size- build
terminal-size- copy/register
concurrent-output-1.9.2: configure
concurrent-output-1.9.2: build
concurrent-output-1.9.2: copy/register
tf-random-0.5: configure
tf-random-0.5: build
tf-random-0.5: copy/register
QuickCheck-2.9.2: configure
QuickCheck-2.9.2: build
QuickCheck-2.9.2: copy/register
tasty-quickcheck-0.8.4: configure
tasty-quickcheck-0.8.4: build
tasty-quickcheck-0.8.4: copy/register
time-locale-compat- configure
time-locale-compat- build
time-locale-compat- copy/register
feed- configure
feed- build
feed- copy/register
unix-compat- configure
unix-compat- build
unix-compat- copy/register
uuid-types-1.0.3: configure
uuid-types-1.0.3: build
uuid-types-1.0.3: copy/register
aeson- configure
aeson- build
aeson- copy/register
aeson-compat-0.3.6: configure
aeson-compat-0.3.6: build
aeson-compat-0.3.6: copy/register
http-api-data- configure
http-api-data- build
http-api-data- copy/register
persistent-2.7.0: configure
persistent-2.7.0: build
persistent-2.7.0: copy/register
esqueleto-2.5.3: configure
esqueleto-2.5.3: build
esqueleto-2.5.3: copy/register
persistent-sqlite-2.6.2: configure
persistent-sqlite-2.6.2: build
persistent-sqlite-2.6.2: copy/register
persistent-template-2.5.3: configure
persistent-template-2.5.3: build
persistent-template-2.5.3: copy/register
shakespeare-2.0.14: configure
shakespeare-2.0.14: build
shakespeare-2.0.14: copy/register
uuid-1.3.13: configure
uuid-1.3.13: build
uuid-1.3.13: copy/register
wai-logger-2.3.0: configure
wai-logger-2.3.0: build
wai-logger-2.3.0: copy/register
wai-extra- configure
wai-extra- build
wai-extra- copy/register
warp-3.2.13: configure
warp-3.2.13: build
warp-3.2.13: copy/register
wai-app-static- configure
wai-app-static- build
wai-app-static- copy/register
x509-store-1.6.5: configure
x509-store-1.6.5: build
x509-store-1.6.5: copy/register
x509-system-1.6.6: configure
x509-system-1.6.6: build
x509-system-1.6.6: copy/register
x509-validation-1.6.9: configure
x509-validation-1.6.9: build
x509-validation-1.6.9: copy/register
tls-1.3.11: configure
tls-1.3.11: build
tls-1.3.11: copy/register
connection-0.2.8: configure
connection-0.2.8: build
connection-0.2.8: copy/register
http-client-tls- configure
http-client-tls- build
http-client-tls- copy/register
http-conduit- configure
http-conduit- build
http-conduit- copy/register
tls-session-manager- configure
tls-session-manager- build
tls-session-manager- copy/register
warp-tls-3.2.4: configure
warp-tls-3.2.4: build
warp-tls-3.2.4: copy/register
xml-conduit-1.5.1: configure
xml-conduit-1.5.1: build
xml-conduit-1.5.1: copy/register
aws-0.17.1: configure
aws-0.17.1: build
aws-0.17.1: copy/register
xml-hamlet- configure
xml-hamlet- build
xml-hamlet- copy/register
DAV-1.3.1: configure
DAV-1.3.1: build
DAV-1.3.1: copy/register
yaml- configure
yaml- build
yaml- copy/register
yesod-core-1.4.37: configure
yesod-core-1.4.37: build
yesod-core-1.4.37: copy/register
yesod-default-1.2.0: configure
yesod-default-1.2.0: build
yesod-default-1.2.0: copy/register
yesod-persistent-1.4.2: configure
yesod-persistent-1.4.2: build
yesod-persistent-1.4.2: copy/register
yesod-form-1.4.16: configure
yesod-form-1.4.16: build
yesod-form-1.4.16: copy/register
yesod-1.4.5: configure
yesod-1.4.5: build
yesod-1.4.5: copy/register
yesod-static- configure
yesod-static- build
yesod-static- copy/register
Completed 89 action(s).

Copy link

mgsloan commented Oct 25, 2017

@joeyh Which version of stack is that with? Can you please try with the master version of stack stack upgrade --git? Hopefully it is already fixed.

If this is an issue for development, not CI, then it is often helpful to use stack ghci for quick :reload + :main iterations.

Copy link

zyv commented Oct 26, 2017

This is stack 1.5.1 for Windows (32 bit), and the issue is exactly with CI builds.

Copy link

joeyh commented Oct 26, 2017 via email

Copy link

mgsloan commented Oct 26, 2017

@joeyh Woohoo!

So I think this is likely solved, and 1.6 will be out soon. Anyone that runs into this with 1.6 should open a new issue about it.

@mgsloan mgsloan closed this as completed Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

4 participants