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

Why is there bespoke JSON infra? #276

Open
Ericson2314 opened this issue May 31, 2022 · 3 comments
Open

Why is there bespoke JSON infra? #276

Ericson2314 opened this issue May 31, 2022 · 3 comments
Labels
hackage-security refactor Refactorings, semantics preserving code changes

Comments

@Ericson2314
Copy link

Shouldn't we just delete that and use Aeson?

@Ericson2314 Ericson2314 changed the title Why is there bespoke JSON infra Why is there bespoke JSON infra? May 31, 2022
@Mikolaj
Copy link
Member

Mikolaj commented May 31, 2022

I really don't know the packages enough to say. That's about the hackage-security Hackage package proper? I suppose the original authors would know, so let's ask them.

@adamgundry
Copy link
Member

Does Aeson provide support for Canonical JSON? That's necessary for reliably hashing JSON values, which is crucial. I don't know the details of the history here, but it looks like the relevant bits were subsequently extracted as a separate package (https://github.com/well-typed/canonical-json) so perhaps hackage-security could be refactored to use that, if anyone cares enough.

@andreasabel
Copy link
Member

References:

aeson is very slow to compile and provides many features not needed here, so I'd advice against.

canonical-json is atm outdated and needs to be lifted to the latest Haskell ecosystem (bytestring-0.11). Whether it has any users, is hard to tell, at least it is not tracked in https://packdeps.haskellers.com/reverse/canonical-json.

Never change a running system. As long as there isn't any expected gain from change, I'd leave things as-is for now.

@andreasabel andreasabel added refactor Refactorings, semantics preserving code changes and removed help wanted labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackage-security refactor Refactorings, semantics preserving code changes
Projects
None yet
Development

No branches or pull requests

4 participants