13 Commits

Author SHA1 Message Date
Ethan Brierley
9831e83fb2 generalise suggestion on abiguous spec
Fixes #12433
2023-09-18 16:34:17 +01:00
Ed Page
82f9bd330e feat(spec): Allow partial versions when unambigious
This was proposed in #12425 to help improve usability of the existing
`cargo update` when dealing with the added workflows.
2023-09-13 22:00:00 -06:00
Ed Page
c88137cd62 fix(pkgid): More consistently refer to SemVer 2023-08-29 10:49:09 -05:00
Ed Page
3d2f371737 test(pkgid): Add cases for partial versions 2023-08-29 10:40:47 -05:00
Ed Page
018b7589e8 test(pkgid): Focus tests on use cases, rather than success/failure
I assume the reason these aren't all individual tests is test-time but
if we divide by success/failure, I'll need to duplicate things to handle
partial versions.

Overall, I feel like this makes the tests make more sense.
2023-08-29 10:36:36 -05:00
Ed Page
3138f91d4d test(pkgid): Include test for ambiguous spec 2023-08-29 10:29:09 -05:00
cuishuang
6f13c466d2 fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-05-08 01:07:28 +08:00
Ed Page
cdec3838a8 Extend pkgid syntax with @ support
In addition to `foo:1.2.3`, we now support `foo@1.2.3` for pkgids.  We
are also making it the default way of rendering pkgid's for the user.

With cargo-add in #10472, we've decided to only use `@` in it and to add
it as an alternative to `:` in the rest of cargo.  `cargo-add`
originally used `@`.  When preparing it for merge, I switched to `:` to
be consistent with pkgids. When discussing this, it was felt `@` has
precedence in too many tools to switch to `:` but that we should instead
switch pkgid's to use `@`, in a backwards compatible way.

See also https://internals.rust-lang.org/t/feedback-on-cargo-add-before-its-merged/16024/26?u=epage
2022-04-19 16:00:15 -05:00
Weihang Lo
ade33c20d1
teset(pkgid): suggestion for bad parsing 2021-03-02 16:18:21 +08:00
Weihang Lo
2e3a74cc95
test(pkgid): bad file URL suggestion 2021-03-02 08:40:59 +08:00
Eric Huss
b04c7fb849 Add suggestion for bad package id. 2021-01-22 13:38:53 -08:00
Eric Huss
6f8c7d5a87 Normalize raw string indentation. 2020-09-26 17:59:58 -07:00
Takayuki Nakata
a28d9a1e2a Add test for cargo pkgid 2019-12-29 20:42:50 +09:00