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

Build failure on trunk #17

Open
Sudha247 opened this issue Feb 16, 2022 · 2 comments
Open

Build failure on trunk #17

Sudha247 opened this issue Feb 16, 2022 · 2 comments

Comments

@Sudha247
Copy link

Build fails on OCaml trunk due to removal of the Pervasives module. Any pointers on how to fix it?

ocamlfind ocamlopt -c -package seq -package uchar -bin-annot -no-alias-deps -nolabels -I . -alert -deprecated stdcompat__native.mli -o stdcompat__native.cmi
ocamlfind ocamlopt -c -package seq -package uchar -bin-annot -no-alias-deps -nolabels -I . -alert -deprecated stdcompat__init.mli -o stdcompat__init.cmi
File "stdcompat__init.mli", line 45, characters 9-26:
45 | ('a, 'b) Pervasives.result =
              ^^^^^^^^^^^^^^^^^
Error: Unbound module Pervasives
Makefile:1736: recipe for target 'stdcompat__init.cmi' failed
make[1]: *** [stdcompat__init.cmi] Error 2
make[1]: Leaving directory '/home/sudha/ocaml/sudha/stdcompat'
Makefile:888: recipe for target 'all' failed
make: *** [all] Error 2

@Leonidas-from-XIV
Copy link
Contributor

It probably needs a switch to use either Pervasives (older compiler versions) and Stdlib (5.0+ and possibly already earlier versions, to avoid deprecation warnings).

Maybe a module like stdcompat__stdlib should be created that does exactly this?

@thierry-martinez
Copy link
Member

Thank you for your report! The new release stdcompat.19 is out (PR for opam: ocaml/opam-repository#21537) and is compatible with OCaml 5.0. For the moment, Stdcompat still exposes a Stdcompat.Pervasives module, which relies on Stdlib with OCaml >=4.07. More work should be done to restore automatic API generation with OCaml 5.0 (I updated the API of this release by hand; in particular, I prefer to wait that the standard library of OCaml 5.0 becomes stable in OCaml beta releases before adding more features from OCaml 5.0), and this will probably lead to a module stdcompat__stdlib as @Leonidas-from-XIV suggests in future versions.

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

No branches or pull requests

3 participants