14776 Commits

Author SHA1 Message Date
Eric Huss
a2b36f6937 Updates from review from joshtriplett 2023-08-17 18:18:10 -07:00
Eric Huss
58aef649dd Add "reordering" to list of changes.
Co-authored-by: the8472 <the8472@users.noreply.github.com>
2023-08-17 18:18:10 -07:00
Eric Huss
9e274d07bd Apply changes from review from obi1kenobi. 2023-08-17 18:18:10 -07:00
Eric Huss
99d2aa9159 Clarify what it means "to document" a transparent type. 2023-08-17 18:18:10 -07:00
Eric Huss
406f434931 Split out all layout rules into separate sections with examples. 2023-08-17 18:18:10 -07:00
Eric Huss
96da3c4872 Support hidden lines. 2023-08-17 18:18:10 -07:00
Eric Huss
4c1d8f1364 Document the special code block annotations. 2023-08-17 18:18:10 -07:00
Eric Huss
661287e6bd Apply some edits from review to try to clarify things. 2023-08-17 18:18:10 -07:00
Eric Huss
3cff9d5082 Document layout semver compatibility. 2023-08-17 18:18:10 -07:00
bors
2b1f87c6a4 Auto merge of #12521 - arlosi:cred-libsecret, r=epage
Make cargo-credential-gnome-secret built-in as cargo:libsecret

We previously couldn't have cargo-credential-gnome-secret built into Cargo because of its build-time dependency on `libsecret`. However, this limitation has now been lifted by #12518.

Adds a new built-in credential provider `cargo:libsecret`.

Adds `ISC` as an allowed license for `libloading`.
* `rustc` already uses `libloading`
* ISC license is very similar to MIT

Renames the crate from `cargo-credential-gnome-secret` to `cargo-credential-libsecret` and changes the crate structure to more closely match `wincred` and `macos-keychain`.
2023-08-17 21:15:58 +00:00
Arlo Siemsen
763edbab09 rename crate to cargo-credential-libsecret 2023-08-17 16:05:31 -05:00
bors
37a0514c75 Auto merge of #12499 - arlosi:cred-args, r=Eh2406
login: allow passing additional args to provider

As part of moving asymmetric token support to a credential provider in #12334, support for passing `--key-subject` to `cargo login` was removed.

This change allows passing additional arguments to credential providers when running `cargo login`. For example:
`cargo login -- --key-subject foo`.

The asymmetric token provider (`cargo:paseto`) is updated to take advantage of this and re-enables setting `--key-subject` from `cargo login`.

r? `@Eh2406`

cc #8933
2023-08-17 19:10:24 +00:00
Arlo Siemsen
3d8e8d32cd credential: make gnome-secret built-in as cargo:libsecret 2023-08-17 13:58:18 -05:00
bors
937b930a77 Auto merge of #12518 - arlosi:cred-dlopen, r=epage
cargo-credential-gnome-secret: dynamically load libsecret

Building `cargo-credential-gnome-secret` currently requires the `libsecret` development libraries to be installed and findable via `pkg-config`. This is often an extra step for users and complicates CI builds.

This loads the required functions from `libsecret` dynamically using `libloading` which uses `dlopen` internally.

Closes #12503

Testing this requires manually installing the credential provider on a system with libsecret set up. I tested it on Arch Linux.
2023-08-17 16:56:21 +00:00
bors
9a35c0bf88 Auto merge of #12507 - arlosi:1password, r=epage
credential-providers: make 1password no longer built-in

Since 1password is just one of many potential CLI-based credential providers, it makes more sense for it to be installable as a plugin rather than built-in to Cargo.

This means that `cargo:1password` will no longer work as a credential provider.

The replacement would be `cargo install cargo-credential-1password` and using `cargo-credential-1password` instead.

r? `@ehuss`
2023-08-17 14:21:13 +00:00
Arlo Siemsen
b74e5a0e7e credential: make 1password no longer built-in 2023-08-17 00:47:30 -05:00
bors
7b61184ad1 Auto merge of #12498 - Kobzol:run-verbose-print-env, r=arlosi
Print environment variables for `cargo run` in extra verbose mode
2023-08-17 05:32:16 +00:00
Arlo Siemsen
627936bdf6 cargo-credential-gnome-secret: dynamically load libsecret 2023-08-17 00:18:00 -05:00
bors
3a34fca9ee Auto merge of #12517 - weihanglo:bump-cargo-util-0.2.6, r=epage
chore(cargo-util): bump version to 0.2.6
2023-08-16 19:25:54 +00:00
Weihang Lo
5691da2b79
chore(cargo-util): bump version to 0.2.6 2023-08-16 20:06:40 +01:00
bors
b6254cae48 Auto merge of #12512 - arlosi:rename-basic-cred-provider, r=epage
credential: rename cargo:basic to cargo:token-from-stdout

Multiple people have said that the name of the `cargo:basic` credential provider is confusing, since it's not doing HTTP Basic authentication.

Rename `cargo:basic` to `cargo:token-from-stdout`, which more accurately describes what it does.
2023-08-16 16:29:48 +00:00
bors
11870e3a16 Auto merge of #12513 - weihanglo:fix-bump-check, r=epage
fix(xtask-bump-check): query by package name to detect changes
2023-08-16 14:58:44 +00:00
Weihang Lo
1ee9db3123
fix(xtask-bump-check): query by package name to detect changes
versions and paths of a workspace members between the original and
a checked-out workspace are different, and shouldn't be included in
hash keys when querying packages.
2023-08-16 15:46:43 +01:00
Jakub Beránek
4eac5a1fd1
Add test for environment variables in verbose mode for cargo bench 2023-08-16 13:47:39 +02:00
Jakub Beránek
9267277048
Print environment variables for cargo test in extra verbose mode 2023-08-16 13:41:54 +02:00
Arlo Siemsen
1065f213e3 credential: rename cargo:basic to cargo:token-from-stdout 2023-08-15 23:56:11 -05:00
bors
93e1aa2ea1 Auto merge of #12508 - weihanglo:ci-github-sha, r=ehuss
ci: use pull request head commit whenever possible
2023-08-16 02:01:29 +00:00
Weihang Lo
4360d9d2ad
ci: use pull request head commit whenever possible
The `github.sha` is a merge commit with the parents of latest master
and the head of the pr. Trying to diff the changes from that merge
SHA to base will show all changes that have been made in-between.

And that doesn't seem about right.

We switch to `github.event.pull_request.head.sha` if there is a pr.

See: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/version-bump.20CI.20failing
2023-08-16 00:11:23 +01:00
bors
bc1842686f Auto merge of #12504 - ehuss:hermit-abi, r=epage
Update hermit-abi

This updates hermit-abi from 0.3.1 to 0.3.2. 0.3.1 was yanked, and I keep getting warnings about it.

Changes: https://github.com/hermitcore/rusty-hermit/compare/hermit-abi-0.3.1...hermit-abi-0.3.2
2023-08-15 21:50:00 +00:00
bors
a11f624c97 Auto merge of #11447 - arlosi:exact, r=weihanglo
Crate checksum lookup query should match on semver build metadata

Since crates.io allows crate versions to differ only by build metadata, a query using `OptVersionReq::exact` + `next()` can return nondeterministic results.

This change fixes the issue by adding an additional `filter` that ensures the version is equal (including build metadata).

It still feels somewhat wrong that a query using `exact` can match multiple crates, so an alternative fix would be to add a new variant of `OptVersionReq` that also matched on build metadata.

Fixes #11412
2023-08-15 20:44:15 +00:00
Eric Huss
a008741136 Update hermit-abi 2023-08-15 13:29:54 -07:00
Jakub Beránek
5405cd3a8b
Print environment variables for cargo run in extra verbose mode 2023-08-15 13:45:42 +02:00
Arlo Siemsen
589a111893 login: allow passing additional args to provider 2023-08-14 15:24:09 -05:00
bors
7c3904d6c3 Auto merge of #12501 - epage:rustdoc, r=weihanglo
fix(lints): Doctest extraction should respect `[lints]`

Note the first commit shows the bug and the second commit fixes it

Fixes #12497
2023-08-14 20:11:43 +00:00
bors
fdd0d273e4 Auto merge of #12500 - weihanglo:relax-panic-msg, r=epage
test: relax assertions of panic message (again)
2023-08-14 19:25:49 +00:00
Ed Page
9984855904 fix(lints): Doctest extraction should respect [lints]
Fixes #12497
2023-08-14 14:23:59 -05:00
Ed Page
a80dfae761 test(lints): Demo doctest bug 2023-08-14 14:21:25 -05:00
Weihang Lo
689defd4ba
test: relax assertions of panic message (again) 2023-08-14 19:32:39 +01:00
bors
3b4dd4b255 Auto merge of #12492 - weihanglo:keep-going-doc, r=epage
doc(unstable): `cargo test` does not provide `--keep-going`
2023-08-14 17:45:41 +00:00
bors
f13759445f Auto merge of #12488 - weihanglo:ansi-color-log, r=epage
fix(log): enable ansi color only in terminal
2023-08-14 17:03:39 +00:00
Weihang Lo
c07043b7cf
fix(log): enable ansi color only in terminal 2023-08-14 15:45:25 +01:00
bors
0067476575 Auto merge of #12490 - amosbird:cargo-yank-doc-fix1, r=weihanglo
Update cargo-yank.md

Fix version typo in cargo-yank.md
2023-08-14 14:42:05 +00:00
Weihang Lo
b45ffa9283
doc(unstable): cargo test does not provide --keep-going 2023-08-14 15:26:38 +01:00
bors
18f2b46f28 Auto merge of #12491 - weihanglo:fix-future-incompat, r=ehuss
test: bypass `rustc --test` impl details for `-Zfuture-incompat-test`

Switch to an empty `lib.rs` from `main.rs`.

See https://github.com/rust-lang/rust/issues/114804#issuecomment-1677233355

Closes https://github.com/rust-lang/rust/issues/114804
2023-08-14 13:49:14 +00:00
Weihang Lo
b567a67d5c
test: bypass rustc --test impl details for -Zfuture-incompat-test
Switch to an empty `lib.rs` from `main.rs`.

See https://github.com/rust-lang/rust/issues/114804#issuecomment-1677233355
2023-08-14 13:40:47 +01:00
Amos Bird
09215930e6
Update cargo-yank.md
Fix version typo in cargo-yank.md
2023-08-14 16:03:31 +08:00
bors
7e9de3f4ec Auto merge of #12478 - weihanglo:keep-going, r=epage
feat: remove `--keep-going` from `cargo test/bench`
2023-08-13 00:47:32 +00:00
bors
42f17989f7 Auto merge of #12483 - weihanglo:platform-dep, r=ehuss
chore: window-sys should be a platform-specific dependency

r? `@arlosi`
2023-08-12 23:46:34 +00:00
Weihang Lo
862226fc60
chore: window-sys should be a platform-specific dependency 2023-08-12 09:17:18 +01:00
bors
65cee64656 Auto merge of #12482 - rukai:rerun-if-changed-docs, r=weihanglo
docs: make the env var source of rerun-if-env-changed clearer

closes https://github.com/rust-lang/cargo/issues/12403

### What does this PR try to resolve?

The wording of the documentation on [rerun-if-env-changed](https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorerun-if-env-changedname) was misleading which led me to be confused by the behavior of cargo and then raise https://github.com/rust-lang/cargo/issues/12403
These changes should avoid users being confused by this in the future.
2023-08-12 00:42:04 +00:00