In dune-project: how to declare packages with same version?

Hello,

with a dune-project file like this one:

(lang dune 2.9)
(name toto)
(version 0.7.0)

(generate_opam_files true)

(source ...)
;... other opam related fields ...
(documentation ...)

(package (name toto)
 (synopsis "bla bla")
)

(package (name toto_server)
 (synopsis "bla bla bla")
 (depends toto)
)

How can I put a constraint in the (depends ) of package toto_server to make it depend on the same version of package toto ?

This should do the job I believe:

(depends
 (toto (= :version)))

Thanks. Indeed this way it puts unquoted version in the constraint in the opam file, rather than "version". This should be added to the documentation here Stanza reference — dune documentation .