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

assert, called at ./Distribution/Client/ProjectPlanning.hs:281:5 #4416

Open
alanz opened this issue Mar 22, 2017 · 5 comments
Open

assert, called at ./Distribution/Client/ProjectPlanning.hs:281:5 #4416

alanz opened this issue Mar 22, 2017 · 5 comments
Labels
cabal-install: nix-local-build type: assertion-fail NB: assertions are only enabled in devel-builds type: bug

Comments

@alanz
Copy link
Collaborator

alanz commented Mar 22, 2017

Using current cabal at c2dfc33 built with GHC 8.0.2,
configuring for use with GHC ghc-8.2 branch at b3f7e9b54d9f36938effd265c84d5567b34c905b, with a brand new install.

Trying to build https://github.com/alanz/ghc-exactprint/tree/ghc-8.2

cabal new-configure --enable-tests -fdev --with-compiler=/opt/ghc/8.2.0.20170321/bin/ghc --allow-newer

results in

Resolving dependencies...
In order, the following would be built (use -v for more details):
 - Diff-0.3.4 (lib) (requires build)
 - StateVar-1.1.0.4 (lib) (requires build)
 - ansi-terminal-0.6.2.3 (requires build)
 - async-2.1.1 (lib) (requires build)
 - base-compat-0.9.2 (lib) (requires build)
 - base-orphans-0.5.4 (lib) (requires build)
 - cabal-doctest-1 (lib) (requires build)
 - call-stack-0.1.0 (lib) (requires build)
 - extensible-exceptions-0.1.1.4 (requires download & build)
 - ghc-paths-0.1.0.9 (requires build)
 - hostname-1.0 (requires build)
 - hsc2hs-0.68.1 (exe:hsc2hs) (requires build)
 - hspec-discover-2.4.2 (lib) (requires build)
 - mtl-2.2.1 (requires build)
 - old-locale-1.0.0.7 (lib) (requires build)
 - prelude-extras-0.4.0.3 (requires build)
 - primitive-0.6.2.0 (lib) (requires build)
 - semigroups-0.18.2 (lib) (requires build)
 - setenv-0.1.1.3 (lib) (requires build)
 - silently-1.2.5 (lib) (requires build)
 - stringbuilder-0.5.0 (lib) (requires download & build)
 - syb-0.7 (lib) (requires build)
 - text-1.2.2.1 (lib) (requires build)
 - transformers-compat-0.5.1.4 (lib) (requires build)
 - unix-compat-0.4.3.1 (requires build)
 - with-location-0.1.0 (lib) (requires download & build)
 - ansi-wl-pprint-0.6.7.3 (requires build)
 - HUnit-1.6.0.0 (lib) (requires download & build)
 - code-page-0.1.3 (lib) (requires build)
 - hspec-discover-2.4.2 (exe:hspec-discover) (requires build)
 - regex-base-0.93.2 (requires build)
 - tf-random-0.5 (lib) (requires build)
 - xml-1.3.14 (requires build)
 - hashable-1.2.5.0 (lib) (first run)
 - tagged-0.8.5 (lib) (requires build)
 - exceptions-0.8.3 (lib) (requires build)
 - filemanip-0.3.6.3 (requires build)
 - hspec-expectations-0.8.2 (lib) (requires build)
 - doctest-0.11.1 (lib) (first run)
 - regex-posix-0.95.2 (requires download & build)
 - QuickCheck-2.9.2 (lib) (requires build)
 - void-0.7.1 (lib) (requires build)
 - distributive-0.5.2 (requires build)
 - doctest-0.11.1 (test:doctests) (first run)
 - doctest-0.11.1 (exe:doctest) (first run)
 - test-framework-0.8.1.1 (requires download & build)
 - quickcheck-io-0.1.4 (lib) (requires build)
 - contravariant-1.4 (requires build)
 - test-framework-quickcheck2-0.3.0.3 (requires download & build)
 - test-framework-hunit-0.3.0.2 (requires download & build)
 - hspec-core-2.4.2 (lib) (requires build)
Assertion failed
CallStack (from HasCallStack):
  assert, called at ./Distribution/Client/ProjectPlanning.hs:281:5 in cabal-install-2.1.0.0-inplace:Distribution.Client.ProjectPlanning
@ezyang
Copy link
Contributor

ezyang commented Mar 23, 2017

The commit you referenced is fairly old (Sep 13, 2016) and I couldn't repro using any of:

  • Cabal at 65879f4bf3aa288e77e488c135b20a28ba8c6efb, 20de0bf or most recent Cabal from @hvr's PPA
  • With GHC 8.2.0.20170313 from @hvr's PPA
  • On ghc-exactprint.

Here is an example succeeding run:

ezyang@sabre:~/Dev/labs/ghc-exactprint$ /opt/cabal/head/bin/cabal new-configure --enable-tests -fdev --with-compiler=ghc-8.2.1 --allow-newer
Resolving dependencies...
In order, the following would be built (use -v for more details):
 - Diff-0.3.4 (lib) (requires download & build)
 - base-orphans-0.5.4 (lib) (requires build)
 - cabal-doctest-1 (lib) (requires build)
 - call-stack-0.1.0 (lib) (requires build)
 - ghc-paths-0.1.0.9 (lib:ghc-paths) (requires build)
 - mtl-2.2.1 (lib:mtl) (requires build)
 - old-locale-1.0.0.7 (lib) (requires build)
 - prelude-extras-0.4.0.3 (lib:prelude-extras) (requires build)
 - semigroups-0.18.2 (lib) (requires build)
 - silently-1.2.5 (lib) (requires build)
 - stm-2.4.4.1 (lib) (requires build)
 - syb-0.7 (lib) (requires download & build)
 - text-1.2.2.1 (lib) (requires build)
 - transformers-compat-0.5.1.4 (lib) (requires build)
 - unix-compat-0.4.3.1 (lib:unix-compat) (requires build)
 - HUnit-1.5.0.0 (lib) (requires build)
 - old-time-1.1.0.3 (lib) (requires build)
 - StateVar-1.1.0.4 (lib) (requires build)
 - hashable-1.2.5.0 (lib) (requires build)
 - tagged-0.8.5 (lib) (requires build)
 - exceptions-0.8.3 (lib) (requires build)
 - filemanip-0.3.6.3 (lib:filemanip) (requires build)
 - void-0.7.1 (lib) (requires build)
 - distributive-0.5.2 (lib:distributive) (requires build)
 - contravariant-1.4 (lib:contravariant) (requires build)
 - comonad-5 (lib:comonad) (requires build)
 - bifunctors-5.4.1 (lib) (requires build)
 - semigroupoids-5.1 (lib:semigroupoids) (requires build)
 - profunctors-5.2 (lib) (requires build)
 - free-4.12.4 (lib) (requires build)
 - ghc-exactprint-0.5.3.0 (test:test) +dev (first run)
 - ghc-exactprint-0.5.3.0 (lib) +dev (first run)

Can you try again with a more recent cabal-install version?

@alanz
Copy link
Collaborator Author

alanz commented Mar 23, 2017

Oops, the cabal version in question is actually 8d3e120

Not sure how I got that hash in my report.

@alanz
Copy link
Collaborator Author

alanz commented Mar 23, 2017

Ok, it seems to be related to other directories used as subprojects

My cabal.project has

packages: .
     ../../ekmett/comonad
     ../../bgamari/hashable
     ../../ekmett/semigroupoids
     ../../phadej/doctest

-- doctest needs branch static-flags-802-fix

where each repo matches the github 8.2 branch version.

If I comment out all the subpackages except '.' then it configures fine, but the build fails on comonad, as expected

@hvr hvr added the type: assertion-fail NB: assertions are only enabled in devel-builds label Oct 27, 2018
@Mikolaj
Copy link
Member

Mikolaj commented Apr 28, 2019

With cabal version 6316102 I'm getting two similar assertions, but only when I use the following cabal.project.local file:

jobs: 1
flags: +with_expensive_assertions
profiling: False
library-profiling: False
tests: False
coverage: False
library-coverage: False
optimization: False
documentation: False

package *
  documentation: True
  library-profiling: False

Here's how to reproduce:

git clone git@github.com:LambdaHack/LambdaHack.git
cd LambdaHack
git checkout 16e5632a10b116905e499f2dd83ca21d0a0be261
~/teeeeeeeeee/LambdaHack$ cabal new-install -j1 .
Wrote tarball sdist to
/home/mikolaj/teeeeeeeeee/LambdaHack/dist-newstyle/sdist/LambdaHack-0.9.2.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-8.6.4 -O0
In order, the following will be built (use -v for more details):
Assertion failed
CallStack (from HasCallStack):
  assert, called at ./Distribution/Client/ProjectPlanning.hs:242:5 in main:Distribution.Client.ProjectPlanning
~/teeeeeeeeee/LambdaHack$ cabal new-install -j1
Resolving dependencies...
Assertion failed
CallStack (from HasCallStack):
  assert, called at ./Distribution/Client/ProjectOrchestration.hs:796:5 in main:Distribution.Client.ProjectOrchestration

@Mikolaj
Copy link
Member

Mikolaj commented Mar 22, 2022

This may be related to #6006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: nix-local-build type: assertion-fail NB: assertions are only enabled in devel-builds type: bug
Projects
None yet
Development

No branches or pull requests

4 participants