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

Distributing lwt as several opam packages #41

Closed
trefis opened this issue Feb 14, 2014 · 7 comments
Closed

Distributing lwt as several opam packages #41

trefis opened this issue Feb 14, 2014 · 7 comments

Comments

@trefis
Copy link

trefis commented Feb 14, 2014

Hi!

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 :

  1. 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.
  2. 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, ...

What do you think?

@ghost
Copy link

ghost commented Feb 14, 2014

I do agree with this idea, I've been thinking about it for a while.

The main problem I see is that in all the findlib package name, . is going to be replaced by -, breaking a lot of packages... One solution is to rename the core lwt package as lwt-core and keep lwt as transitional meta-package.

@dsheets
Copy link
Contributor

dsheets commented Feb 14, 2014

Why is it necessary to rename findlib packages? Couldn't opam's lwt-ssl provide ocamlfind's lwt.ssl?

@ghost
Copy link

ghost commented Feb 14, 2014

IIRC I tried something like that once and ocamlfind complained about the name. Might be worth checking though.

@avsm
Copy link
Collaborator

avsm commented Feb 14, 2014

On 14 Feb 2014, at 15:19, David Sheets notifications@github.com wrote:

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.

-anil

@dsheets
Copy link
Contributor

dsheets commented 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 aantron modified the milestone: Packaging Jul 2, 2016
@aantron
Copy link
Collaborator

aantron commented Nov 29, 2016

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:

  1. 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.
  2. 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.

Likewise for Lwt_glib.

cc @gerdstolpmann

@aantron aantron removed this from the Packaging milestone May 12, 2017
@aantron
Copy link
Collaborator

aantron commented Oct 13, 2017

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."

@aantron aantron closed this as completed Oct 13, 2017
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

No branches or pull requests

4 participants