haskell / aeson

A fast Haskell JSON library
Other
1.26k stars 321 forks source link

Version of `attoparsec-aeson` for older `aeson` versions #1048

Closed parsonsmatt closed 1 year ago

parsonsmatt commented 1 year ago

If a library depends on Data.Aeson.Parser, then for aeson < 2.2 they depend on aeson. But for aeson >= 2.2, they depend on attoparsec-aeson, which forces aeson == 2.2.*. This means that a library cannot support aeson < 2.2 and depend on Data.Aeson.Parser.

If there's a release made of attoparsec-aeson-2.1.0.0, which defines an empty package but constrains aeson < 2.2, then this should allow libraries to depend on attoparsec-aeson without forcing aeson == 2.2.* as a constraint.

phadej commented 1 year ago

Good idea. Will do soon.

parsonsmatt commented 1 year ago

Thank you!

phadej commented 1 year ago

https://hackage.haskell.org/package/attoparsec-aeson-2.1.0.0 is on Hackage

parsonsmatt commented 1 year ago

Wonderful, thank you so much!

IamfromSpace commented 1 year ago

Hi all, it would be great if attoparsec-aeson were available in all previous LTSs of stackage, are there plans for this?

For applications that are interested in using it for compatibility (such as hal), older stackage LTSs can't take in (otherwise safe) new releases that support either aeson 2.1 and 2.2 simultaneously--unless attoparsec-aeson is in that snapshot too.

Since the compatibility package is so simple, it should be safe to put it into basically any snapshot.

Would be great to know if that was planned, or if there are alternatives that I hadn't considered. Thanks!

phadej commented 1 year ago

are there plans for this?

No. Stackage has own curators, they can curate. Open a Stackage issue.

IamfromSpace commented 1 year ago

Will do, appreciate the quick reply.