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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants