Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot link with Base on OCaml 4.06 #4

Closed
Julow opened this issue Mar 10, 2022 · 5 comments · Fixed by #5
Closed

Cannot link with Base on OCaml 4.06 #4

Julow opened this issue Mar 10, 2022 · 5 comments · Fixed by #5

Comments

@Julow
Copy link

Julow commented Mar 10, 2022

On OCaml < 4.06 it seems not possible to link both ocamlp-streams and the stdlib's Stream modules at the same time. The stdlib's module can often be a transitive dependency, for example of base.

A small ocaml program that links to both this library and base:

let () = Stream.(empty (Stream.of_list (Base.List.join [])))
(executable
 (name test)
 (libraries base camlp-streams))

The error looks like this:

File "test.ml", line 1:
Error: The files /home/jules/.opam/4.06.1/lib/camlp-streams/stream.cmi
       and /home/jules/.opam/4.06.1/lib/base/base.cmi
       make inconsistent assumptions over interface Stream

This happens in odoc-parser: ocaml-doc/odoc-parser#6

@kit-ty-kate
Copy link
Member

Given this package is meant to be a compatibility package, I think it would be worth doing the same thing as with stdlib-shims and making the package empty on OCaml < 5.0

@dra27
Copy link
Member

dra27 commented Mar 10, 2022

Something slightly different is wanted for 4.14.0 - if you’ve specified camlp-streams, it seems reasonable that you shouldn’t get the deprecation warning from the stdlib

@xavierleroy
Copy link
Contributor

If I understand correctly, there's no problem with OCaml 4 versions that pack Stream as Stdlib.Stream, i.e. 4.07 and later. So, the package must be empty only on OCaml < 4.07. And I agree with @dra27 that it must not be empty for 4.14.

@kit-ty-kate
Copy link
Member

That sounds fair enough indeed

@c-cube
Copy link

c-cube commented Jun 25, 2022

Just want to mention I met the same issue. I hope it gets released soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants