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

Remove hashable dependency #10316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaspervdj
Copy link
Member

@jaspervdj jaspervdj commented Sep 5, 2024

See #10140

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@jaspervdj jaspervdj marked this pull request as ready for review September 5, 2024 09:46
@jaspervdj jaspervdj marked this pull request as draft September 5, 2024 09:48
@jaspervdj
Copy link
Member Author

Removing hashable from the test suite nerd-sniped me into writing a bit of whacky arbitrary machinery, but I think it's not necessarily worse than abusing hashable for this.

@jaspervdj jaspervdj marked this pull request as ready for review September 5, 2024 18:07
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.

Pretty cool, thank you!

I'd hope for a smaller diff if we just had some of the compat code added to some sort of Prelude or Compat module (which we already have in vast numbers!). So, like

type Hash = HashValue
readFileHash = readFileHashValue 

But maybe this grows the codebase unnecessarily, so I'm split on this. It just feels like a hash library is something that may change once in a while, and a little abstraction from it woudln't hurt.

@jaspervdj
Copy link
Member Author

I added some minimal comments to the code as well.

I'd hope for a smaller diff if we just had some of the compat code added to some sort of Prelude or Compat module

IMO, Distribution.Client.HashValue is this compat module. It just wasn't used in FileMonitor yet...

@ulysses4ever
Copy link
Collaborator

IMO, Distribution.Client.HashValue is this compat module. It just wasn't used in FileMonitor yet...

Oh, that's good, thank you!

@ulysses4ever ulysses4ever added the merge me Tell Mergify Bot to merge label Oct 2, 2024
@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Oct 2, 2024
@ulysses4ever ulysses4ever linked an issue Oct 2, 2024 that may be closed by this pull request
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Oct 4, 2024
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 me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't depend on hashable directly
4 participants