Skip to content

Commit

Permalink
Warn about project and the set of pkgs separately
Browse files Browse the repository at this point in the history
- Multiple dependency packages not multiple dependencies
  • Loading branch information
philderbeast committed May 5, 2024
1 parent 88fdee1 commit 7c72d87
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions doc/how-to-source-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,10 @@ tools to interpret and make effective use of this information.
The ``source-repository-package`` field, the one with a "-package" suffix,
doesn't belong to a package! It's for a project dependency. This name is a
bit misleading because it can describe multiple dependencies and not just
one. That it is for "package" also makes sense. Ultimately it is the union of
all dependencies of local packages within the project that actually declare
the set of project dependencies, not the project. The project can tighten
version constraint ranges with ``constraints`` or loosen them with
``allow-newer`` or ``allow-older`` but it cannot add or remove dependencies.

bit misleading being singular because it can describe multiple dependency
packages at the same location, each offset by a directory containing a
package description, a ``.cabal`` file.

This project stanza is like a redirect or override for dependencies of all
the packages in the project saying "use this source code repository" for this
package dependency, not Hackage.
Expand All @@ -116,6 +113,16 @@ tools to interpret and make effective use of this information.
location: https://github.com/haskell/vector.git
subdir: vector
.. Warning::

Cabal project, ``cabal.project``, files don't declare dependencies!

The union of the dependencies of all ``packages`` within the project declares
the set of project dependencies. While the project can tighten version
constraint ranges with ``constraints`` or loosen them with ``allow-newer`` or
``allow-older``, it cannot add package names to or remove package names from
the set of dependencies.

.. _pkg-consumers:

*Source code* when taking a package dependency
Expand Down

0 comments on commit 7c72d87

Please sign in to comment.