Skip to content

Put Lin and STM libraries in a standalone package #5

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

Merged
merged 3 commits into from
Mar 10, 2022

Conversation

OlivierNicole
Copy link
Contributor

This creates packages containing the Lin and STM libraries, called lin and stm respectively. It allows users to install and use these libraries in a simple way, independently of the multicoretests test suite—which is restricted to the multicoretests package. It also allows to install lin and stm without some dependencies of multicoretests such as ounit2, lockfree or ppx_deriving.

The package multicoretests now depends on lin and stm.

@OlivierNicole
Copy link
Contributor Author

The readme should probably be adapted to mention the three packages, too.

@jmid
Copy link
Collaborator

jmid commented Mar 9, 2022

Thanks a bunch for this!
I think there's a couple of unused pin-depends, which I commented on inline.

You are very welcome to add a short mention of the three opam packages to the README
now that I've merged the other README PR.

Having to make package-annotations on each rule saddens me.
Is there by chance a way to mark an entire (sub-)directory part of the multicoretests package?

@OlivierNicole
Copy link
Contributor Author

Having to make package-annotations on each rule saddens me.
Is there by chance a way to mark an entire (sub-)directory part of the multicoretests package?

I'm only starting with dune and reading the docs, but maybe using the scopes feature? IIUC this implies to put all the tests and the multicoretests.opam file in a subtree.

@OlivierNicole
Copy link
Contributor Author

To avoid the many (package multicoretests) annotations, I have tried to use dune scopes in two ways:

  • Put all the tests in a multicoretests/ subdirectory, along with multicoretests.opam.
  • Put lin.opam and stm.opam.

Both failed with errors like:

Entering directory '/home/olivier/opam-pins/multicoretests'
File "lib/dune", line 8, characters 14-17:
8 |  (public_name stm)
                  ^^^
Error: The current scope doesn't define package "stm".
The only packages for which you can declare elements to be installed in this
directory are:
- multicoretests (because of multicoretests.opam)

That is, dune seems to ignore the <package>.opam files when they are not at the project root. I am here on unfamiliar grounds, so to go further I would need to ask advice to more knowledgeable users.

@jmid
Copy link
Collaborator

jmid commented Mar 10, 2022

OK, thanks for trying!
I'll merge and then we can adjust later (if we figure it out).

@jmid jmid merged commit 0b83cc0 into ocaml-multicore:main Mar 10, 2022
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

Successfully merging this pull request may close these issues.

2 participants