Skip to content

The paths of Lwt's installed cmi files #364

Closed

Description

@aantron

@diml in ocaml/opam-repository#9228 (comment):

qcow-tool fails to build in one the datakit build. I check, it's because mirage-block-unix uses Lwt_unix but lwt.unix is missing from the jbuild. It's not detected at build time since the cmi files for lwt.unix are installed in the same directory as the cmi files for lwt.

/cc @aantron, it'd be better to install the cmi for the various sub-libraries in sub-directories, to avoid problems like these. jbuilder installs the files for a library with findlib name a.b.c in /a/b/c.

This seems like a problem with jbuilder being incompatible with non-jbuilder installs; on the other hand, maybe we can just move these .cmi files in the next release, and avoid friction.

cc @djs55 @rgrinberg

EDIT: instructions for testing are below.

Activity

  1. added this to the 3.1.0 milestone on May 19, 2017
  2. Drup commented on May 19, 2017

    @Drup
    Member

    The recent oasis feature called "FindlibDirectory" should allow to do that quite easily.

  3. aantron commented on May 20, 2017

    @aantron
    CollaboratorAuthor

    So I guess this is a matter of

    1. Adding FindlibDirectory to each Findlib library package in _oasis that has a FindlibParent (example).
    2. Finding out what version of OASIS implements FindlibParent, either by reading its changelog, or somehow through blame in that repo.
    3. Making sure Lwt's opam file requires at least that version of OASIS.
  4. changed the title [-]jbuilder and the paths of Lwt's installed cmi files[/-] [+]The paths of Lwt's installed cmi files[/+] on May 22, 2017
  5. aantron commented on May 22, 2017

    @aantron
    CollaboratorAuthor

    Thanks for clarifying, @diml.

    So, I guess to work on this, one would:

    1. Pin Lwt master with opam source --dev-repo --pin lwt.
    2. Follow the instructions from @diml's post above to reproduce the issue.
    3. Make a git branch and make the change to _oasis described above.
    4. opam reinstall lwt (or opam upgrade lwt?) to install a version of Lwt from your branch, with the _oasis change included.
    5. Follow the same steps as in (2) to reproduce, but make sure they trigger an error at step 2 this time.
    6. PR the branch to the Lwt repo.
  6. aantron commented on Jun 9, 2017

    @aantron
    CollaboratorAuthor

    This was resolved by #374.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions