From: Steve Klabnik Date: Tue, 25 Aug 2015 17:00:45 +0000 (-0400) Subject: Add a note to the FAQ about * for library dependencies X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~17^2~98^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=630108d958d5bdea7a7546ea07ee7ed242e6255c;p=cargo.git Add a note to the FAQ about * for library dependencies Fixes #1870 --- diff --git a/src/doc/faq.md b/src/doc/faq.md index 8b9b9e5d6..fc1d9416e 100644 --- a/src/doc/faq.md +++ b/src/doc/faq.md @@ -128,6 +128,13 @@ In other words, libraries specify semver requirements for their dependencies but cannot see the full picture. Only end products like binaries have a full picture to decide what versions of dependencies should be used. +# Can libraries use `*` as a version for their dependencies? + +While they _can_, strictly speaking, they should not. A version requirement +of `*` says “This will work with every version ever,” which is never going +to be true. Libraries should always specifiy the range that they do work with, +even if it’s something as general as “every 1.x.y version.” + # Why `Cargo.toml`? As one of the most frequent interactions with Cargo, the question of why the