Does Dune have any concept like "dev dependencies"?

Other systems I’ve used in the past have a concept of something like “dev dependencies” which are things like dependencies only needed for running the test suite.

i.e. distinct from the main dependencies, which would be only the minimum deps needed by end users of the library when installing it from opam.

Does Dune have something like that?

I found the depopts stanza but it’s not really explained and from this thread seems used for different purpose.

1 Like

Oh, I think I found it…

I’d temporarily forgotten that what I am looking for is really an opam feature, and my dune-project is auto-generating the opam file

So we have opam - new opam features: more expressive dependencies

and in dune: OPAM integration — dune documentation

i.e. I can add :with-test to any of my deps in dune-project

3 Likes