Skip to content

Commit 48d82be

Browse files
committed
Fix #6035 Further improve extra-dep documentation
1 parent d2c700f commit 48d82be

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

doc/pantry.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ generated in a [lock file](lock_files.md).
9898

9999
### Hackage packages
100100

101-
A package can be identified by its name, version and its Cabal file revision
102-
number, with `0` being the original Cabal file. For example:
101+
A package can be identified by its name, version and Cabal file revision
102+
number, with revision `0` being the original Cabal file. For example:
103103

104104
~~~yaml
105105
extra-deps:
@@ -115,21 +115,23 @@ extra-deps:
115115
- acme-missiles-0.3
116116
~~~
117117

118-
This may result in one build differing from another, if a further Cabal file
119-
revision is added to the package index between builds.
118+
This syntax is often used in practice, but may result in one build differing
119+
from another, if a new or further Cabal file revision is added to the package
120+
index between the builds.
120121

121-
Alternatively, you can specify the package name and version with the SHA256 hash
122-
of the contents of its Cabal file. Doing so is slighly more resilient than using
123-
the Cabal file revision number, as it does not rely on the correct ordering in
124-
the package index. For example:
122+
As an alternative to specifying the Cabal file revision number, you can specify
123+
the package name and version with the SHA256 hash of the contents of its Cabal
124+
file. Doing so is slightly more resilient than using the Cabal file revision
125+
number, as it does not rely on the correct ordering in the package index.
126+
For example:
125127

126128
~~~yaml
127129
extra-deps:
128130
- acme-missiles-0.3@sha256:2ba66a092a32593880a87fb00f3213762d7bca65a687d45965778deb8694c5d1
129131
~~~
130132

131133
Optionally, you can specify also the size of the Cabal file in bytes. For
132-
example:
134+
example (where the file size is `631` bytes):
133135

134136
~~~yaml
135137
extra-deps:
@@ -147,7 +149,9 @@ Optionally, you can specify also the Pantry tree information. For example:
147149

148150
The SHA256 hash of the contents of the Cabal file and its size in bytes is
149151
provided in Stack's lock file. For further information, see the
150-
[lock files](lock_files.md) documentation.
152+
[lock files](lock_files.md) documentation. The SHA256 hash and file size
153+
alternative is also what Stack uses when it makes suggestions about missing
154+
packages.
151155

152156
### Git and Mercurial repositories
153157

0 commit comments

Comments
 (0)