Commit graph

16574 commits

Author SHA1 Message Date
Ed Page
7513b412fe fix(new): Print a note, rather than a comment, for more information
Fixes #12210
2024-01-29 15:38:04 -06:00
bors
8e5e648816 Auto merge of #13382 - estebank:issue-54196, r=weihanglo
Change tests to support changes to suggestion

`rustc` will start marking the suggestions for prefacing unused bindings with underscores as "maybe incorrect", which makes them no longer auto applicable by `rustfix`.

Change done at https://github.com/rust-lang/rust/pull/120470.
2024-02-01 05:16:16 +00:00
Esteban Küber
88bafd161e Change tests to support changes to suggestion
`rustc` will start marking the suggestions for prefacing unused bindings
with underscores as "maybe incorrect", which makes them no longer auto
applicable by `rustfix`.

Change done at https://github.com/rust-lang/rust/pull/120470.
2024-02-01 03:47:27 +00:00
bors
aa18926059 Auto merge of #13377 - weihanglo:m1-runner, r=Muscraft
chore(ci): enable m1 runner
2024-01-31 18:24:37 +00:00
bors
54281b804b Auto merge of #13376 - epage:error, r=Muscraft
fix(toml): Improve map/sequence error message

This is a follow up to #13375
2024-01-31 16:55:38 +00:00
Weihang Lo
b3ac10f08a
chore(ci): enable m1 runner 2024-01-31 11:43:03 -05:00
Ed Page
bd6b4a9b14 fix(toml): Improve map/sequence error message
This is a follow up to #13375
2024-01-31 10:42:58 -06:00
bors
0f37cfb1f5 Auto merge of #13375 - epage:panic, r=Muscraft
fix(diagnostic): Don't panic on empty spans

### What does this PR try to resolve?

There is another level to this bug where we better point to where the
error occurs, see toml-rs/toml#669.

Fixes #13374

### How should we test and review this PR?

### Additional information
2024-01-31 15:57:07 +00:00
Ed Page
1c05d412af fix(diagnostic): Don't panic on empty spans
There is another level to this bug where we better point to where the
error occurs.
2024-01-31 09:11:12 -06:00
Ed Page
f2a4a3e88b test(diagnostic): Show panic 2024-01-31 08:48:53 -06:00
bors
e1ebce1035 Auto merge of #13364 - linyihai:fetch-remove-offline, r=weihanglo
doc: Hide `cargo-fetch` description in offline man page

### What does this PR try to resolve?
Fixes #13232

### How should we test and review this PR?
Suggest review commit by commit.

### Additional information
r? `@weihanglo`
2024-01-31 01:34:08 +00:00
bors
f8c152df3b Auto merge of #12852 - weihanglo:lockfile-v4, r=ehuss
feat: stabilize lockfile v4
2024-01-30 19:48:25 +00:00
bors
251d437564 Auto merge of #13367 - epage:new-creating, r=weihanglo
fix(new): Print a 'Creating', rather than 'Created' status

### What does this PR try to resolve?

This has bothered me about `cargo new` and `cargo init` for a while that
the output is read backwards, for example:
```diff
--- i/tests/testsuite/cargo_init/path_contains_separator/stderr.log
+++ w/tests/testsuite/cargo_init/path_contains_separator/stderr.log
`@@` -1,3 +1,3 `@@`
+    Creating binary (application) package
 warning: the path `[ROOT]/case/test:ing/.` contains invalid PATH characters (usually `:`, `;`, or `"`)
 It is recommended to use a different name to avoid problems.
-     Created binary (application) package
```

### How should we test and review this PR?

### Additional information
2024-01-30 18:25:27 +00:00
bors
8ed4cb1ec8 Auto merge of #13335 - hi-rustin:rustin-patch-same-name, r=weihanglo
fix: use spec id instead of name to match package
2024-01-30 13:25:13 +00:00
hi-rustin
7a13864f29 test: add a cannot find case
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-01-30 20:55:50 +08:00
hi-rustin
240020d546 fix: use spec id instead of name to match package
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-01-30 20:55:40 +08:00
Lin Yihai
c028c72410 doc: Hide cargo-fetch description in offline man page 2024-01-30 16:37:25 +08:00
bors
61debf843b Auto merge of #13368 - epage:anstyle, r=weihanglo
refactor(shell): Use new fancy anstyle API

### What does this PR try to resolve?

Simplifies working with colored output

### How should we test and review this PR?

### Additional information

CC `@joshtriplett`
2024-01-29 22:33:17 +00:00
Ed Page
bf664dabbe refactor(shell): Use the new fancy anstyle API 2024-01-29 16:18:45 -06:00
Ed Page
f48b1ad78d chore: Update anstyle 2024-01-29 16:09:11 -06:00
Ed Page
db54c040ae fix(new): Print a 'Creating', rather than 'Created' status
This has bothered me about `cargo new` and `cargo init` for a while that
the output is read backwards, for example:
```diff
--- i/tests/testsuite/cargo_init/path_contains_separator/stderr.log
+++ w/tests/testsuite/cargo_init/path_contains_separator/stderr.log
@@ -1,3 +1,3 @@
+    Creating binary (application) package
 warning: the path `[ROOT]/case/test:ing/.` contains invalid PATH characters (usually `:`, `;`, or `"`)
 It is recommended to use a different name to avoid problems.
-     Created binary (application) package
```
2024-01-29 15:29:10 -06:00
bors
3e1a2ddc3e Auto merge of #13333 - weihanglo:precise-yank, r=Eh2406
feat(cargo-update): `--precise` to allow yanked versions
2024-01-29 21:25:44 +00:00
Ed Page
7dcb602221 refactor(new): Group name and kind initialization 2024-01-29 15:21:31 -06:00
Ed Page
68302bbf9e refactor(new): Group related calls 2024-01-29 15:16:25 -06:00
Weihang Lo
caeaaa529c
fix(cargo-update): once warn once for --precise <yanked>
This also tweaks the error message a bit.
2024-01-29 16:00:01 -05:00
Weihang Lo
bc5da432ef
test(cargo-update): verify `--precise <yanked> warns twice
This is not ideal and we need to track selected yanked versions.
2024-01-29 15:50:56 -05:00
Weihang Lo
8c392fd7e5
doc(cargo-update): --precise to allow yanked versions 2024-01-29 15:50:56 -05:00
bors
49433a82a0 Auto merge of #13361 - weihanglo:fingerprint, r=epage
refactor: remove unnecessary Option in `Freshness::Dirty`

### What does this PR try to resolve?

This avoids reading and parsing JSON fingerprint files if the detailed
rebuild reason is not requested.

This also encodes `Freshness::Dirty(None)` better with a new variant `DirtyReason::FreshBuild`.
2024-01-29 19:00:04 +00:00
Weihang Lo
a04f2b2a7d
refactor: flatten log_compare into caller 2024-01-29 13:22:57 -05:00
Weihang Lo
bf0b156885
refactor: move mtime_on_use check up to caller 2024-01-29 13:20:09 -05:00
bors
cf8d1ae4a5 Auto merge of #13366 - linyihai:jobserver-latest, r=epage
doc: Replace version with `latest` for jobserver link

### What does this PR try to resolve?
I prefer the  link with `latest`,  it will always jump to the latest version link for crate.

There is a bot called renovate to update the version for crate, So it's ok to use `latest` link.

### How should we test and review this PR?

### Additional information
2024-01-29 15:19:05 +00:00
Lin Yihai
41f7dc2b35 doc: Replace version with latest for jobserver link 2024-01-29 15:22:57 +08:00
Weihang Lo
21f4de7bcf
refactor: remove unnecessary Option in Freshness::Dirty 2024-01-28 20:24:59 -05:00
Weihang Lo
9530355004
refactor: DirtyReason::FreshBuild to represent build from scratch
the only beahvior change in this commit is that source verification is
also performed for `DirtyReason::Forced`.
2024-01-28 20:24:59 -05:00
Weihang Lo
d3a3c329fd
refactor: call log_compare in fingerprint compare fn 2024-01-28 20:24:59 -05:00
bors
95e113cde1 Auto merge of #13362 - weihanglo:data-layout, r=ehuss
test: data layout fix for `x86_64-unknown-none-gnu`

Tests are broken due to LLVM target layout check in rustc. See <https://github.com/rust-lang/rust/pull/120062>.
2024-01-28 22:50:27 +00:00
Weihang Lo
f1aefdd9f7
test: data layout fix for x86_64-unknown-none-gnu 2024-01-28 15:52:14 -05:00
bors
91f20108cd Auto merge of #13351 - epage:provider, r=weihanglo
docs(ref): Try to improve reg auth docs

### What does this PR try to resolve?

My end-goal *was* to discourage the use of `cargo:token` but it immediately failed for me and I need to look into that further.

So this is the smaller steps I made along the way.

### How should we test and review this PR?

### Additional information

For config.md, my expectation is to warn users about `cargo:token` right after the discussion on keeping tokens secret.

I want to find a way to talk about this on the "your first publish" page but that needs to wait until we smooth things out.
2024-01-27 17:42:23 +00:00
bors
eace48e003 Auto merge of #13357 - rust-dacheng:patch/fix-typo, r=weihanglo
fix typo of rustbuild, instead of rustuild

Fixes #13356
2024-01-27 15:41:48 +00:00
Success Go
54d35c7ad6 fix typo of rustbuild, instead of rustuild 2024-01-27 23:18:01 +08:00
bors
3a72bf343b Auto merge of #13349 - epage:config, r=weihanglo
fix(config): Deprecate non-extension files

### What does this PR try to resolve?

In #7295 (released in 1.39), we said we'd want to warn on use of
`.cargo/config` after about 6 months.  Over 4 years later, we are now
getting that warning.

This is important for addressing user confusion, like in
https://www.reddit.com/r/rust/comments/19fd5q2/cargoconfig/

### How should we test and review this PR?

It'll be important to look at the individual commits as one updates tests from using `.cargo/config` to `.cargo/config.toml` which touches a lot of code.

I added a test for `.cargo/config` in a separate commit so you can see how the output changes.

### Additional information

Discussed on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Deprecating.20credential.20provider.20default.3F)
2024-01-26 22:11:28 +00:00
Ed Page
5ceb1b2d66 docs(auth): Don't get in the way of recommendation and commentary 2024-01-26 15:46:12 -06:00
Ed Page
0a7fbf5285 docs(auth): Merge recommended configurations
Before, it made it look like you needed to maintain a platform-specific
`.cargo/config.toml` but it can instead be cross-platform.
2024-01-26 15:46:08 -06:00
Ed Page
88694ae784 docs(auth): With recommended config, call out precedence
I thought the recommendation was doing the opposite of what I expected
until I dug further.
While this is covered in the config docs, we should explicitly call it
out.
2024-01-26 15:46:02 -06:00
Ed Page
299f031619 docs(config): Group high-level with schema-based credentials descriptions 2024-01-26 15:45:53 -06:00
Ed Page
47b6fe6e0d docs(config): Help credentials users find out more about cargo:token 2024-01-26 15:45:48 -06:00
Ed Page
6eb2ddea20 fix(config): Deprecate non-extension files
In #7295 (released in 1.39), we said we'd want to warn on use of
`.cargo/config` after about 6 months.  Over 4 years later, we are now
getting that warning.

 This is important for addressing user confusion, like in
https://www.reddit.com/r/rust/comments/19fd5q2/cargoconfig/
2024-01-26 15:16:11 -06:00
Ed Page
a1525bca4d test(config): Improve failure output 2024-01-26 15:16:05 -06:00
Ed Page
7e8521162b test(config): Verify output for extension-less 2024-01-26 15:08:48 -06:00
Ed Page
675224b3a0 test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00