Commit Graph

17362 Commits

Author SHA1 Message Date
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
Ed Page 36891bacfd refactor(toml): Move unique name validation out of resolving 2024-04-05 13:12:41 -05:00
Ed Page 943f9bc871 refactor(toml): Track paths in TomlTarget, rather than next to it 2024-04-05 13:12:41 -05:00
Ed Page c699941d13 refactor(toml): Move bin resolving up a level 2024-04-05 13:12:41 -05:00
Ed Page 72ee140548 refactor(toml): Split bin discovery from Target creation 2024-04-05 13:12:41 -05:00
Ed Page b061bc5e83 refactor(toml): Abstract out bin name validation 2024-04-05 13:12:41 -05:00
Ed Page f2b0678436 refactor(toml): Pull out legacy_bin_path 2024-04-05 13:12:41 -05:00
Ed Page b08d19779c refactor(toml): Move lib resolving up a level 2024-04-05 13:12:41 -05:00
Ed Page f900b3f776 refactor(toml): Split lib discovery from Target creation 2024-04-05 13:12:41 -05:00
Ed Page 019bae2efb refactor(toml): Consolidate lib discovery 2024-04-05 13:12:41 -05:00
Ed Page 6ef9779752 refactor(toml): Abstract out lib name validation 2024-04-05 13:12:41 -05:00
Ed Page 74e8d760f0 refactor(toml): Simplify lib resolving 2024-04-05 13:12:41 -05:00
Ed Page b86b4b4fe5 refactor(toml): Clarify conversion nature of target fn's 2024-04-05 13:12:41 -05:00
Ed Page d3cfa7fc75 refactor(toml): Clarify which manifest is being used 2024-04-05 13:12:41 -05:00
Ed Page cc9710e957 refactor(toml): Be consistent in readme resolve name 2024-04-05 13:12:41 -05:00
Ed Page 71e362fb17 test(package): Clean up a build.rs test 2024-04-05 13:12:41 -05:00
bors 157066631b Auto merge of #13706 - WaffleLapkin:don't-the-err, r=epage
Don't depend on `?` affecting type inference in weird ways

This is likely to stop working in the future versions of Rust, see https://github.com/rust-lang/rust/pull/122412#issuecomment-2037813927.
2024-04-05 00:14:02 +00:00
Maybe Waffle 898969e4a4 Don't depend on `?` affecting type inference in weird ways 2024-04-04 23:56:01 +00:00