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

Remove bigarray which is a part of the standard library #660

Merged
merged 5 commits into from
Nov 12, 2020

Conversation

dinosaure
Copy link
Contributor

I'm not sure about which version of OCaml ocaml-ctypes should support but this patch delete the non-essential unix dependency for the core library (and ctypes.stubs). This patch unlock the ability to do a reverse binding of an OCaml library which does not depends on unix.

@yallop
Copy link
Owner

yallop commented Nov 6, 2020

This is a useful change, and I'm happy to merge it if it can be adapted to keep support for OCaml versions before 4.07.0 (when bigarray was added to the stdlib).

We'd probably need conditions both in the Makefile and the opam file (and eventually for dune: see #588). I'm not sure how best to deal with the findlib META file, though.

@dinosaure
Copy link
Contributor Author

One possibility is to use bigarray-compat which does the dispatch for you but it requires to explicitly use Bigarray_compat. If you are not agree with such solution, I can find my way to do the dispatch on the Makefile level 👍.

@yallop
Copy link
Owner

yallop commented Nov 6, 2020

Using bigarray_compat looks like a reasonable solution.

@dinosaure
Copy link
Contributor Author

I updated the project according the new usage of bigarray-compat instead bigarray. However, I did not change anything about generated code - I mean, generated code still refers to Bigarray module. I ran make depend to re-generate .depend and updated OPAM and META file 👍. I think it's ready for a review.

@yallop
Copy link
Owner

yallop commented Nov 9, 2020

The 4.02.3 build is failing, because bigarray-compat isn't installable:

The following dependencies couldn't be met:
  - ctypes → bigarray-compat → ocaml >= 4.03.0
      base of this switch (use `--unlock-base' to force)

Can the constraint in the bigarray-compat package be relaxed to allow OCaml 4.02.3?

@dinosaure
Copy link
Contributor Author

@yallop
Copy link
Owner

yallop commented Nov 10, 2020

I've restarted the failing jobs ([1], [2]) now that ocaml/opam-repository#17600 is merged.

@dinosaure
Copy link
Contributor Author

Seems all green 🎉 ! It's possible to cut a minor release with it ?

.depend Outdated Show resolved Hide resolved
src/ctypes/ctypes_bigarray.mli Outdated Show resolved Hide resolved
@yallop yallop merged commit da48a7f into yallop:master Nov 12, 2020
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 this pull request may close these issues.

2 participants