Closed CarstenKoenig closed 4 years ago
sounds good. Simple type definitions are enough for ps 0.12? How does JSON encoding work then?
To make purescript-argonaut-generic-codecs work without the old Generics would be quite a bit of work - and maybe not necessary if https://github.com/paf31/purescript-foreign-generic is really a drop-in-replacement as suggested by @albertov . Whether it really is a drop-in-replacement, is hard to tell for me. The repo does not mention aeson at all, and (guaranteed) compatibility to Haskell's aeson is kinda necessary for server-client communication.
Yeah I know - right now my best guess is to continue with argonaut as well (this comes to mind: https://pursuit.purescript.org/packages/purescript-argonaut-generic/1.2.0)
argonaut-core and argonaut-codecs is already ready for 0.12 - the generic part has quite a few issues.
I asked in the FP slack channel for opinions, but got no answer so far
I see. :-( Moving purescript-argonaut-generic-codecs to Generics.Rep would be a complete rewrite of the library. Might not be too hard, but it is definitely some work.
did you have a look at https://github.com/eskimor/purescript-bridge/pull/45 yet?
I think it's fine to go this way - for servant-purescript
we can probably use purescript-foreign-generic
in the future
I've had a look into it today and it supports the default tag-encoding for sum-types and it should be ready for purescript in the near future
as soon as it is and you merge the PR above in I'm gonna work on the Servant side to generate the code necessary for this
Has there been any movement on this? It seems the PRs that @CarstenKoenig talks about have been merged.
@shmish111 yes sorry I did not look into this for quite some time - I hope I'll find some time to continue on that now, that most parts should have stabilized
Is there anything I could help with as a not-very-experienced Haskell/Purescript person?
These days, I'm trying to get the code that purescript-servant
generates for my API to compile, and I'm struggling with finding a set of packages that doesn't give errors. From what I understand now, it seems that I'd either need to go back to an older Purescript compiler version and guess all the right package versions or (what would be better in the long run) try to help move things forward towards 0.12.
@sabine we're using PS 11.7 successfully but I think really things need to move forward to 0.12. Unfortunately we were under some time pressure at the time of my query so we were unable to work on this ourselves.
Is this project dead?
@joshcough we've been using https://github.com/shmish111/purescript-bridge/tree/aeson-fix but we haven't got around to opening a PR to this repo yet.
@shmish111 Thanks. Can you show me how you add the dependency for it?
Update: I added this to stack.yaml, and it works great. But, please let me know if you do it differently.
- location:
git: https://github.com/shmish111/purescript-bridge.git
commit: dc500a47c8330526a78c5cfac84ddb923cd5c8a5
extra-dep: true
Sorry @joshcough I am holiday with no laptop, maybe @krisajenkins can help?
What's the right fork to use nowadays?
@i-am-the-slime probably @shmish111's
@i-am-the-slime sorry, no, that was merged, so master on this repo should be good to go
There are a couple of changes needed for PureScript 0.12 - the most important probably being that the support for 'purescript-generics` will be dropped (see also https://github.com/eskimor/purescript-bridge/issues/33)
For now I would propose to make the transition in a few steps:
v012
switch that will just produce simple type definitions that should work without any other dependencies in PureScript 0.12servant-purescript
if that is fine with you I'll get to work on that in the next few days (you should probably tag the current version with purescript_0.11.7 or branch it(?)
Best regards,
Carsten