caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Bug in sexplib 7.0.4?
@ 2011-10-03 14:23 Michael Ekstrand
  2011-10-03 15:30 ` Markus Mottl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ekstrand @ 2011-10-03 14:23 UTC (permalink / raw)
  To: caml-list

I'm trying to build code against sexplib 7.0.4, and the code emitted by
the syntax extension has unqualified references to the base converters
like sexp_of_list and int_of_sexp. The result is that the sexplib-using
code fails to compile with undefined references. I've found this trying
to rebuild rpmdepsize, and also with some test code I have.

Is this a bug in 7.0.4, or are there source-level changes required to
build against recent versions of sexplib? It feels more like a bug to
me, as I shouldn't need to open a module like Sexplib.Conv to make the
generated code work.

- Michael

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

* Re: [Caml-list] Bug in sexplib 7.0.4?
  2011-10-03 14:23 [Caml-list] Bug in sexplib 7.0.4? Michael Ekstrand
@ 2011-10-03 15:30 ` Markus Mottl
  2011-10-03 15:47   ` Michael Ekstrand
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Mottl @ 2011-10-03 15:30 UTC (permalink / raw)
  To: Michael Ekstrand; +Cc: caml-list

On Mon, Oct 3, 2011 at 10:23, Michael Ekstrand <michael@elehack.net> wrote:
> I'm trying to build code against sexplib 7.0.4, and the code emitted by
> the syntax extension has unqualified references to the base converters
> like sexp_of_list and int_of_sexp. The result is that the sexplib-using
> code fails to compile with undefined references. I've found this trying
> to rebuild rpmdepsize, and also with some test code I have.
>
> Is this a bug in 7.0.4, or are there source-level changes required to
> build against recent versions of sexplib? It feels more like a bug to
> me, as I shouldn't need to open a module like Sexplib.Conv to make the
> generated code work.

This is indeed intended behavior, which is unfortunately not yet
well-documented.  The library used to generate code with hard-coded
module paths to the standard conversion functions.  This made it hard
to override them.  The new library therefore requires you to "open
Sexplib.Std" (not Sexplib.Conv btw.) if you are happy with all
standard converters.  The effort is minimal, makes it explicit what
conversion functions are being used, and overriding is as easy as
(automatic) rebinding.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


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

* Re: [Caml-list] Bug in sexplib 7.0.4?
  2011-10-03 15:30 ` Markus Mottl
@ 2011-10-03 15:47   ` Michael Ekstrand
  2011-10-03 16:06     ` Markus Mottl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ekstrand @ 2011-10-03 15:47 UTC (permalink / raw)
  To: caml-list

On 10/03/2011 10:30 AM, Markus Mottl wrote:
> On Mon, Oct 3, 2011 at 10:23, Michael Ekstrand <michael@elehack.net> wrote:
>> I'm trying to build code against sexplib 7.0.4, and the code emitted by
>> the syntax extension has unqualified references to the base converters
>> like sexp_of_list and int_of_sexp. The result is that the sexplib-using
>> code fails to compile with undefined references. I've found this trying
>> to rebuild rpmdepsize, and also with some test code I have.
>>
>> Is this a bug in 7.0.4, or are there source-level changes required to
>> build against recent versions of sexplib? It feels more like a bug to
>> me, as I shouldn't need to open a module like Sexplib.Conv to make the
>> generated code work.
> This is indeed intended behavior, which is unfortunately not yet
> well-documented.  The library used to generate code with hard-coded
> module paths to the standard conversion functions.  This made it hard
> to override them.  The new library therefore requires you to "open
> Sexplib.Std" (not Sexplib.Conv btw.) if you are happy with all
> standard converters.  The effort is minimal, makes it explicit what
> conversion functions are being used, and overriding is as easy as
> (automatic) rebinding.

Thank you for the update. Could you add a note to this effect to the
README for a future release?

Thanks!
- Michael

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

* Re: [Caml-list] Bug in sexplib 7.0.4?
  2011-10-03 15:47   ` Michael Ekstrand
@ 2011-10-03 16:06     ` Markus Mottl
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Mottl @ 2011-10-03 16:06 UTC (permalink / raw)
  To: Michael Ekstrand; +Cc: caml-list

It's already in version control and will be out with the next release.

Regards,
Markus

On Mon, Oct 3, 2011 at 11:47, Michael Ekstrand <michael@elehack.net> wrote:
> Thank you for the update. Could you add a note to this effect to the
> README for a future release?
>
> Thanks!
> - Michael

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 14:23 [Caml-list] Bug in sexplib 7.0.4? Michael Ekstrand
2011-10-03 15:30 ` Markus Mottl
2011-10-03 15:47   ` Michael Ekstrand
2011-10-03 16:06     ` Markus Mottl

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