@@ -98,8 +98,8 @@ generated in a [lock file](lock_files.md).
98
98
99
99
# ## Hackage packages
100
100
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 :
103
103
104
104
~~~yaml
105
105
extra-deps :
@@ -115,21 +115,23 @@ extra-deps:
115
115
- acme-missiles-0.3
116
116
~~~
117
117
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.
120
121
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 :
125
127
126
128
~~~yaml
127
129
extra-deps :
128
130
- acme-missiles-0.3@sha256:2ba66a092a32593880a87fb00f3213762d7bca65a687d45965778deb8694c5d1
129
131
~~~
130
132
131
133
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) :
133
135
134
136
~~~yaml
135
137
extra-deps :
@@ -147,7 +149,9 @@ Optionally, you can specify also the Pantry tree information. For example:
147
149
148
150
The SHA256 hash of the contents of the Cabal file and its size in bytes is
149
151
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.
151
155
152
156
# ## Git and Mercurial repositories
153
157
0 commit comments