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

Unnecesarry rebuild with new-build #3317

Closed
cocreature opened this issue Apr 11, 2016 · 7 comments
Closed

Unnecesarry rebuild with new-build #3317

cocreature opened this issue Apr 11, 2016 · 7 comments

Comments

@cocreature
Copy link
Collaborator

I was trying out the new-build using bafbbc6 on the cabal 1.24 branch, but I’m experiencing some weird rebuilds.
The repo I used was haskell-ide-engine with a cabal.project file.
The build doesn’t error but it also doesn’t seem to build the main executable and everytime I restart it, it builds monad-logger and bifunctors again.
Here’s the output of cabal new-build -v of one of those rebuilds

In order, the following will be built:
bifunctors-5.3 (lib:bifunctors) (requires build)
monad-logger-0.3.18 (lib:monad-logger) (requires build)
profunctors-5.2 (lib:profunctors) (requires build)
semigroupoids-5.0.1 (lib:semigroupoids) (requires build)
free-4.12.4 (lib:free) (requires build)
adjunctions-4.3 (lib:adjunctions) (requires build)
either-4.4.1 (lib:either) (requires build)
ghc-exactprint-0.5.0.1 (lib:ghc-exactprint) (requires build)
apply-refact-0.2.0.0 (lib:apply-refact) (requires build)
kan-extensions-5.0.1 (lib:kan-extensions) (requires build)
lens-4.13.2.1 (lib:lens) (requires build)
monad-journal-0.7.1 (lib:monad-journal) (requires build)
ghc-mod-5.5.0.0 (lib:ghc-mod) (requires build)
hie-plugin-api-0.1.0.0 (lib:hie-plugin-api) (first run)
hie-apply-refact-0.1.0.0 (lib:hie-apply-refact) (first run)
hie-eg-plugin-async-0.1.0.0 (lib:hie-eg-plugin-async) (first run)
hie-example-plugin2-0.1.0.0 (lib:hie-example-plugin2) (first run)
hie-ghc-mod-0.1.0.0 (lib:hie-ghc-mod) (first run)
hie-ghc-tree-0.1.0.0 (lib:hie-ghc-tree) (first run)
monoid-extras-0.4.0.4 (lib:monoid-extras) (requires build)
HaRe-0.8.2.3 (lib:HaRe) (requires build)
hie-hare-0.1.0.0 (lib:hie-hare) (first run)
optparse-simple-0.0.3 (lib:optparse-simple) (requires build)
pipes-group-1.0.4 (lib:pipes-group) (requires build)
pipes-bytestring-2.1.2 (lib:pipes-bytestring) (requires build)
pipes-aeson-0.4.1.6 (lib:pipes-aeson) (requires build)
haskell-ide-engine-0.1.0.0 (lib:haskell-ide-engine exe:hie) (first run)
creating /home/moritz/code/haskell/haskell-ide-engine/dist-newstyle/build
creating /home/moritz/code/haskell/haskell-ide-engine/dist-newstyle/tmp
Extracting
/home/moritz/.cabal/packages/hackage.haskell.org/bifunctors/5.3/bifunctors-5.3.tar.gz
to
/home/moritz/code/haskell/haskell-ide-engine/dist-newstyle/tmp/bifunctors-26510...
Extracting
/home/moritz/.cabal/packages/hackage.haskell.org/monad-logger/0.3.18/monad-logger-0.3.18.tar.gz
to
/home/moritz/code/haskell/haskell-ide-engine/dist-newstyle/tmp/monad-logger-26510...
Updating monad-logger.cabal with the latest revision from the index.
creating dist
Configuring monad-logger-0.3.18...
/home/moritz/.cabal/bin/cabal act-as-setup --build-type=Simple -- configure
--verbose=2 --builddir=dist --ghc
--prefix=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b
--bindir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/bin
--libdir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/lib
--libsubdir=
--libexecdir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/libexec
--datadir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/share
--datasubdir=
--docdir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/share/doc
--htmldir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/share/doc/html
--haddockdir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/share/doc/html
--sysconfdir=/home/moritz/.cabal/store/ghc-7.10.3/monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b/etc
--enable-library-vanilla --enable-library-profiling --enable-shared
--disable-executable-dynamic --disable-profiling --profiling-detail=default
--library-profiling-detail=default --enable-optimization --disable-debug-info
--disable-library-for-ghci --disable-split-objs --disable-executable-stripping
--disable-library-stripping --package-db=clear --package-db=global
--package-db=/home/moritz/.cabal/store/ghc-7.10.3/package.db
--flags=template_haskell
Updating bifunctors.cabal with the latest revision from the index.
--ipid=monad-logger-0.3.18-0c280a2e0e8ae133ccfeaf6f60a22d52601b5ab3750c89779f1042f27a964b4b
--dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
--dependency=blaze-builder=blaze-builder-0.4.0.1-c56587247e5564c11ea194ddd3078cb80c0865fa4eff1d528d6bb71fcc632ecb
creating dist
--dependency=bytestring=bytestring-0.10.6.0-c60f4c543b22c7f7293a06ae48820437
--dependency=conduit=conduit-1.2.6.4-cbd0d2f7377b7f04548a4c1e32e8a727d810e45f1a9d433f230c13803b34754c
--dependency=conduit-extra=conduit-extra-1.1.13.1-0a903981cb709b34cf5371cd69bf5a64ccd80ff25df9a6fa70461abca842e5bd
Configuring bifunctors-5.3...
--dependency=exceptions=exceptions-0.8.2.1-dfeb98edc7064746f07a056f6a6ae356b25404bf74245b2f2202ba04fe21fa89
--dependency=fast-logger=fast-logger-2.4.2-673dae68877125fa962e9dea96270153da42a2a1941270b75001e96cb11e1157
--dependency=lifted-base=lifted-base-0.2.3.6-e8607cf02b98e654df03346bd8c12b99afff7748605f615c47bcbfd9d384720b
/home/moritz/.cabal/bin/cabal act-as-setup --build-type=Simple -- configure
--dependency=monad-control=monad-control-1.0.1.0-c4ff29f9562bc744f5de386a79ff6f9f78dc3ddc27ada0c99b537718c5058950
--verbose=2 --builddir=dist --ghc
--dependency=monad-loops=monad-loops-0.4.3-11b535d208e299fa64e2dd18a9e985535c60e5deaf3b78cf77dd69548dbd39f8
--prefix=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a
--dependency=mtl=mtl-2.2.1-e14e69bc4116a8ecdcdf32cdd53b9738592366fd6589b5e337659de7df3decf0
--bindir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/bin
--dependency=resourcet=resourcet-1.1.7.3-dbf90ef19df4611e1588ab941d5141089625ad89e6afd65245ca270e53393595
--libdir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/lib
--dependency=stm=stm-2.4.4.1-a14cebe869eea4e7962b809daa585707d55fccf97443e2e75cd178e3fa200545
--libsubdir=
--dependency=stm-chans=stm-chans-3.0.0.4-faac75a14154d243aa17bc4f45b078c633606231ba05518e996eaac1f5c0ad42
--libexecdir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/libexec
--dependency=template-haskell=template-haskell-2.10.0.0-3c4cb52230f347282af9b2817f013181
--datadir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/share
--dependency=text=text-1.2.2.1-04f698067acda0ee4dbbd0cff28f977679735235441c7cb0643c02a808ca6c81
--datasubdir=
--dependency=transformers=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3
--docdir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/share/doc
--dependency=transformers-base=transformers-base-0.4.4-ea280c51addaad4993aac0304775a007de0efb42f892725c0505add9c8d8be1d
--htmldir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/share/doc/html
--dependency=transformers-compat=transformers-compat-0.5.1.4-34053380c9bbc4298dbb337b570fe940bb9c51e951c201c0054e589836b736dc
--haddockdir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/share/doc/html
--disable-tests --disable-coverage --exact-configuration --disable-benchmarks
--sysconfdir=/home/moritz/.cabal/store/ghc-7.10.3/bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a/etc
--with-ghc=/usr/bin/ghc --with-ghc-pkg=/usr/bin/ghc-pkg
--enable-library-vanilla --enable-library-profiling --enable-shared
--disable-executable-dynamic --disable-profiling --profiling-detail=default
--library-profiling-detail=default --enable-optimization --disable-debug-info
Redirecting build log to {handle:
--disable-library-for-ghci --disable-split-objs --disable-executable-stripping
/home/moritz/.cabal/logs/monad-logger-0.3.18.log}
--disable-library-stripping --package-db=clear --package-db=global
--package-db=/home/moritz/.cabal/store/ghc-7.10.3/package.db --flags=tagged
--flags=semigroups
--ipid=bifunctors-5.3-aca908b2c1c7a34881e75b5d104ea5c72c6481183648ca0d1a5c57c78c08b01a
--dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
--dependency=base-orphans=base-orphans-0.5.3-491bb6f75248a4d6a4faa3012d1a2c04969e11dbb09a9cf21fce89a74e05d642
--dependency=comonad=comonad-5-eb51509d709b5be1505444162dc89e5984f34393c05e49c5b2102334926be030
--dependency=containers=containers-0.5.6.2-e59c9b78d840fa743d4169d4bea15592
--dependency=semigroups=semigroups-0.18.1-5886d6160455957e4ab004c2b479c67c382b5c2010916683877081ca8ae9184d
--dependency=tagged=tagged-0.8.3-7f958e76ecb096d9a2f88919904dc28b313f51471bf5d75a5679bca397e18b6f
--dependency=template-haskell=template-haskell-2.10.0.0-3c4cb52230f347282af9b2817f013181
--dependency=transformers=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3
--dependency=transformers-compat=transformers-compat-0.5.1.4-34053380c9bbc4298dbb337b570fe940bb9c51e951c201c0054e589836b736dc
--disable-tests --disable-coverage --exact-configuration --disable-benchmarks
--with-ghc=/usr/bin/ghc --with-ghc-pkg=/usr/bin/ghc-pkg
Redirecting build log to {handle: /home/moritz/.cabal/logs/bifunctors-5.3.log}
Building bifunctors-5.3...
/home/moritz/.cabal/bin/cabal act-as-setup --build-type=Simple -- build
--verbose=2 --builddir=dist
Redirecting build log to {handle: /home/moritz/.cabal/logs/bifunctors-5.3.log}
Building monad-logger-0.3.18...
/home/moritz/.cabal/bin/cabal act-as-setup --build-type=Simple -- build
--verbose=2 --builddir=dist
Redirecting build log to {handle:
/home/moritz/.cabal/logs/monad-logger-0.3.18.log}
@ezyang
Copy link
Contributor

ezyang commented Apr 11, 2016

Is Cabal's exit code really non-zero? (Check with echo $?) What are the contents of the two referenced logs?

(FWIW I'm trying to reproduce locally, but it's a lot of packages to build haha.)

@dcoutts
Copy link
Contributor

dcoutts commented Apr 11, 2016

new-build --dry-run -v3 prints some extra info about why it thinks it needs to rebuild things.

@ezyang
Copy link
Contributor

ezyang commented Apr 11, 2016

Is the --dry-run necessary? It should print it on -v3 in all cases! (Also, -v3 is too chatty, we need a "Cabal should be verbose, but don't pass it on to GHC please")

@dcoutts
Copy link
Contributor

dcoutts commented Apr 12, 2016

No the --dry-run isn't necessary there, but it means it'll stop after giving us the relevant info.

@cocreature
Copy link
Collaborator Author

Sorry for not replying, for some reason I didn’t get the notification mails for this issue.

Cabals exit code is zero. Here are the logs for monad-logger and bifunctors. Both fail to build (which is probably because we don’t have bounds because we relied on stackage so far).

I’ll leave this issue open since not printing anything (without verbose) and exiting with 0 is at least a usability problem.

@dcoutts
Copy link
Contributor

dcoutts commented Jun 25, 2016

Ahh ok, so this is not actually a rebuild but it's the issue about reporting failed builds.

We recently merged a patch to report the non-0 exit code in this situation but reporting a detailed error message in this situation is still TODO.

@dcoutts
Copy link
Contributor

dcoutts commented Jun 25, 2016

Ok, I'll close in favour of #3394 which tracks this issue.

@dcoutts dcoutts closed this as completed Jun 25, 2016
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