Repository navigation
Open
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").type: assertion-failNB: assertions are only enabled in devel-buildstype: bug
Description
First reported here. With a recent snapshot from master and using the cabal repo itself as a test project:
~/code/haskell/cabal[master]$ cabal new-test
cabal: No targets given and there is no package in the current directory. Use
the target 'all' for all packages in the project or specify packages or
components by name or location. See 'cabal build --help' for more details on
target options.
~/code/haskell/cabal[master]$ cabal new-test cabal-install
cabal: Cannot test the package cabal-install-2.1.0.0 because none of the
components are available to build: the test suite 'unit-tests', the test suite
'solver-quickcheck', the test suite 'memory-usage-tests' and the test suite
'integration-tests2' are all marked as 'buildable: False'
~/code/haskell/cabal[master]$ cabal new-test cabal-install:unit-tests
cabal: Cannot run the test suite 'unit-tests' because it is marked as
'buildable: False' within the 'cabal-install.cabal' file (at least for the
current configuration). If you believe it should be buildable then check the
.cabal file to see if the buildable property is conditional on flags.
Alternatively you may simply have to edit the .cabal file to declare it as
buildable and fix any resulting build problems.
~/code/haskell/cabal[master]$ cabal new-test cabal-install:unit-tests --enable-tests
cabal: Cannot run the test suite 'unit-tests' because it is marked as
'buildable: False' within the 'cabal-install.cabal' file (at least for the
current configuration). If you believe it should be buildable then check the
.cabal file to see if the buildable property is conditional on flags.
Alternatively you may simply have to edit the .cabal file to declare it as
buildable and fix any resulting build problems.
~/code/haskell/cabal[master]$ cabal new-configure --enable-tests
'cabal.project.local' file already exists. Now overwriting it.
In order, the following would be built (use -v for more details):
Assertion failed
CallStack (from HasCallStack):
assert, called at ./Distribution/Client/ProjectPlanning.hs:280:5 in main:Distribution.Client.ProjectPlanning
Probably applies to new-bench too (or rather will do, once #4614 is merged). @fgaz, I think this is something that you can look into now that you're finished with new-run.
Metadata
Metadata
Assignees
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").type: assertion-failNB: assertions are only enabled in devel-buildstype: bug
Activity
dmwit commentedon Jul 21, 2017
For what it's worth: the first one appears consistent with other new-* commands. The next few I can't reproduce. The last one seems like a genuine bug, though.
23Skidoo commentedon Jul 21, 2017
Just tried with the latest snapshot:
Still can reproduce them all. I'll delete
dist-newstyleand try again.23Skidoo commentedon Jul 21, 2017
Note that I have a slightly patched
cabal.project:23Skidoo commentedon Jul 21, 2017
It seems to work if I unapply this patch, at least it starts the build process.
fgaz commentedon Jul 23, 2017
Closing in favor of #4621
23Skidoo commentedon Jul 23, 2017
@fgaz
You can reproduce the issue if you apply the patch from #4619 (comment) to
cabal.project. I don't think that the behaviour in this case is correct right now, but I may be wrong.fgaz commentedon Jul 23, 2017
Ah sorry, I assumed it was normal.
Mikolaj commentedon Mar 22, 2022
This may be related to #6006.