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

Unable to only load ppx_fields_conv in top-level (utop) #2

Open
RogerTarani opened this issue Jun 18, 2018 · 3 comments
Open

Unable to only load ppx_fields_conv in top-level (utop) #2

RogerTarani opened this issue Jun 18, 2018 · 3 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@RogerTarani
Copy link

RogerTarani commented Jun 18, 2018

Context: RWO 2nd Edition. I raise this issue as suggested by Yaron Minsky (see https://github.com/realworldocaml/book/issues/2982).

I'm using OCaml 4.06.1 and the required packages are installed:

$ opam list
fieldslib                   v0.11.0  Syntax extension to define first class valu
...
ppx_fields_conv          v0.11.0  Generation of accessor and iteration functi
ppxlib                        0.2.1  A comprehensive toolbox for ppx development

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).

The following directive allowed me immediately to use ppx_fields_conv:

#require "ppx_jane"

But only loading ppx_fields_conv was not enough to be able to use ppx_fields_conv:

#require "ppx_fields_conv"

How can we fix that?

FYI, my ~/.ocamlinit is compliant to RWO 2nd Edition recommendations (see https://dev.realworldocaml.org/install.html):

$ cat ~/.ocamlinit
(* ## added by OPAM user-setup for ocamltop / base ## 3ec62baf6f9c219ae06d98140$
#use "topfind";;
(* ## end of OPAM user-setup addition for ocamltop / base ## keep this line *)
#thread;;
#require "core.top";;
#require "core.syntax";;
open Core
@XVilka
Copy link

XVilka commented Mar 14, 2019

Can you reproduce this with latest versions of the libraries?

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Aug 18, 2020
@v-gb
Copy link

v-gb commented Aug 18, 2020

Please include the actual errors when you report bugs. I'm seeing this, which may be what's being reported, but I can't be sure:

$ utop
...
utop # #require "ppx_fields_conv";;
No such package: ppx_deriving - required by `ppx_fields_conv'

We don't use ppx_deriving. It seems to come because the dune file says (kind ppx_deriver). I'll leave it to @xclerc or @jeremiedimino to look at this one, because it seems to be a problem with the exporting of code to opam or dune or this kind of operation being unsupported.

@ghost
Copy link

ghost commented Sep 14, 2020

It's a known issue that is complicated to fix without breaking the build of packages not using Dune. Once the ppx world is unified behind ppxlib, we should be in a better position to make things better. In the meantime, manually installing ppx_deriving via opam should help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

4 participants