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

Missing dependency? #21

Closed
smondet opened this issue Mar 28, 2018 · 6 comments
Closed

Missing dependency? #21

smondet opened this issue Mar 28, 2018 · 6 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. not-clear-what-next-step-is This report is kept open as a reminder, but it is not clear what should happen next.

Comments

@smondet
Copy link

smondet commented Mar 28, 2018

In Utop, for OCaml 4.06.1:

ocaml# #require "ppx_sexp_conv";;
No such package: ppx_deriving - required by `ppx_sexp_conv'
 $ opam info ppx_sexp_conv

=-=- ppx_sexp_conv: information on all versions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
name                   ppx_sexp_conv
all-installed-versions v0.10.0 [4.05.0 4.06.1]
all-versions           113.09.00  113.24.00  113.33.00  113.33.00+4.03  113.33.01+4.03  113.33.03  v0.9.0  v0.10.0  v0.11.0

=-=- Version-specific details -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
version       v0.10.0
repository    default
url.src:      https://ocaml.janestreet.com/ocaml-core/v0.10/files/ppx_sexp_conv-v0.10.0.tar.gz
url.checksum: md5=c14ca06337e21899ee9ea32cf52aa374
homepage:     https://github.com/janestreet/ppx_sexp_conv
bug-reports:  https://github.com/janestreet/ppx_sexp_conv/issues
dev-repo:     git+https://github.com/janestreet/ppx_sexp_conv.git
authors:      Jane Street Group, LLC <[email protected]>
maintainer:   [email protected]
license:      Apache-2.0
depends:      "ocaml" {>= "4.04.1"}
              "ppx_core" {>= "v0.10" & < "v0.11"}
              "ppx_driver" {>= "v0.10" & < "v0.11"}
              "ppx_metaquot" {>= "v0.10" & < "v0.11"}
              "ppx_type_conv" {>= "v0.10" & < "v0.11"}
              "sexplib" {>= "v0.10" & < "v0.11"}
              "jbuilder" {build & >= "1.0+beta12"}
              "ocaml-migrate-parsetree" {>= "0.4"}
synopsis      Generation of S-expression conversion functions from type definitions
description   Part of the Jane Street's PPX rewriters collection.
@smondet
Copy link
Author

smondet commented Mar 28, 2018

Manually installing ppx_deriving then works.

@ghost
Copy link

ghost commented Mar 28, 2018

yh that's expected. Basically ppx_sexp_conv doesn't need ppx_deriving but exposes a compatibility mode that uses ppx_deriving. The toplevel relies on this compatibility mode.

@mars0i
Copy link

mars0i commented May 5, 2018

It's expected that people will encounter a missing lib when using ppx_sexp_conv in an obvious way? Well, OK, often one will have already installed ppx_deriving for other reasons, so maybe this won't happen very often, but perhaps at least a note about this could be added to the README.

(I worry that little things like this, encountered repeatedly in different contexts--as one does--is the sort of thing that will turn people off of OCaml before they are far enough into it to appreciate it.)

@shonfeder
Copy link

Is there a way to intercept this missing library error and print a user friendly message? Perhaps using some compilation flags at build time?

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Sep 2, 2020
@aalekseyev
Copy link
Contributor

I don't understand everything that's going on, but this sounds like a widespread issue that affects many ppxes.

For example here a user is reasonably(ish) describing a related issue as a bug, but it's in ppx_deriving_json.

Not sure what the right solution is, maybe it's just phasing out findlib.

@aalekseyev aalekseyev added the not-clear-what-next-step-is This report is kept open as a reminder, but it is not clear what should happen next. label Sep 2, 2020
@aalekseyev
Copy link
Contributor

Actually, closing it as a duplicate of #30.

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. not-clear-what-next-step-is This report is kept open as a reminder, but it is not clear what should happen next.
Projects
None yet
Development

No branches or pull requests

5 participants