mirleft / ocaml-nocrypto

OCaml cryptographic library
ISC License
111 stars 53 forks source link

Name conflict with `Base64` #43

Closed samoht closed 9 years ago

samoht commented 9 years ago

I have no clue on how to fix it, but I got I have a weird error when trying to link with the new cohttp (which uses an external Base64 package):

A small repro case:

$ cat foot.ml
open Base64
open Nocrypto

$ ocamlopt -I /Users/thomas/.opam/system/lib/base64 -I /Users/thomas/.opam/system/lib/nocrypto foo.ml
File "foo.ml", line 1:
Error: The files /Users/thomas/.opam/system/lib/base64/base64.cmi
       and /Users/thomas/.opam/system/lib/nocrypto/nocrypto.cmi
       make inconsistent assumptions over interface Base64
samoht commented 9 years ago

Interestingly enough, the problem seems (almost) gone when I switch to 4.02:

$ ocamlopt -I /Users/thomas/.opam/4.02.1/lib/base64 -I /Users/thomas/.opam/system/4.02.0/nocrypto -c foo.ml
File "foo.ml", line 2, characters 5-13:
Error: Unbound module Nocrypto
pqwy commented 9 years ago

I made a horrible mess by using packing, .mli for the packed object and module type of at the same time. That will need to go away.

pqwy commented 9 years ago

It went away. Hopefully the name conflicts won't happen any more.

samoht commented 9 years ago

Cool thanks!