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

Backport 3.12: Show installed versions when configuring fails #10406

Closed

Conversation

9999years
Copy link
Collaborator

Backport of #10273 for 3.12.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

When `act-as-setup configure` fails, it doesn't indicate which
dependencies are missing entirely and which ones don't satisfy the
version constraints. The errors from `cabal build` are more informative,
but aren't available in all contexts (nixpkgs Haskell builds, for
example, use the `act-as-setup` interface). This makes it immediately
clear what sort of dependency error has occurred.

Before (cabal-install 3.12.1.0):

    Configuring test-pkg-0.1.0.0...
    Error: [Cabal-8010]
    Encountered missing or private dependencies:
        base <=4.18,
        foobar,
        test-pkg:{bar-internal, foo-internal}

After:

    Configuring test-pkg-0.1.0.0...
    Error: [Cabal-8010]
    Encountered missing or private dependencies:
        base <=4.18 (installed: 4.19.1.0),
        foobar (missing),
        test-pkg:{bar-internal,foo-internal} (missing: :bar-internal)
@9999years 9999years force-pushed the missing-or-private-details-3.12 branch from 335a128 to 2a0662c Compare October 1, 2024 19:27
---
synopsis: "Show why `cabal act-as-setup configure` failed"
packages: [Cabal]
prs: 10273
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, I wonder whether the missing # will mess with changelog.d.

@9999years 9999years marked this pull request as ready for review October 2, 2024 17:27
@9999years 9999years closed this Oct 12, 2024
@9999years 9999years deleted the missing-or-private-details-3.12 branch October 12, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants