-
Notifications
You must be signed in to change notification settings - Fork 53
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
Incompatible with sexplib/ppx_sexp_conv v0.11.0 #143
Comments
I just noticed the same error and reported a bug upstream at |
FWIW: diml has an explanation for this in ocaml/opam-repository#11628 (comment) I've "fixed" this issue in ocaml/opam-repository#11636 by adding an upper bound of sexplib ( |
Of course my curiosity was piqued as it revealed to be a build system issue. I have two bugfix branches, master-ocamlbuild-pack and v0.5.4-ocamlbuild-pack. @hannesm: if you know how to get one of these in an OPAM-available release of nocrypto, that could be nice (the v0.5.4 branch would be suitable for a |
Would a |
@hcarty: yes, that seems acceptable to me given nocrypto's release management style. Would you be willing to submit a PR to opam-repository? |
(no, I'm neither author nor maintainer of nocrypto) tbh, I'm really against depending on the ppx machinery at runtime, since this will increase the binary size of all my unikernels tremendously. in the past I've been removing runtime dependencies of various ppx in the MirageOS ecosystem. I'm not sure how to move forward, to me it looks like getting rid of ppx_sexp_conv entirely is the only viable solution. |
If you already depend on Base, there is no additional size cost. If you don't, then yes, you may want to use a serializer/deserializer that comes with smaller runtime dependencies (it may be possible to have something that is drop-in compatible with |
Dear @gasche, there is no dependency on |
Well I guess that you should complain to the sexplib maintainers again, as I suppose that they have some control over how ppx_sexplib sets its runtime dependencies -- it should be possible to only depend on |
cc @trefis :-) |
I want to mention that my project uses the serializers, so please don’t remove them without replacement. Isn’t it possible to put them in a separate package, so they are only added if used? Anyway I don’t understand, why the linker can’t remove unused code? |
The linker can remove unused compilation units (toplevel modules), but doesn't go at a finer-grained level, and it is easy to have (unused) definitions in your (used) module pull out extra undesirable dependency. A global tree-shaker / dead code remover link-time pass could be implemented in theory (and is an interesting subject, particularly for unikernels), but it is difficult (in theory and in practice) due the presence of side-effect-performing expressions at the toplevel of modules (can those initializing an otherwise-unused datastructure be also removed, or is their effect observable by other parts of the codebase?). |
Interesting. I was totally depending on the linker when I wrote C++ code for an embedded linux platform, and with statically linked libraries that worked very well. I though a decision, if a certain code-path is referenced somewhere in the binary, and if not to cut it out, would be similarly easy in ocaml. (Initialization code which is called can't of course just cut out without more sophisticated analysis.) |
Has anyone pinged @pqwy about this? I don't know how to contact him now that he also stopped responding to emails, but this is an annoying issue to have to work around. |
As far as I can tell, we can't use |
This has been fixed using opam patches in ocaml/opam-repository#12062 and released as nocrypto 0.5.4-1. Will leave this issue open for a fix in this repository. |
should be fixed in latest master: a58c653 |
After upgrading sexplib and ppx_sexp_conv to v0.11.0 the following error appears when compiling nocrypto:
The text was updated successfully, but these errors were encountered: