-
Notifications
You must be signed in to change notification settings - Fork 176
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
How to use Fieldslib and ppx_fields_conv with OCaml 4.06.1? #2982
Comments
Try: #require "ppx_jane";;
open Base You can also use the narrower |
Also, the instructions here on how to set up your .ocamlinit file will get your utop set up properly: |
The following directive worked immediately for me:
Then he helpers code was generated:
Whereas the following was not enough:
Do you know what is still necessary to only load ppx_fields_conv? FYI, my ~/.ocamlinit is compliant to your recommendations:
Thanks. |
Not offhand. This seems like an issue to raise against https://github.com/janestreet/ppx_fields_conv |
Thanks. Done: |
Any update on this? I assume this can be closed but feel free to ping me if you want it re-opened! |
Maybe we need to put Without it
|
RWO 2nd Edition promotes the use of Fieldslib (and ppx_fields_conv, depending both on ppxlib).
See First-Class Fields.
I can't generate the record helpers.
How to make Fieldslib and ppx_fields_conv working?
I'm using OCaml 4.06.1 and the required packages are installed:
As well as "base" v0.11.0, "jbuilder" 1.0+beta20 (req. build & >= "1.0+beta18.1"} and "ocaml-migrate-parsetree" 1.0.11 (req. >= "1.0") required by these three packages (fieldslib, ppx_fields_conv, ppxlib).
Unfortunately, when trying the example of the book with utop, I don't get the expected output (all the helpers) triggered by [@@deriving fields]:
I tried unsuccessfully:
and other rather random directives and commands.
What are the instructions for using Fieldslib (and ppx_fields_conv as well)?
PS : which OCaml tooling configuration (OCaml version, libraries version, jbuilder and related tools, etc. MUST be used to reliably and comfortably study RWO 2nd Edition?
e.g. I note that odoc, odig, ocaml-manual is a useful set of packages for generating module documentation, but ocaml-manual requires ocaml-version >= "4.05.0" & ocaml-version < "4.06.0".
So I if switch to 4.05.x, is there another lurking version conflict that may arise?...
Thanks
The text was updated successfully, but these errors were encountered: