Skip to content

Commit 1d17627

Browse files
authored
Document extra-packages a bit better and clean up related entries (closes #5448) (#8535)
1 parent bb187b8 commit 1d17627

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

doc/cabal-project.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ project are:
127127
.. cfg-field:: extra-packages: package list with version bounds (comma separated)
128128
:synopsis: Adds external packages as local
129129

130-
:strike:`Specifies a list of external packages from Hackage which
131-
should be considered local packages.` (Not implemented)
130+
Specifies a list of external packages from Hackage, which
131+
should be considered local packages. The motivation for
132+
:cfg-field:`extra-packages` is making libraries that are not
133+
dependencies of any package in the project available for use in ghci.
132134

133135
There is no command line variant of this field.
134136

doc/nix-local-build.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,10 @@ must be built per-project, versus external packages, which can be cached
146146
across projects. To be more precise:
147147

148148
1. A **local package** is one that is listed explicitly in the
149-
``packages``, ``optional-packages`` or ``extra-packages`` field of a
150-
project. Usually, these refer to packages whose source code lives
151-
directly in a folder in your project. But you can list an
152-
arbitrary Hackage package in :cfg-field:`packages`
153-
to force it to be treated as local.
149+
``packages``, ``optional-packages`` or ``extra-packages`` fields of a
150+
project. Packages in the former two fields will usually have their
151+
source code stored in a folder in your project, while ``extra-packages`` lists
152+
packages residing on Hackage that are treated as being local anyway.
154153

155154
Local packages, as well as the external packages (below) which depend on
156155
them, are built **inplace**, meaning that they are always built
@@ -159,8 +158,8 @@ packages are not cached and not given unique hashes, which makes them
159158
suitable for packages which you want to edit and recompile.
160159

161160
2. An **external package** is any package which is not listed in the
162-
``packages`` field. The source code for external packages is usually
163-
retrieved from Hackage.
161+
``packages``, ``optional-packages`` and ``extra-packages`` fields.
162+
The source code for external packages is usually retrieved from Hackage.
164163

165164
When an external package does not depend on an inplace package, it can
166165
be built and installed to a **global** store, which can be shared across

0 commit comments

Comments
 (0)