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

Replace Vector with Array? #976

Open
Bodigrim opened this issue Oct 26, 2022 · 1 comment
Open

Replace Vector with Array? #976

Bodigrim opened this issue Oct 26, 2022 · 1 comment

Comments

@Bodigrim
Copy link
Contributor

Building aeson takes lots of time, even if a client uses only the most basic facilities. This matters not that much for local development (however depending on the frequency of cabal update it can get annoying too), but is a big deal for CI jobs, which often has cold cache.

A normal strategy would be to modularise aeson, separating Data.Aeson.Type into a package of its own. However, in this case it does not help much because Data.Aeson.Type incurs dependency on vector, which itself builds for ages, longer than the rest of aeson package.

Could we replace Data.Aeson.Type.Array from Vector Value to Array Value? Probably by making Data.Aeson.Type.Array an abstract data type, similar to KeyMap. I don't think aeson benefits on any way from vector fusion.

@phadej
Copy link
Collaborator

phadej commented Oct 26, 2022

Given how painful aeson-2 migration was, my opinion is that compilation time is not enough of a reason to do something like that.

I thought about this when making KeyMap module, but couldn't find a good reason. Vector is used quite universally, which in turn makes the recompilation argument even less strong: you likely well need to recompile vector for some other reason anyway.

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

No branches or pull requests

2 participants