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

int64 serialization doesn't match the one in ocaml atdgen-runtime #22

Open
thatportugueseguy opened this issue Jul 3, 2020 · 2 comments

Comments

@thatportugueseguy
Copy link

When we have a type with an ocaml representation of int64, it doesn't get serialized in the same way as it would in ocaml atdgen-runtime.
ex:

type int64 = int <ocaml repr="int64">

In this example, the value would be returned from the ocaml side as an int in the json response, and the atdgen-codec-runtime would complain that it can't parse that value as it's expecting a string.

Int64 serialization functions:

ocaml atdgen-runtime:

let write_int64 ob x =
  Bi_outbuf.add_string ob (Int64.to_string x)

bs-atdgen-codec-runtime:

let int64 s = string (Int64.to_string s)
@Khady
Copy link
Contributor

Khady commented Mar 23, 2022

@zindel this is fixed now?

@jchavarri
Copy link
Member

Not fixed. The patch was reverted in ahrefs/atd#330.

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

3 participants