-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document the use of
@
in PKGID Specs
Since the `cargo pkgid` docs were so brief, I figured I'd focus on the expected common case and only cover `@` while the reference mentions both in the grammar.
- Loading branch information
Showing
5 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,12 @@ is a string which is used to uniquely refer to one package within a graph of | |
packages. | ||
|
||
The specification may be fully qualified, such as | ||
`https://github.com/rust-lang/crates.io-index#regex:1.4.3` or it may be | ||
`https://github.com/rust-lang/crates.io-index#regex@1.4.3` or it may be | ||
abbreviated, such as `regex`. The abbreviated form may be used as long as it | ||
uniquely identifies a single package in the dependency graph. If there is | ||
ambiguity, additional qualifiers can be added to make it unique. For example, | ||
if there are two versions of the `regex` package in the graph, then it can be | ||
qualified with a version to make it unique, such as `regex:1.4.3`. | ||
qualified with a version to make it unique, such as `regex@1.4.3`. | ||
|
||
#### Specification grammar | ||
|
||
|
@@ -23,7 +23,7 @@ The formal grammar for a Package Id Specification is: | |
```notrust | ||
spec := pkgname | ||
| proto "://" hostname-and-path [ "#" ( pkgname | semver ) ] | ||
pkgname := name [ ":" semver ] | ||
pkgname := name [ ("@" | ":" ) semver ] | ||
proto := "http" | "git" | ... | ||
``` | ||
|
@@ -40,17 +40,17 @@ The following are references to the `regex` package on `crates.io`: | |
| Spec | Name | Version | | ||
|:------------------------------------------------------------|:-------:|:-------:| | ||
| `regex` | `regex` | `*` | | ||
| `regex:1.4.3` | `regex` | `1.4.3` | | ||
| `regex@1.4.3` | `regex` | `1.4.3` | | ||
| `https://github.com/rust-lang/crates.io-index#regex` | `regex` | `*` | | ||
| `https://github.com/rust-lang/crates.io-index#regex:1.4.3` | `regex` | `1.4.3` | | ||
| `https://github.com/rust-lang/crates.io-index#regex@1.4.3` | `regex` | `1.4.3` | | ||
|
||
The following are some examples of specs for several different git dependencies: | ||
|
||
| Spec | Name | Version | | ||
|:----------------------------------------------------------|:----------------:|:--------:| | ||
| `https://github.com/rust-lang/cargo#0.52.0` | `cargo` | `0.52.0` | | ||
| `https://github.com/rust-lang/cargo#cargo-platform:0.1.2` | <nobr>`cargo-platform`</nobr> | `0.1.2` | | ||
| `ssh://[email protected]/rust-lang/regex.git#regex:1.4.3` | `regex` | `1.4.3` | | ||
| `https://github.com/rust-lang/cargo#cargo-platform@0.1.2` | <nobr>`cargo-platform`</nobr> | `0.1.2` | | ||
| `ssh://[email protected]/rust-lang/regex.git#regex@1.4.3` | `regex` | `1.4.3` | | ||
|
||
Local packages on the filesystem can use `file://` URLs to reference them: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters