caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] visitors.ppx and ppx_metaquot
@ 2017-10-05 13:30 Christoph Höger
  2017-10-06  8:29 ` Emilio Jesús Gallego Arias
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Höger @ 2017-10-05 13:30 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]

Dear OCaml users,

today I tried to recompile a project that uses both some janestreet
derivers and visitors.ppx. To my horror, it now fails to compile with an
error about the visitors argument:

utop # #require "visitors.ppx";;
utop # type foo = int list [@@deriving visitors {variety="reduce"}];;
Error: Reference to undefined global
`VisitorsRuntime'
utop # #require "ppx_sexp_conv";;
utop # type foo = int list [@@deriving visitors {variety="reduce"}];;
Error: non-optional labeled argument expected

There is another error that might be related when I try it combination with
ppx_metaquot:

utop # #require "visitors.ppx";;
utop # type foo = int list [@@deriving visitors {variety="reduce"}];;
Error: Reference to undefined global
`VisitorsRuntime'
utop # #require "ppx_metaquot";;
utop # type foo = int list [@@deriving visitors {variety="reduce"}];;
Error: Attribute `deriving' was not used


The first error looks like ppx_type_conv gets confused about what is a
janestreet deriver and what is something else. The second error, well I
have no idea...

Does anyone know a workaround?

thanks,

Christoph

[-- Attachment #2: Type: text/html, Size: 2340 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] visitors.ppx and ppx_metaquot
  2017-10-05 13:30 [Caml-list] visitors.ppx and ppx_metaquot Christoph Höger
@ 2017-10-06  8:29 ` Emilio Jesús Gallego Arias
  2017-10-06 13:15   ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Emilio Jesús Gallego Arias @ 2017-10-06  8:29 UTC (permalink / raw)
  To: Christoph Höger; +Cc: OCaml Mailing List

Dear Christoph,

Christoph Höger <christoph.hoeger@celeraone.com> writes:

> Does anyone know a workaround?

I had a similar problem [but not with visitors] that I solved by pinning
ppx_deriving to the 4.1 version. I guess you lose little by not trying.

E.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] visitors.ppx and ppx_metaquot
  2017-10-06  8:29 ` Emilio Jesús Gallego Arias
@ 2017-10-06 13:15   ` Gabriel Scherer
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Scherer @ 2017-10-06 13:15 UTC (permalink / raw)
  To: Emilio Jesús Gallego Arias, Christoph Höger,
	OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

I think that similar issues have been reported before, and seem to arise
out of a wrong interaction between ppx_deriving and ppx_type_conv:

  https://github.com/ocaml-ppx/ppx_deriving/issues/149
  https://github.com/janestreet/ppx_type_conv/issues/9

(Note: Jérémie Dimino, which has been handling most of the ppx_type_conv
maintenance, is currently in well-deserved holidays, so the safest bet for
the next couple months may indeed be to pin back to older versions that
work for you.)

On Fri, Oct 6, 2017 at 10:29 AM, Emilio Jesús Gallego Arias <e@x80.org>
wrote:

> Dear Christoph,
>
> Christoph Höger <christoph.hoeger@celeraone.com> writes:
>
> > Does anyone know a workaround?
>
> I had a similar problem [but not with visitors] that I solved by pinning
> ppx_deriving to the 4.1 version. I guess you lose little by not trying.
>
> E.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 2005 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-06 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 13:30 [Caml-list] visitors.ppx and ppx_metaquot Christoph Höger
2017-10-06  8:29 ` Emilio Jesús Gallego Arias
2017-10-06 13:15   ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).