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

ocamldep should detect ppx rewriter errors reported via [%%ocaml.error] #6996

Closed
vicuna opened this issue Sep 21, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Sep 21, 2015

Original bug ID: 6996
Reporter: db
Assigned to: @diml
Status: closed (set by @xavierleroy on 2017-02-16T14:18:08Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.1
Fixed in version: 4.03.0+dev / +beta1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Duplicate of: #6795
Monitored by: @gasche @diml

Bug description

Suppose I have a file

[-- test.ml --]
open Printf
type t = int [@@deriving create]
[-- end of test.ml --]

which I feed to ocamldep:

$ DERIVING_DIR=ocamlfind query ppx_deriving
$ ocamlfind ocamldep -modules -ppx "${DERIVING_DIR}/ppx_deriving" test.ml
test.ml:

ocamldep does not report an error, it just does not see any dependencies. Of course, here I forgot to specify ppx_deriving_create plugin and ppx rewriter reports that:

$ ocamlfind ppx_tools/rewriter -ppx "${DERIVING_DIR}/ppx_deriving" -impl test.ml
[%%ocaml.error let _ = "Cannot locate deriver create"
let _ = ""]

but ocamldep just silently ignores this ocaml.error extension. I believe it should be fixed and an error should be reported to user.

I didn't try that with the latest OCaml distribution but at the first glance the problem is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.