Skip to content

Conversation

philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Dec 24, 2023

Fixes #9559. Helps with #4251.

Template Α: This PR modifies cabal behaviour

Include the following checklist in your PR:

To test, introduce a version bound (or conflict) that is going to reject some versions of a package. Even if this creates an unsolvable combination of versions, that should suffice to trigger the rejection message by the solver for manual testing.

I found no examples of solver rejection messages in the docs.

@philderbeast
Copy link
Collaborator Author

@yvan-sraka I would like to get this in before some formatting changes for showing "constraint from project". This is a subset of your #9541 changes.

@philderbeast philderbeast force-pushed the fix/format-rejections-9559 branch 3 times, most recently from 73540ec to a5f2cc8 Compare December 25, 2023 17:16
@philderbeast
Copy link
Collaborator Author

philderbeast commented Dec 26, 2023

@Mikolaj I had to rerun failed jobs three times to get all green ticks:

Failures were:

  • Validate ubuntu-latest ghc-8.4.4
    PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs
    -----BEGIN CABAL OUTPUT-----
    Error: cabal: '/usr/bin/curl' exited with an error:
    curl: (7) Failed to connect to localhost port 8000 after 0 ms: Connection refused
    -----END CABAL OUTPUT-----
    
  • Validate ubuntu-latest ghc-8.10.7
    PackageTests/NewUpdate/RejectFutureIndexStates/cabal.test.hs
    -----BEGIN CABAL OUTPUT-----
    Error: cabal: '/usr/bin/curl' exited with an error:
    curl: (7) Failed to connect to localhost port 8000 after 0 ms: Connection refused
    -----END CABAL OUTPUT-----
    
  • Validate macos-latest ghc-9.4.8
    PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs
    -----BEGIN CABAL OUTPUT-----
    Error: cabal: '/usr/local/opt/curl/bin/curl' exited with an error:
    curl: (7) Failed to connect to localhost port 8000 after 0 ms: Couldn't connect to server
    -----END CABAL OUTPUT-----
    

@ulysses4ever
Copy link
Collaborator

@philderbeast thanks for the report. The work to prevent this bug is under way in #9540 If you have energy, your help there would be greatly appreciated because I'm running out of ideas.

@philderbeast
Copy link
Collaborator Author

Label merge+no rebase is necessary when the pull request is from an organisation.

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

Could we get @grayjay's opinion on it but any chance? She's our solver code owner effectively. Would be great to get her approval on any change to it.

Copy link
Collaborator

@sebright sebright left a comment

Choose a reason for hiding this comment

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

@philderbeast Thanks for working on the solver error messages! Please add a note about starting with @yvan-sraka's change to the commit message.

@philderbeast
Copy link
Collaborator Author

philderbeast commented Dec 31, 2023

Please add a note about starting with @yvan-sraka's change to the commit message.

@yvan-sraka I did not start from your change and sorry I didn't see your work on #4251 earlier. I was working on #9510 and the verbosity of the rejection messages started to annoy me so I raised #9559, saw a quick fix improvement and went for it, found your work and realized I hadn't accounted for hyphenated package names.

The commit history is lost after squashing but these were the 3 initial commit messages:

  • Format solver rejections
  • Take account of hyphenated package names
  • Don't shorten a singe rejection

@sebright
Copy link
Collaborator

@yvan-sraka I did not start from your change and sorry I didn't see your work on #4251 earlier. I was working on #9510 and the verbosity of the rejection messages started to annoy me so I raised #9559, saw a quick fix improvement and went for it, found your work and realized I hadn't accounted for hyphenated package names.

@philderbeast Sorry, I had misunderstood your comment above. I see that the changes are independent.

@philderbeast philderbeast force-pushed the fix/format-rejections-9559 branch from 70f8a76 to a79cf19 Compare January 1, 2024 15:29
@philderbeast
Copy link
Collaborator Author

I've left recent commits as-is for review. Please let me know if you'd like some of these squashed.

Copy link
Collaborator

@sebright sebright left a comment

Choose a reason for hiding this comment

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

@philderbeast Thanks for the updates and for also handling skipped versions.

I've left recent commits as-is for review. Please let me know if you'd like some of these squashed.

I would prefer squashing to remove the large test build files before you merge.

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 5, 2024
@philderbeast philderbeast force-pushed the fix/format-rejections-9559 branch from 5eefeee to cf9161f Compare January 6, 2024 20:39
@philderbeast philderbeast force-pushed the fix/format-rejections-9559 branch from 7bb55b7 to 5bceb40 Compare January 13, 2024 22:27
@philderbeast
Copy link
Collaborator Author

philderbeast commented Jan 16, 2024

@ulysses4ever this is ready for your approval. It already has the merge delay passed label attached.

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@philderbeast
Copy link
Collaborator Author

Label merge+no rebase is necessary when the pull request is from an organisation.

@mergify mergify bot merged commit d89087b into haskell:master Jan 16, 2024
@ulysses4ever
Copy link
Collaborator

Please, try not to forget squashing before merging.

@philderbeast
Copy link
Collaborator Author

@ulysses4ever a momentary lapse of diligence on my part, sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: solver merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge+no rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could we shorten the solver rejections message?
6 participants