You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nowadays I (as well as several other people I would guess) am using opam for installing basically every ocaml library I use and among them is lwt.
However, when installing lwt opam will by default only install core (and unix most probably), but not the sublibraries which depend on some optional dependencies (unless these are present, ofc).
This creates (imho) two problems :
Lwt (and the other packages depending on it) gets recompiled "for no reason". For example on a fresh opam switch I'll always do "opam install utop", which will pull lwt and lambda-term (among others). At somepoint in the future I'll install a package which depends on ocaml-ssl and that will trigger the recompilation of lwt (with ssl enabled), lambda-term and utop.
That kind of problem was already raised about Coq ( Rebuilding Coq is not an option. On programs as opposed to libraries. ocaml/opam-repository#805 ), and although it's not as costly here it still is a pain.
Some package will indicate lwt as their dependency while they actually want lwt-text. That can obvious be fixed by the packager and probably doesn't happen much on the official opam repository as people are keeping a close watch, but still it's annoying / gives "more work" for the packager.
What I would like to see is lwt distributed as several packages : lwt, lwt-ssl, lwt-text, lwt-react, ...
Why is it necessary to rename findlib packages? Couldn't opam's lwt-ssl provide ocamlfind's lwt.ssl?
Because I believe that ocamlfind requires all subpackages to be in the same META file, so there would need to be some META-MERGING-MAGIC for this to work across separate compilation.
I think I will begin doing this for Lwt_ssl and Lwt_glib, as those are really separate libraries that just happen to be in the same repo.
The process will be something like:
In the next Lwt release, release lwt, lwt_ssl, lwt_glib. The lwt package won't change. lwt_ssl will install ssl and lwt, and provide Findlib package lwt_ssl, which will just be a proxy for lwt.ssl. Users will be warned that lwt.ssl is deprecated, and to use both Findlib and OPAM packages lwt_ssl. Perhaps I will PR Findlib and try to get a deprecation warning feature in, so that it can be displayed automatically.
After being released in this state for a while, in a subsequent major release, package lwt_ssl will contain the real Lwt_ssl, while lwt.ssl from lwt will contain a dummy Lwt_ssl that contains an [@@@ocaml.deprecated "..."] annotation with the info on how to get the real Lwt_ssl.
I'm closing this. lwt_ssl, lwt_react, lwt_glib were factored out in 3.0.0. Factoring out lwt_ppx and lwt_camlp4 is being tracked in #338 and #370, to be completed in 4.0.0. We are likely to also factor out at least lwt.unix at some point, and perhaps all other subpackages as part of adapting to Jbuilder "best practices."
Activity
dsheets commentedon Feb 14, 2014
Why is it necessary to rename findlib packages? Couldn't opam's lwt-ssl provide ocamlfind's lwt.ssl?
avsm commentedon Feb 14, 2014
On 14 Feb 2014, at 15:19, David Sheets [email protected] wrote:
-anil
dsheets commentedon Feb 14, 2014
I think ocamlfind will complain about names with '_' in them? Perhaps it's time to start looking into tighter ocamlfind+opam integration/assimilation.
aantron commentedon Nov 29, 2016
I think I will begin doing this for
Lwt_sslandLwt_glib, as those are really separate libraries that just happen to be in the same repo.The process will be something like:
lwt,lwt_ssl,lwt_glib. Thelwtpackage won't change.lwt_sslwill installsslandlwt, and provide Findlib packagelwt_ssl, which will just be a proxy forlwt.ssl. Users will be warned thatlwt.sslis deprecated, and to use both Findlib and OPAM packageslwt_ssl. Perhaps I will PR Findlib and try to get a deprecation warning feature in, so that it can be displayed automatically.lwt_sslwill contain the realLwt_ssl, whilelwt.sslfromlwtwill contain a dummyLwt_sslthat contains an[@@@ocaml.deprecated "..."]annotation with the info on how to get the realLwt_ssl.Likewise for
Lwt_glib.cc @gerdstolpmann
aantron commentedon Oct 13, 2017
I'm closing this.
lwt_ssl,lwt_react,lwt_glibwere factored out in 3.0.0. Factoring outlwt_ppxandlwt_camlp4is being tracked in #338 and #370, to be completed in 4.0.0. We are likely to also factor out at leastlwt.unixat some point, and perhaps all other subpackages as part of adapting to Jbuilder "best practices."