Commit graph

13869 commits

Author SHA1 Message Date
Eric Huss
6bd1209a55 Add delays to network retries. 2023-03-31 14:04:48 -07:00
Eric Huss
c38e050fc6 Allow RegistryBuilder responder URLs to be a String
This allows tests to generate dynamic URLs for custom responders.
2023-03-31 14:04:48 -07:00
Eric Huss
b5d772f303 Split the cargo::util::network module into submodules
This is intended to help grow with more stuff.
2023-03-31 14:04:48 -07:00
bors
4a60ff78a5 Auto merge of #11918 - ehuss:sync-target-json, r=epage
Sync external-tools JSON docs.

A few fields were missing from the external-tools JSON documentation.
2023-03-31 15:34:06 +00:00
Eric Huss
cfbeb8db82 Sync external-tools JSON docs. 2023-03-31 07:00:04 -07:00
bors
820538924b Auto merge of #11915 - Veykril:serde-derive, r=ehuss
Drop derive feature from serde in cargo-platform
2023-03-31 13:13:13 +00:00
bors
65a3c0bc43 Auto merge of #11916 - ehuss:test-lto-windows-gnu-disable, r=weihanglo
Disable test_profile test on windows-gnu

This disables the `test_profile` test on windows-gnu due to a regression in nightly, see https://github.com/rust-lang/rust/issues/109797.
2023-03-31 03:07:52 +00:00
Eric Huss
5860cd23a2 Disable test_profile test on windows-gnu 2023-03-30 19:18:10 -07:00
Lukas Wirth
a127a0a2a8 Drop derive feature from serde in cargo-platform 2023-03-30 17:09:51 +02:00
bors
1f63f1dd97 Auto merge of #11908 - nabijaczleweli:master, r=ehuss
src/doc/src/reference/build-scripts.md: a{n =>} benchmark target

### What does this PR try to resolve?

"an benchmark target"

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

idk, reading it is a good start, maybe compare to [the original](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#cargorustc-link-arg-benchesflag). it may help to vocalise out loud that *b* is not a vowel, too
2023-03-29 13:15:40 +00:00
наб
3c7578f8ad
a{n =>} benchmark target 2023-03-29 13:47:58 +02:00
bors
5d3a85eb45 Auto merge of #11901 - jofas:fix-for-11852, r=weihanglo
Documented working directory behaviour for `cargo test`, `cargo bench` and `cargo run`

Fixes #11852. Updated the respective man-pages of `cargo test`, `cargo bench` and `cargo run` to include the information of the working directory of the executables. Added a comment in the code of `cargo run`  where the default behaviour (the package's root directory) is overridden.
2023-03-29 08:23:39 +00:00
jofas
355ddf57ee documented working directory behaviour of cargo-test, cargo-bench and cargo-run commands 2023-03-29 10:02:17 +02:00
bors
39dba0120c Auto merge of #11903 - epage:office, r=weihanglo
docs(contrib): Link to office hours doc
2023-03-28 22:51:58 +00:00
bors
a6e1e26bde Auto merge of #11904 - epage:clap, r=Muscraft
chore: Upgrade to clap v4.2

Tests in `master` are currently failing because its building with clap v4.2 but the tests have snapshots from v4.1
2023-03-28 21:43:56 +00:00
Ed Page
6feea34f8a chore: Upgrade to clap v4.2
Tests in `master` are currently failing because its building with clap
v4.2 but the tests have snapshots from v4.1
2023-03-28 05:00:49 -05:00
Ed Page
f499954e19 docs(contrib): Link to office hours doc 2023-03-28 04:01:20 -05:00
bors
145219a9f0 Auto merge of #11894 - weihanglo:contrib, r=ehuss
doc(contrib): missing quotation mark

Add missing quotation marks.
2023-03-27 01:56:36 +00:00
Weihang Lo
89ccd42faa
doc(contrib): missing quotation mark 2023-03-27 09:45:28 +08:00
bors
4769ace40f Auto merge of #11893 - ehuss:1.68.2-changelog, r=weihanglo
Update changelog for 1.68.2

This updates the changelog for the 1.68.2 patch release.
2023-03-26 21:51:35 +00:00
Eric Huss
1e05a7300f Update changelog for 1.68.2 2023-03-26 13:07:24 -07:00
bors
d002ceb0a4 Auto merge of #11889 - est31:revoke_old_github, r=ehuss
Add the old github keys as revoked

The patch to update the bundled ssh github host key did not change anything for users who already had connected to github one time before via ssh: if the attacker had access to the old key, they'd be vulnerable to MITM attacks as their known_hosts file would list the old github key. Only if they connected again to github without attacker access, or if they saw the announcement of the key rotation, they would update their key.

There is sadly no other way to distribute revocations of old host keys to clients other than to bundle them with client software.

cc #11883
2023-03-26 17:26:22 +00:00
est31
cd654c7369 Add the old github keys as revoked
The patch to update the bundled ssh github host key did not
change anything for users who already had connected to github
one time before via ssh: if the attacker had access to the old
key, they'd be vulnerable to MITM attacks as their known_hosts
file would list the old github key. Only if they connected
again to github without attacker access, or if they saw the
announcement of the key rotation, they would update their key.

There is sadly no other way to distribute revocations of old host
keys to clients other than to bundle them with client software.
2023-03-26 17:44:45 +02:00
bors
7a598bfc3a Auto merge of #11886 - ehuss:update-proptest, r=Eh2406
Update proptest

This updates proptest from 0.9.1 to 1.1.0. This helps drop some old, unsupported dependencies like `fuchsia-cprng` from an old version of `rand`.

Changelog: https://github.com/proptest-rs/proptest/blob/master/proptest/CHANGELOG.md

I don't see any particularly relevant breaking changes for our use.
2023-03-25 23:15:56 +00:00
Eric Huss
3e20ffda68 Update proptest 2023-03-25 13:13:24 -07:00
bors
24ac6ac038 Auto merge of #11883 - mitsuhiko:feature/new-github-rsa-host-key, r=arlosi
Added new GitHub RSA Host Key

GitHub rotated their RSA host key which means that cargo needs to update it.  Thankfully the other keys were not rotated so the impact depends on how cargo connected to github.

Refs https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
2023-03-24 21:03:52 +00:00
Armin Ronacher
9fc613681b Added new GitHub RSA Host Key
GitHub rotated their RSA host key which means that cargo needs to
update it.  Thankfully the other keys were not rotated so the impact
depends on how cargo connected to github.

Refs https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
2023-03-24 09:37:29 +01:00
bors
e9173be28f Auto merge of #11880 - ehuss:registries-doc-git, r=weihanglo
doc: Fix registries.name.index for sparse

A very minor documentation update. `registries.name.index` doesn't have to be a git URL, it can also be a sparse one.
2023-03-23 11:33:51 +00:00
Eric Huss
ed57a09a97 doc: Fix registries.name.index for sparse 2023-03-23 04:28:14 -07:00
bors
b1dcb627da Auto merge of #11876 - epage:arch, r=ehuss
docs(contrib): Replace architecture with redirects

I also went back to pages moved in #11869 and added redirects for those as well.
2023-03-22 16:33:42 +00:00
bors
00030f6e42 Auto merge of #11874 - TomAFrench:patch-1, r=ehuss
docs: fix typos in `cargo_compile/mod.rs`

### What does this PR try to resolve?

We've got a couple of typos in the docs for `cargo_compile/mod.rs` so I've addressed them.

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

Just needs a quick proofread

### Additional information

N/A
2023-03-22 00:22:10 +00:00
Tom French
ae252b5bfe
docs: fix typos in cargo_compile/mod.rs 2023-03-21 23:27:00 +00:00
bors
62ebe0007d Auto merge of #11873 - epage:contrib, r=weihanglo
docs(contrub): Remove unused file

This was added by accident in #11869
2023-03-21 23:21:32 +00:00
bors
15d0909697 Auto merge of #11870 - epage:registry, r=Eh2406
docs(contrib): Move higher level resolver docs into doc comments

This is a follow up to #11809.

I chose `ops::resolve` for most of the old documentation as this because the docs cover the
higher level details that include it, like `Cargo.lock` file, while
`core::resolver` is more of the algorithm.
2023-03-21 17:54:28 +00:00
bors
ed42a0d7e7 Auto merge of #11869 - epage:impl, r=weihanglo
docs(contrib): Pull impl info out of architecture

This is a follow up to #11809.

Personally, I found mixing this stuff with architecture less than ideal as it buried the more practical information among details that might not have been as important.  With us moving architecture information into doc comments, this provides us an opportunity to rectify this.

Not a fan of the name of this chapter but its a start.

I've left in the old architecture chapter as there is still content to find a home for (resolver).
2023-03-21 16:00:53 +00:00
bors
d0a73a5943 Auto merge of #11871 - ehuss:update-curl-sys, r=weihanglo
Update curl-sys

This updates curl-sys from 0.4.59 to 0.4.61. This corresponds to curl 7.86.0 to 8.0.1.
Changelog: https://curl.se/changes.html

Closes #11746
2023-03-20 19:09:34 +00:00
Eric Huss
89b86b7da2 Update curl-sys 2023-03-20 11:54:02 -07:00
bors
16d0495d29 Auto merge of #11624 - vext01:poll-loop-fixes, r=ehuss
Poll loop fixes

### What does this PR try to resolve?

A couple of minor issues. See individual commits.

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

The existing test suite should have sufficient coverage.

### Additional information

(I have 5 apparently unrelated failures locally when running `cargo test`)
2023-03-20 12:42:45 +00:00
Ed Page
8baa207c4b docs(contrib): Replace architecture with redirects
I also went back to pages moved in #11869 and added redirects for those
as well.
2023-03-17 20:02:40 -05:00
Ed Page
9583f93c8d docs(contrub): Remove unused file
This was added by accident in #11869
2023-03-17 13:53:32 -05:00
bors
99ad42deb4 Auto merge of #11828 - weihanglo:clippy-disallowed-methods, r=epage
clippy: warn `disallowed_methods` for `std::env::var` and friends
2023-03-17 18:37:50 +00:00
bors
f2f4496bab Auto merge of #11859 - chaitanyav:master, r=weihanglo
Add --ignore-rust-version flag to cargo install

`@weihanglo` Added the flag to cargo install
fixes #11718
2023-03-17 07:22:03 +00:00
Ed Page
bd5e1a58c3 docs(contrib): Move some lower resolver details from ops to core 2023-03-17 02:11:57 -05:00
Ed Page
ef55037fb0 docs(contrib): Move higher level resolver docs into doc comments
I chose `ops::resolve` as the place for this as the docs cover the
higher level details, including the `Cargo.lock` file, while
`core::resolver` is more of the algorithm.
2023-03-17 02:11:57 -05:00
Ed Page
fceff19ed2 docs(contrib): Pull impl info out of architecture
Personally, I found mixing this stuff with architecture less than ideal
as it buried the more practical information among details that might not
have been as important.  With us moving architecture information into
doc comments, this provides us an opportunity to rectify this.

Not a fan of the name of this chapter but its a start.

I've left in the old architecture chapter as there is still content to
find a home for (resolver).
2023-03-17 01:11:41 -05:00
bors
c9faf70061 Auto merge of #11824 - kylematsuda:windows-config-env-fix, r=ehuss
Handle case mismatches when looking up env vars in the Config snapshot

### What does this PR try to resolve?

Fixes #11814.

Windows environment variables are case-insensitive, which causes problems when looking them up in the `Config` env snapshot.

This PR adds another member (`case_insensitive_env`) in `Config` that maps upper-cased keys to their original values in the env (for example, `"PATH" => "Path"`). If lookup in `self.env` fails, this PR converts the key to upper case and looks it up in `self.case_insensitive_env` to obtain the correct key name if it exists (on Windows only).

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

Please see the new tests in `testsuite/config.rs` and `testsuite/cargo_command.rs`.

### Additional information

Currently, this uses `str::to_uppercase` to uppercase the keys. This requires key to be valid UTF-8, and may disagree with how the OS uppercases things (see the link in [this comment](https://github.com/rust-lang/cargo/issues/11814#issuecomment-1462870983) for details).
2023-03-17 01:06:49 +00:00
Ed Page
1071cce149 refactor(fix): Clarify env variable names are internal 2023-03-16 18:34:29 -05:00
Weihang Lo
5ccca80da8
clippy: allow usages of std::env::var family by exceptions
See comments above for each usage about why it is allowed.
2023-03-17 12:57:21 +00:00
Weihang Lo
9e3bb8588b
clippy: warn disallowed_methods for std::env::var and friends
In 11588 we want to avoid reading from environment variables,
11727 did that well. I wonder if we could leverage tools to help
with this. Thankfully, clippy has a `disallowed_methods`[1] lint,
helping us enforce the rule.

[1]: https://rust-lang.github.io/rust-clippy/stable/index.html#disallowed_methods
2023-03-17 12:51:23 +00:00
Kyle Matsuda
7af55d83f4 improve docstrings for config::environment 2023-03-16 15:14:51 -06:00