caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OASIS circular dependency in xml-light
@ 2016-06-10  8:39 Olaf Hering
  2016-06-10 10:32 ` Daniel Bünzli
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2016-06-10  8:39 UTC (permalink / raw)
  To: caml-list

How can I fix the circular depencency reported by oasis when converting
the xml-light to use _oasis for building?

https://github.com/ncannasse/xml-light

Circular dependencies: "xml.cmo" already seen in [ "dtd.cmo"; "xml.cmo" ]

I tried various things in _oasis, including this:

+Library "xml-light"
+  Path: .
+  Modules: Xml
+  InternalModules: Dtd, Xml_lexer, XmlParser

Thanks,

Olaf

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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-10  8:39 [Caml-list] OASIS circular dependency in xml-light Olaf Hering
@ 2016-06-10 10:32 ` Daniel Bünzli
  2016-06-10 10:37   ` Olaf Hering
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Bünzli @ 2016-06-10 10:32 UTC (permalink / raw)
  To: Olaf Hering; +Cc: caml-list

This doesn't answer your question but if you are trying to use xml-light for one of your project I'd advise against using it as it is absolutely not standard compliant, which will be a pain for you or your users at some point. There are a few other alternatives like markup.ml, pxp or xmlm which are.

Best, 

Daniel



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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-10 10:32 ` Daniel Bünzli
@ 2016-06-10 10:37   ` Olaf Hering
  2016-06-11  6:14     ` Adrien Nader
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2016-06-10 10:37 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: caml-list

On Fri, Jun 10, Daniel Bünzli wrote:

> This doesn't answer your question but if you are trying to use
> xml-light for one of your project I'd advise against using it as it is
> absolutely not standard compliant, which will be a pain for you or
> your users at some point. There are a few other alternatives like
> markup.ml, pxp or xmlm which are.

There is virt-top which uses this lib. I guess it uses it to peek into
libvirt xml data for the running VMs.

Olaf

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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-10 10:37   ` Olaf Hering
@ 2016-06-11  6:14     ` Adrien Nader
  2016-06-11  8:20       ` Adrien Nader
  0 siblings, 1 reply; 7+ messages in thread
From: Adrien Nader @ 2016-06-11  6:14 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Daniel Bünzli, caml-list

XML-light is overall a nice and simple library but it's unmaintained
with known bugs and unknown or unpublicized ones too. I think it hasn't
been maintained for a decade.

-- 
Adrien Nader

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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-11  6:14     ` Adrien Nader
@ 2016-06-11  8:20       ` Adrien Nader
  2016-06-11 12:03         ` Gabriel Scherer
  0 siblings, 1 reply; 7+ messages in thread
From: Adrien Nader @ 2016-06-11  8:20 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Daniel Bünzli, caml-list

Well, it has seen some development in the past couple years on github.

Anyway, back to the original problem.

xml.ml references Dtd
dtd.ml references Xml (through 'open Xml', which is needed)

xml.mli does not reference Dtd
dtd.mli references Xml

Currently xml.mli is compiled, then dtd.mli, then dtd.ml and finally
xml.ml (there are other modules involved but they don't seem to be
involved in the loop). I'm not completely surprised this works but I
didn't know it was possible (my current version here is 4.01.0 but it
has probably been that way for a long time). Maybe someone else can
comment on that.

I'm actually wondering how this works wrt module initialization order.

I think the sure way would be to move at least some declarations to a
separate module that has no dependency on others and which both Xml and
Dtd could depend on.

-- 
Adrien Nader

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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-11  8:20       ` Adrien Nader
@ 2016-06-11 12:03         ` Gabriel Scherer
  2016-06-11 15:19           ` Gabriel Scherer
  0 siblings, 1 reply; 7+ messages in thread
From: Gabriel Scherer @ 2016-06-11 12:03 UTC (permalink / raw)
  To: Adrien Nader; +Cc: Olaf Hering, Daniel Bünzli, caml users

I have the same memories of tricky circular dependencies from looking
at the xml-light sources a while ago, and if I remember correctly
there were some really shady Obj.magic going on at the same time. If
people depend on this library, the best fix is probably to clean it up
in these respects.

On Sat, Jun 11, 2016 at 4:20 AM, Adrien Nader <adrien@notk.org> wrote:
> Well, it has seen some development in the past couple years on github.
>
> Anyway, back to the original problem.
>
> xml.ml references Dtd
> dtd.ml references Xml (through 'open Xml', which is needed)
>
> xml.mli does not reference Dtd
> dtd.mli references Xml
>
> Currently xml.mli is compiled, then dtd.mli, then dtd.ml and finally
> xml.ml (there are other modules involved but they don't seem to be
> involved in the loop). I'm not completely surprised this works but I
> didn't know it was possible (my current version here is 4.01.0 but it
> has probably been that way for a long time). Maybe someone else can
> comment on that.
>
> I'm actually wondering how this works wrt module initialization order.
>
> I think the sure way would be to move at least some declarations to a
> separate module that has no dependency on others and which both Xml and
> Dtd could depend on.
>
> --
> Adrien Nader
>
> --
> 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

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

* Re: [Caml-list] OASIS circular dependency in xml-light
  2016-06-11 12:03         ` Gabriel Scherer
@ 2016-06-11 15:19           ` Gabriel Scherer
  0 siblings, 0 replies; 7+ messages in thread
From: Gabriel Scherer @ 2016-06-11 15:19 UTC (permalink / raw)
  To: Adrien Nader; +Cc: Olaf Hering, Daniel Bünzli, caml users

I sent a preliminary pull request to break the cycles at
  https://github.com/ncannasse/xml-light/pull/3

Any comments are welcome, but we could move the discussion to this pull request.

On Sat, Jun 11, 2016 at 8:03 AM, Gabriel Scherer
<gabriel.scherer@gmail.com> wrote:
> I have the same memories of tricky circular dependencies from looking
> at the xml-light sources a while ago, and if I remember correctly
> there were some really shady Obj.magic going on at the same time. If
> people depend on this library, the best fix is probably to clean it up
> in these respects.
>
> On Sat, Jun 11, 2016 at 4:20 AM, Adrien Nader <adrien@notk.org> wrote:
>> Well, it has seen some development in the past couple years on github.
>>
>> Anyway, back to the original problem.
>>
>> xml.ml references Dtd
>> dtd.ml references Xml (through 'open Xml', which is needed)
>>
>> xml.mli does not reference Dtd
>> dtd.mli references Xml
>>
>> Currently xml.mli is compiled, then dtd.mli, then dtd.ml and finally
>> xml.ml (there are other modules involved but they don't seem to be
>> involved in the loop). I'm not completely surprised this works but I
>> didn't know it was possible (my current version here is 4.01.0 but it
>> has probably been that way for a long time). Maybe someone else can
>> comment on that.
>>
>> I'm actually wondering how this works wrt module initialization order.
>>
>> I think the sure way would be to move at least some declarations to a
>> separate module that has no dependency on others and which both Xml and
>> Dtd could depend on.
>>
>> --
>> Adrien Nader
>>
>> --
>> 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

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

end of thread, other threads:[~2016-06-11 15:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10  8:39 [Caml-list] OASIS circular dependency in xml-light Olaf Hering
2016-06-10 10:32 ` Daniel Bünzli
2016-06-10 10:37   ` Olaf Hering
2016-06-11  6:14     ` Adrien Nader
2016-06-11  8:20       ` Adrien Nader
2016-06-11 12:03         ` Gabriel Scherer
2016-06-11 15:19           ` 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).