-
Notifications
You must be signed in to change notification settings - Fork 51
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
Move from atdgen to ppx_deriving_yojson #109
Comments
We need support for something like atdgen's If we want to use |
This may be useful as a transitional mjambon/atdgen#44 tool |
It will be.
@dsheets What do you mean by this ? FWIW I'm interacting with GitHub's API at the moment but it's out of question to have the insane dependency cone of ocaml-github (see the daunting output of So I think it would be nice to have a base library (maybe even as a separate project) that simply has abstract data types and jsont codecs that models the API. This would allow to reuse the definitions with which ever transport layer you'd like --- in my case, the |
On 12 Apr 2016, at 11:48, Daniel Bünzli [email protected] wrote:
Yes, this is my preferred solution also. A dependency-free (aside from jsont) library of the API itself would be nice to have. |
This would not really satisfy me as a user. Sexp converters are a very useful debugging tool for me with concrete benefits. The fruits of a well pruned dependency tree on the other hand are harder to imagine.
Why stop there? Let's make a library with just the types and jsont can be added on top (in a separate project too!). I'm sure we can find someone out there who will complain about that dependency too. |
this doesn't seem to be incompatible with having sexps -- I'm just thinking of replacing the atd description of the API with jsont and making that a separate package. We could do the same thing for just the ATD spec (in a similar manner to wire format descriptions in cstruct/mirage). I think it's possible to do this in a single repo these days by using an |
If debugging is the only reason, formatters can do the job. If you really insist on sexps then you don't need to generate them, a codec function for a datatype should be only a few typed indexed combinators away.
I hope you had a look at the result of the invocation I mentioned earlier. I'm not sure why I have to depend on But then maybe you like bloat.
Such a person would exercise very poor taste... As always good design is about finding the right balance, this applies to your dependency cone too. |
In my book, that is called a bug, and can be fixed like one if you create an issue about it. We just need to rearrange the opam packages so that they follow the same dependency cone as the modules contained within the various ocamlfind packages. At a guess, your OPAM invocation is probably resolving depopts as well with the
there are a few things that could be trimmed from this list (e.g. magic-mime is only really for cohttp server, and so not necessary for a client package), but overall a lot of it is ppx build time stuff. Not exactly an engineering disaster... |
Can I re-use |
So we can at least agree that sexps solve real problems.
Formatters are fine for debugging too, because I can also generate them.
No, I agree with this point. ocaml-github can certainly structure the dependencies better. But I distinguish between different dependencies. Some like you've pointed out are overly specific and require users to pay in portability, binary bloat, external dependencies, etc. I just don't think sexp is one such dependency. I guess I still don't understand your objections against ppx?! @avsm how did lambda-term make that list? |
Maybe if jsont was released that would be done already, it's not really a question of dependencies. I'd much rather work on that on dependency minimization crusades that I will have to undo in my own software anyway. |
https://github.com/mirage/ocaml-github/tree/master/js
To reiterate: the
|
These of course should be written by the library author.
There are many (I won't talk about the lack of compositionality), but from an eco-system perspective, I don't think people fully grasp the hidden costs of I personally had to stop testing it because even the bloody |
Or to jsont if it ever gets released. My main motivation for this is to add the common deriving converters to the type definitions like sexp.
The text was updated successfully, but these errors were encountered: