From: Yawar Amin <yawar.amin@gmail.com>
To: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Cc: "Nicolás Ojeda Bär" <nicolas.ojeda.bar@lexifi.com>,
"Caml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Inconsistent assumptions over interface
Date: Sat, 2 Jun 2018 16:02:31 -0400 [thread overview]
Message-ID: <CAJbYVJL=B6NL_nrDORSxZziqLOw07f-wnhhXatn6F_VqbnFohQ@mail.gmail.com> (raw)
In-Reply-To: <3a6adae6-aef5-e0c6-de55-047b315d1760@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]
Yann, if you use the Dune build tool it automatically prefixes your
package's modules with the package name, e.g. if you have `mypackage/src/
format.ml` in your source, Dune will make sure it gets compiled to
`mypackage__format.cmi`.
Regards,
Yawar
On Mon, Apr 23, 2018 at 10:14 AM, Yann Hamdaoui <yann.hamdaoui@gmail.com>
wrote:
> I see. I'm tempted to wait for 4.07 but keeping a module named Format
> would still break compatibility for lower versions, so I guess I have to
> come up with a different name.
> Thank you for your help, Nicolás.
>
> Y.H
>
> On 22/04/2018 17:29, Nicolás Ojeda Bär wrote:
> > Hello Yann,
> >
> > Indeed, you cannot link two different modules of the same name in the
> > same program, where "same name" essentially means that their .cmi
> > files are named similarly.
> > The good news is that the upcoming 4.07 release fixes this
> > long-standing issue by using long compilation unit names for stdlib
> > modules which are unlikely to conflict with anything else.
> > (e.g. the .cmi of the stdlib Format module is named stdlib__format.cmi
> in 4.07).
> >
> > Best wishes,
> > Nicolás
> >
> > On Sun, Apr 22, 2018 at 4:53 PM, Yann Hamdaoui <yann.hamdaoui@gmail.com>
> wrote:
> >> Dear list,
> >>
> >> I ran into a problem today while compiling a library of mine. I got the
> >> following error :
> >>
> >> "Error: The files [...]/.opam/4.06.0/lib/re/re.cmi and src/format.cmi
> >> make inconsistent assumptions over interface Format".
> >>
> >> After a quick search it should be solved by cleaning everything and make
> >> a fresh build. In my case it didn't, and I suspect this is because I
> >> declared a module named Format in my lib which clashes with the
> >> Pervasive.Format that seems to be used by the re library (which is a
> >> dependence). Does it mean that I can't use any XXX as a module name if
> >> it already exists in Pervasives and is used by some library I depend on
> ?
> >>
> >>
> >> Y.H
> >>
> >>
> >> --
> >> 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
>
>
>
> --
> 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: 3923 bytes --]
next prev parent reply other threads:[~2018-06-02 20:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-22 14:53 Yann Hamdaoui
2018-04-22 15:29 ` Nicolás Ojeda Bär
2018-04-23 14:14 ` Yann Hamdaoui
2018-06-02 20:02 ` Yawar Amin [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-27 14:39 [Caml-list] inconsistent " Ashish Agarwal
2015-04-27 14:53 ` Drup
2015-04-27 15:02 ` Ashish Agarwal
2015-04-27 15:02 ` Daniel Bünzli
2015-04-27 15:07 ` Ashish Agarwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJbYVJL=B6NL_nrDORSxZziqLOw07f-wnhhXatn6F_VqbnFohQ@mail.gmail.com' \
--to=yawar.amin@gmail.com \
--cc=caml-list@inria.fr \
--cc=nicolas.ojeda.bar@lexifi.com \
--cc=yann.hamdaoui@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox