-
Notifications
You must be signed in to change notification settings - Fork 95
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 the threaded/unthreaded split in ctypes-foreign. #651
Conversation
This may in fact cause downstream breakages, as the Travis build failure suggests:
|
…y in ctypes-foreign See yallop/ocaml-ctypes#651
In a program that uses a
My understanding is that I should switch to I have no problem doing that, but I'm curious, since you said that there should be no downstream breakages. |
Yes, that should fix the issue.
When I wrote that I expected clients to refer to (We could perhaps add |
Having such an alias could simplify the migration, although ctypes.foreign is clearly a better name. |
Just as feedback, it looks like that even when
|
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
Change discussed here: yallop/ocaml-ctypes#651
Change discussed here: yallop/ocaml-ctypes#651
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
See yallop/ocaml-ctypes#651 (comment) Signed-off-by: Pau Ruiz Safont <[email protected]>
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Links added in earlier commit, but one instance missed. Cf. yallop/ocaml-ctypes#651
Since #80, linking programs that use
ctypes.foreign
against thethreads
library has been optional: the package system would pick an appropriate implementation of theForeign
module according to whether the downstream program used threads.This split into separate "unthreaded" and "threaded" implementations has mostly worked smoothly, but it's occasionally caused problems (e.g. #552) and it makes the code more difficult to maintain; all changes to
ctypes-foreign
(e.g. #595) have to take care to update both the unthreaded and threaded implementations consistently. Furthermore, since the split makes use of some more obscure parts of the build and package systems, the current design makes moving to a new system (#588) more challenging.It seems likely that most environments that support
ctypes-foreign
(i.e. that supportlibffi
) also support threads, in which case there's comparatively little value in continuing to support the unthreaded variant.This PR therefore removes the split, of making
ctypes-foreign-unthreaded
the only implementation of thectypes-foreign
package. There should be no downstream breakages, but packages which requirectypes-foreign
will now implicitly pull inthreads
as a transitive dependency. (Packages which use onlyctypes
andctypes-stubs
should be completely unaffected.)