Dear Kate,
Le 29/07/2026 à 18:25, Kate a écrit :
Pure OCaml packages shouldn't be split between non-dev and dev
subpackages. What makes sense for C-like libraries do not make any sense
for pure OCaml libraries.
If anything, pure OCaml libraries should have only a -dev package.
As-is, libcamlp-streams-ocaml only provides dynlink access, which is a
rarely-used feature of OCaml overall. The vast majority of pure OCaml
packages use the default static linking, only rare software such as
ocsigenserver actually use dynlinking in that way. Trying to use this
package for anything else will result in a failure because of the
missing .cmi at the very least.
.cmi are not needed for dynlinking.
And ocsigenserver can load modules that depend on "pure OCaml libraries"
such as libcamlp-streams-ocaml, so the current packaging makes sense (IMHO).
Of course, for non-pure packages such as ones containing C stubs what
i'm saying here doesn't apply, although .so for C stubs are only really
used by pure OCaml bytecode programs, so the use-case is limited.
If you really want to keep the dev/non-dev distinctions i'd implore you
to consider moving *.cmi, *.cmxa, *.a and optionally *.cmx to the non-
dev package, keeping only what's important for development (*.cmti *.mli
etc) in the dev package.
This would defeat the purpose of non-dev packages, which is to reduce
the installation footprint when one doesn't care about a working
developing environment.
This way the non-dev packages become actually useful and do not lead to
a broken state for tools that read META files (virtually every OCaml
build-systems) as well as the OCaml toplevel.
As said in https://github.com/ocaml/opam-repository/issues/27712, people
are not supposed to install non-dev packages directly, especially if
they want a working development environment, in which case they should
install the -dev package. The non-dev packages should be pulled
automatically when needed.
Cheers,
--
Stéphane