Skip to content

Commit 76cc98d

Browse files
committed
Fix #5468 Clarify target behaviour for stack build foobar-1.2.3
1 parent e3f8a99 commit 76cc98d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

doc/build_command.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,15 @@ supported syntaxes for targets are:
9393
GHC specified by the snapshot.
9494

9595
* *package identifier*, e.g. `stack build foobar-1.2.3`, is usually used to
96-
include specific package versions from the package index. If the version
97-
selected conflicts with an existing local package or extra dep, then Stack
98-
fails with an error. Otherwise, this is the same as using
99-
`stack build foobar`, except instead of using the latest version from the
100-
package index, the version specified is used.
96+
include specific package versions from the package index.
97+
98+
If the package name conflicts with that of a local package, then Stack
99+
fails with an error.
100+
101+
Otherwise, this is the same as using `stack build foobar` (that is, ignoring
102+
the specified version), unless the specified version exists in the package
103+
index. If it exists, then the latest revision of that version from the
104+
package index is used.
101105

102106
* *component*. Instead of referring to an entire package and letting Stack
103107
decide which components to build, you select individual components from

0 commit comments

Comments
 (0)