17229 Commits

Author SHA1 Message Date
bors
d4672087b3 Auto merge of #13740 - Muscraft:remove-rust-2024-compat, r=epage
refactor: Remove `rust_2024_compatibility` lint group

The `rust_2024_compatibility` lint group was added as a way to be compatible with `Rust`. This group is meant to be used when switching to the 2024 edition (usually enabled by `cargo fix --edition`). Since we are not going to be interacting with `cargo fix` in the standard way to fix edition lints, this group is not needed at this time. Removing this will (slightly) reduce the complexity of working on things for the 2024 edition.
2024-04-11 21:17:17 +00:00
Scott Schafer
d77faa68af
refactor: Remove rust_2024_compatibility lint group 2024-04-11 14:36:30 -06:00
Ed Page
38718eaa93 feat(resolve): Fallback to 'rustc -V' for MSRV resolving 2024-04-11 14:40:52 -05:00
Ed Page
b7b3874d09 refactor(resolve): Make it easier to extend MSRV logic 2024-04-11 14:38:02 -05:00
Ed Page
a8e816b079 test(resolve): Show no-MSRV case 2024-04-11 14:36:50 -05:00
Ed Page
c7d89c64f1 feat(cli): Add --ignore-rust-version to update/generate-lockfile 2024-04-11 14:27:57 -05:00
Ed Page
c9de6eeeb2 test(resolve): Show update/generate-lockfile behavior 2024-04-11 14:18:10 -05:00
Ed Page
a0ba72918a fix(help): Generalize --ignore-rust-version 2024-04-11 13:45:39 -05:00
Ed Page
cd3d31b361 feat(reslve): Respect '--ignore-rust-version' 2024-04-11 12:56:53 -05:00
Ed Page
11448b44fe refactor(resolve): Abstract out MSRV policy tracking 2024-04-11 12:07:05 -05:00
Ed Page
789eda2b83 fix: Correct fn name in log statement 2024-04-11 11:40:33 -05:00
bors
74fd5bc730 Auto merge of #13731 - weihanglo:openssl, r=epage
chore: downgrade to openssl v1.1.1 (again)

Accidentally updated by <https://github.com/rust-lang/cargo/pull/13674>

See https://github.com/rust-lang/cargo/issues/13546#issuecomment-2047366361
2024-04-10 18:40:49 +00:00
Weihang Lo
686057bddd
chore: pin openssl-sys to =0.9.92 2024-04-10 13:48:46 -04:00
bors
40ce8ace29 Auto merge of #13728 - weihanglo:dedup-suggestion, r=epage
fix(cargo-fix): dont apply same suggestion twice
2024-04-10 16:50:17 +00:00
bors
e366699d7f Auto merge of #13727 - weihanglo:patch, r=epage
refactor: make `resolve_with_previous` clearer
2024-04-10 16:19:21 +00:00
Weihang Lo
95edc06e5b
fix(rustfix): dont apply same suggestion twice
This assumes that if any of the machine applicable fixes in
a diagnostic suggestion is a duplicate, we should see the
entire suggestion as a duplicate.
2024-04-10 11:54:33 -04:00
Weihang Lo
5b05a3bb5a
test(rustfix): demonstrate duplicate suggestions 2024-04-10 11:53:37 -04:00
bors
f8a73f7d7a Auto merge of #13729 - epage:slash, r=Muscraft
fix(package): Normalize paths in `Cargo.toml`

### What does this PR try to resolve?

On the surface, this resolves problems that aren't too big of a deal
- Clean up redundant information in paths (e.g. `.////.//foo.rs` being `foo.rs`) which is just visual
- Switch paths with `\` in them to `/`

However, this is prep for #13713 where these will be a much bigger deal
- If the user does `./foo.rs`, we might fail to compare that with the list of files included in the package
- We'll generate paths with `\` and need to make sure the packages can still be used on Windows

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

### Additional information
2024-04-10 15:49:08 +00:00
bors
f99d24fee4 Auto merge of #13732 - epage:honor, r=Muscraft
refactor: Track when MSRV is explicitly set, either way

### What does this PR try to resolve?

This will hopefully help when merging between CLI and config with #13540.

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

### Additional information
2024-04-10 15:18:27 +00:00
Ed Page
2e75d66c7c refactor: Track when MSRV is explicitly set, either way
This will hopefully help when merging between CLI and config with #13540.
2024-04-10 08:34:41 -05:00
Weihang Lo
399f2c765c
chore: tell renovatebot to not touch openssl (temporarily) 2024-04-10 09:29:03 -04:00
Weihang Lo
80d0d94342
doc: add commment to summary_for_patch 2024-04-10 09:00:26 -04:00
Weihang Lo
f9786711a6
refactor: unify naming of keep closure 2024-04-10 09:00:26 -04:00
Weihang Lo
1717a35d25
chore: downgrade to openssl v1.1.1 (again)
See rust-lang#13546
2024-04-10 08:44:49 -04:00
Ed Page
8b593e5ba7 fix(package): Normalize path separators
A windows user could use `\` and no Linux or Mac user could use the
package.
This normalizes the separator to what works on all platforms.
2024-04-09 21:29:08 -05:00
Ed Page
5539293cf6 fix(package): Normalize paths in published Cargo.toml
For now, this is more for visual consistency.
However, this blocks #13713 as we need to be able to make these paths
comparable to what is included in the package.
2024-04-09 20:57:25 -05:00
Ed Page
4eea907733 test(package): Show behavior with backslashes 2024-04-09 13:44:25 -05:00
Weihang Lo
57c814eeda
refactor: extract patch registration to a function 2024-04-09 14:33:49 -04:00
Weihang Lo
e55c205aed
refactor: move to_avoid closure to cargo update 2024-04-09 01:17:31 -04:00
bors
bd1cf584af Auto merge of #13560 - heisen-li:build_flag, r=weihanglo
[fix]:Build script not rerun when target rustflags change

### What does this PR try to resolve?

Fixes https://github.com/rust-lang/cargo/issues/13003
2024-04-08 15:54:04 +00:00
bors
3d16d65e93 Auto merge of #13608 - epage:msrv-add, r=weihanglo
feat(add): Stabilize MSRV-aware version req selection

### What does this PR try to resolve?

This is part of #9930 for rust-lang/rfcs#3537

This will make it easier to maintain an MSRV-compliant `Cargo.toml` but leaves validation up to the user as the resolver will pick newer versions.
This helps the MSRV-aware workflows enumerated in
rust-lang/rfcs#3537

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

As for determining if this is ready for stabilization:

By stabilizing this without the MSRV-aware resolver, this could be confusing to the workflow with an MSRV-compatible lockfile.
PR #13561 at least raises awareness of that discrepancy.
In general there was interest in the RFC discussions to stabilize this ASAP, regardless of what resolver direction we went.

There is an unresolved question on differences in the resolver vs `cargo add` for dealing with an unset `rust-version` (noted in the tracking issue). However, we are only stabilizing the `cargo add` side which is a very light two-way door as this is a UX-focused command and not a programmatic command.

This hasn't gotten much end-user acceptance testing but, as its UX focused, that seems fine (light, two way door)

As such, this seems like it is ready to stabilize.

### Additional information
2024-04-08 15:20:12 +00:00
heisen-li
db7afeba4e
fix: rerun build script when target rustflags changed
fixes #13003
2024-04-08 10:48:20 -04:00
heisen-li
cdda9008a3
fix: show build script didnt rerun when target rustflags changed 2024-04-08 10:47:37 -04:00
bors
5da2858784 Auto merge of #13718 - ehuss:github-fast-path-redirect, r=weihanglo
Fix github fast path redirect.

This fixes the GitHub fast-path check to look up the sha of a git ref. At some point, GitHub changed the API to redirect to a different URL. Currently cargo is failing the fast-path lookup with 301 response code.

This can be tested in a project with a git dependency, and running `CARGO_LOG=cargo::sources::git::utils=debug cargo fetch` to verify it is picking up the fast path. This currently can't be tested in CI due to #13563.
2024-04-06 20:51:30 +00:00
Eric Huss
5836a96d3c Fix github fast path redirect. 2024-04-06 13:31:17 -07:00
bors
c00bbc1803 Auto merge of #13717 - ehuss:1.77.1-release-notes, r=weihanglo
Add release notes for 1.77.1

Somehow forgot to do this around release time.
2024-04-06 19:57:22 +00:00
Eric Huss
b820a8c0c3 Add release notes for 1.77.1 2024-04-06 12:49:37 -07:00
bors
ec2b323fda Auto merge of #13715 - weihanglo:remove-semverver, r=epage
doc(semver): remove mention of deprecated tool rust-semverver

See also

* https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Creating.20a.20release.20for.20rust-semverver
* https://github.com/rust-lang/team/pull/1390
* https://github.com/rust-lang/rust-semverver/issues/373
2024-04-06 14:36:42 +00:00
Weihang Lo
3c652b7bc0
doc(semver): remove mention of deprecated tool rust-semverver
See also

* https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Creating.20a.20release.20for.20rust-semverver
* https://github.com/rust-lang/team/pull/1390
* https://github.com/rust-lang/rust-semverver/issues/373
2024-04-06 10:12:37 -04:00
bors
ce3c14aaa6 Auto merge of #13714 - guqicun:master, r=weihanglo
chore: fix some typos
2024-04-06 13:55:46 +00:00
guqicun
663143593d chore: fix some typos
Signed-off-by: guqicun <guqicun@outlook.com>
2024-04-06 18:19:13 +08:00
bors
28e7b2bc0a Auto merge of #13701 - epage:refactor, r=weihanglo
refactor(toml): Decouple target discovery from Target creation

### What does this PR try to resolve?

This builds on #13693 so that the resolving of targets is easier to pull out into `resolve_toml` in prep for fixing #13456

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

### Additional information
2024-04-05 19:31:01 +00:00
Ed Page
ff4186836c refactor(toml): Use relative paths in resolved targets 2024-04-05 13:12:41 -05:00
Ed Page
f1f7bbf6ac refactor(toml): Simplify file/dir target inference 2024-04-05 13:12:41 -05:00
Ed Page
f38136eeca refactor(toml): Give higher level info to target inference 2024-04-05 13:12:41 -05:00
Ed Page
b6c7544bd9 refactor(toml): Avoid incomplete constant for bin dir name 2024-04-05 13:12:41 -05:00
Ed Page
b2ca065552 refactor(toml): Prefer common constant for bench dir name 2024-04-05 13:12:41 -05:00
Ed Page
f243c91f68 refactor(toml): Move target resolving up a level 2024-04-05 13:12:41 -05:00
Ed Page
e8f56df032 refactor(toml): Clarify meaning of target 'clean' fn's 2024-04-05 13:12:41 -05:00
Ed Page
8439a4b21a refactor(toml): Split target discovery from Target creation 2024-04-05 13:12:41 -05:00