Skip to content

Distributing lwt as several opam packages #41

Closed

Description

@trefis

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?

Activity

  1. dsheets commented on Feb 14, 2014

    @dsheets
    Contributor

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

  2. avsm commented on Feb 14, 2014

    @avsm
    Collaborator

    On 14 Feb 2014, at 15:19, David Sheets [email protected] 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

  3. dsheets commented on Feb 14, 2014

    @dsheets
    Contributor

    I think ocamlfind will complain about names with '_' in them? Perhaps it's time to start looking into tighter ocamlfind+opam integration/assimilation.

  4. modified the milestone: on Jul 2, 2016
  5. aantron commented on Nov 29, 2016

    @aantron
    Collaborator

    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

  6. removed this from the milestone on May 12, 2017
  7. aantron commented on Oct 13, 2017

    @aantron
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions