Skip to content

Commit

Permalink
More about package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonidas-from-XIV committed Oct 2, 2024
1 parent 7569333 commit 7bcb126
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/explanation/package-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ The first step is to determine which packages need to be installed.
Traditionally this has been defined in the `depends` field of a projects opam
file(s).

Since version 1.10 Dune has also supported {doc}`opam file generation
Since version 1.10 Dune has supported {doc}`opam file generation
</howto/opam-file-generation>` by specifying the package dependencies in the
`dune-project`. Outside of this feature, Dune had not used the `depends` stanza
before.
`dune-project`.

The package management feature changes this, as Dune now determines the list of
packages to install from the `depends` stanza in the `dune-project` file. This
allows projects to completely omit generation of `.opam` files, as long as they
use Dune for package management. Thus all dependencies are only declared in one
file.
The package management feature uses the same metadata, as Dune will determine
the list of packages to install from the `depends` stanza in the `dune-project`
file. This allows projects to completely omit generation of `.opam` files, as
long as they use Dune for package management. Thus all dependencies on OCaml
packages are only declared in one single file.

For compatibility with a larger amount of existing projects, Dune will also
collect dependencies from `.opam` files in the project. So while recommended,
there is no obligation to switch to declaring dependencies in the
`dune-project`. Likewise the generation of `.opam` files will still work.
`dune-project`. Likewise the generation of `.opam` files continues to be
supported.

## Locking

Expand Down

0 comments on commit 7bcb126

Please sign in to comment.