-
Notifications
You must be signed in to change notification settings - Fork 704
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
Enabling tests via cabal config triggers internal error when building them #10795
Comments
@edmundnoble thank you for the report! Can you, please, try the latest version of cabal (3.14.1.1, available via ghcup)? |
@edmundnoble are you sure? I am using the same version of cabal and it passes all 22 tests. Maybe there could be some issues in [Portage] declaration. |
I am using cabal installed via ghcup, so I can't see why Portage would be an issue. Also, I see that you're using GHC 9.6.6; the error remains when I use GHC 9.6.6. |
I see the same issue with cabal 3.14.1.1 via ghcup. |
I can reproduce it locally. Here's a stack trace from profiling build of cabal-head: ❯ $c run tests -j1
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
componentAvailableTargetStatus: impossible; cname=test:test-ixset-typed
CallStack (from HasCallStack):
error, called at src/Distribution/Client/ProjectPlanning.hs:3192:15 in cabal-install-3.15.0.0-inplace:Distribution.Client.ProjectPlanning
CallStack (from -prof):
Distribution.Client.ProjectPlanning.availableTargets (src/Distribution/Client/ProjectPlanning.hs:(3046,1)-(3068,9))
Distribution.Client.ProjectOrchestration.resolveTargets (src/Distribution/Client/ProjectOrchestration.hs:(624,1)-(738,28))
Distribution.Client.ProjectOrchestration.runProjectPreBuildPhase (src/Distribution/Client/ProjectOrchestration.hs:(385,1)-(439,9))
Distribution.Client.ScriptUtils.withContextAndSelectors (src/Distribution/Client/ScriptUtils.hs:(298,1)-(399,55))
Distribution.Client.CmdRun.runAction (src/Distribution/Client/CmdRun.hs:(208,1)-(363,47))
Distribution.Simple.Command.commandAddAction (src/Distribution/Simple/Command.hs:(634,1)-(643,27))
Distribution.Client.CmdLegacy.newCmd (src/Distribution/Client/CmdLegacy.hs:(164,1)-(184,9))
Distribution.Simple.Command.commandFromSpec (src/Distribution/Simple/Command.hs:801:1-53)
Distribution.Simple.Utils.topHandlerWith (src/Distribution/Simple/Utils.hs:(506,1)-(550,41))
Distribution.Simple.Utils.topHandler (src/Distribution/Simple/Utils.hs:557:1-72)
Distribution.Client.Main.main (src/Distribution/Client/Main.hs:(296,1)-(313,52))
Main.main (main/Main.hs:11:1-30)
|
I haven't tried this before @ulysses4ever as far as I know. |
Describe the bug
cabal crashes attempting to build tests when tests are enabled via cabal config, but not when enabled with the
--enable-tests
CLI flag.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The tests should be built and run successfully, as they are with
cabal run tests --enable-tests
.System information
cabal
3.12.1.0ghc
9.8.2The text was updated successfully, but these errors were encountered: