18889 Commits

Author SHA1 Message Date
bors
42a774bb8a Auto merge of #14657 - ehuss:deprecate-build-plan, r=epage
Document build-plan as being deprecated

This adds a note to the build-plan documentation that it is deprecated. I do not think it will make any progress as it is. In the future, we should remove the feature (#7902), possibly with a code-warning ahead of time.
2024-10-08 16:07:10 +00:00
Eric Huss
bc2eba1333 Document build-plan as being deprecated 2024-10-08 08:57:17 -07:00
shannmu
245cba27db feat: Add custom completer for completing registry name 2024-10-08 23:50:00 +08:00
bors
9026f9565c Auto merge of #14653 - epage:complete, r=ehuss
fix(complete): Don't complete files for any value

### What does this PR try to resolve?
We now need to opt-in to path completions for values, which can be as simple as setting the value parser to be for `PathBuf`s.

We'll now show a lot less irrelevant completions.

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

### Additional information
2024-10-08 15:35:41 +00:00
bors
aea3404eae Auto merge of #14614 - x-hgg-x:more-sat-resolver-tests, r=Eh2406
Add more SAT resolver tests

### What does this PR try to resolve?

This is a follow-up of #14583.

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

* Commit 1 splits tests into smaller modules.
* Commit 2 adds more helper trait methods.
* Commit 3 refactors computation of the SAT clauses, by introducing intermediate boolean variables for each dependency and each dependency feature declared in a package.
The old behavior was incorrect: package features specified in an optional dependency were activated if the package was activated, even if the dependency wasn't activated.
* Commit 4 add tests from https://github.com/Eh2406/pubgrub-crates-benchmark/tree/main/out/index_ron.

r? Eh2406
2024-10-08 14:25:42 +00:00
bors
fbcd9bb571 Auto merge of #14464 - linyihai:issue-14194, r=weihanglo
fix: avoid inserting duplicate `dylib_path_envvar` when calling `cargo run` recursively

### What does this PR try to resolve?

If the current program started by `cargo run` recursively call into `cargo run`, the second `cargo run` will insert  `search_path`  into `dylib_path_envvar` again.

Fixes #14194

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

The first commit adds the test to reflect the issue. The first call to `cargo run` stores the dylib search path env var to a file. Subsequent calls verify that env var remains the same.

The second commit fixes the behavior by checking if env vars in `search_path` are a prefix of the slice of env vars in `dylib_path_envvar`.
2024-10-08 12:51:33 +00:00
Lin Yihai
54dbc2bf66 fix: Avoid inserting search_path again. 2024-10-08 16:20:21 +08:00
Lin Yihai
e888c1306f test: Add test for issue-14194 2024-10-08 16:16:25 +08:00
x-hgg-x
dedf251c27 test: add tests from pubgrub 2024-10-08 08:06:15 +02:00
x-hgg-x
870f6d31d7 test: refactor sat resolver clauses computation
Add new intermediate boolean variables for each dependency and each dependency feature declared in a package.
This is used to simplify computation of the sat clauses.

Add support for multiple dependencies with the same name, if their kind or target is different.

A non-weak dependency feature for an optional dependency now activates a feature of the same name in the sat resolver.
2024-10-08 08:04:43 +02:00
x-hgg-x
04e4270758 test: add more resolver helper methods 2024-10-08 08:04:43 +02:00
x-hgg-x
cc4c3e784a test: separate resolver tests into multiple files 2024-10-08 08:04:43 +02:00
Ed Page
244578e9e2 fix(complete): Don't complete files for any value
We now need to opt-in to path completions for values, which can be as
simple as setting the value parser to be for `PathBuf`s.

We'll now show a lot less irrelevant completions.
2024-10-07 21:01:03 -05:00
bors
2e309bd754 Auto merge of #14489 - rust-lang:dependabot/cargo/gix-path-0.10.10, r=weihanglo
chore(deps): bump gix-path from 0.10.9 to 0.10.11

Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.9 to 0.10.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/Byron/gitoxide/releases">gix-path's releases</a>.</em></p>
<blockquote>
<h2>gix-path v0.10.10</h2>
<p>A maintenance release without user-facing changes.</p>
<h3>Commit Statistics</h3>
<ul>
<li>6 commits contributed to the release over the course of 12 calendar days.</li>
<li>35 days passed between releases.</li>
<li>0 commits were understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li>
<li>0 issues like '(#ID)' were seen in commit messages</li>
</ul>
<h3>Commit Details</h3>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<ul>
<li><strong>Uncategorized</strong>
<ul>
<li>Prepare changelogs prior to release (0f25841)</li>
<li>Merge pull request <a href="https://redirect.github.com/Byron/gitoxide/issues/1523">#1523</a> from martinvonz/push-xmsuurxprnnw (83c9de0)</li>
<li>Remove <code>--system</code> from <code>git config</code> call as it fails on MacOS (6b1c243)</li>
<li>Run <code>git config -l</code> in temp dir when looking up system config (20ef4e9)</li>
<li>Merge branch 'push-ysnqkzlzwuwq' (e2c747d)</li>
<li>Don't show console on Windows (087594c)</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d19af16e1d"><code>d19af16</code></a> Release gix-date v0.9.0, gix-actor v0.31.6, gix-validate v0.9.0, gix-object v...</li>
<li><a href="0f2584178a"><code>0f25841</code></a> prepare changelogs prior to release</li>
<li><a href="9ed2b24e5d"><code>9ed2b24</code></a> Merge branch 'improvements'</li>
<li><a href="6990afd269"><code>6990afd</code></a> fix: similarity detection</li>
<li><a href="f8c5d9ce87"><code>f8c5d9c</code></a> fix similarity detection</li>
<li><a href="25a3f1b0b0"><code>25a3f1b</code></a> Merge pull request <a href="https://redirect.github.com/Byron/gitoxide/issues/1531">#1531</a> from EliahKagan/progress-typos</li>
<li><a href="ba72ee0f06"><code>ba72ee0</code></a> fix!: better peeling performance for reference traversal.</li>
<li><a href="9f9feb6545"><code>9f9feb6</code></a> add progress report for July</li>
<li><a href="b31d6b79fd"><code>b31d6b7</code></a> Fix typos in config support info</li>
<li><a href="242fedc973"><code>242fedc</code></a> Merge branch 'improvements'</li>
<li>Additional commits viewable in <a href="https://github.com/Byron/gitoxide/compare/gix-path-v0.10.9...gix-path-v0.10.10">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gix-path&package-manager=cargo&previous-version=0.10.9&new-version=0.10.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-lang/cargo/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
2024-10-08 00:07:37 +00:00
dependabot[bot]
7a58e6fbd0
chore(deps): bump gix-path from 0.10.9 to 0.10.11
Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.9 to 0.10.11.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-path-v0.10.9...gix-path-v0.10.11)

---
updated-dependencies:
- dependency-name: gix-path
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 19:24:32 -04:00
bors
ab361f24a3 Auto merge of #14647 - elchukc:refactor_pkg_activated_features, r=weihanglo
improve error reporting when feature not found in `activated_features`

Pulls the error message refactor out of #14593 (originally #13207) to improve error reporting when we fail to get the list of activated features enabled for the given package. It now fully lists the activated_features hashmap keys too.

From the [original author](https://github.com/rust-lang/cargo/pull/13207#issue-2056019109):

> I moved `activated_features_int` into `activated_features` and `activated_features_unverified` as I was concerned of the performance cost of generating the full error when its not a fatal error and may occur many times.

Old vs new error message:
```diff
- activated_features for invalid package: features did not find PackageId { name: "bindep", version: "0.0.0", source: "[ROOT]/foo/bindep" } NormalOrDev
+ did not find features for (PackageId { name: "bindep", version: "0.0.0", source: "[ROOT]/foo/bindep" }, NormalOrDev) within activated_features:
+ [
+     (
+         PackageId {
+             name: "bindep",
+             version: "0.0.0",
+             source: "[ROOT]/foo/bindep",
+         },
+         ArtifactDep(
+             CompileTarget {
+                 name: "[ALT_TARGET]",
+             },
+         ),
+     ),
+     (
+         PackageId {
+             name: "foo",
+             version: "0.0.0",
+             source: "[ROOT]/foo",
+         },
+         NormalOrDev,
+     ),
+ ]
```
r? weihanglo
2024-10-05 21:29:43 +00:00
Lucas Kent
1623c414ad improve error reporting when feature not found in activated_features 2024-10-05 17:10:54 -04:00
bors
ad074abe3a Auto merge of #14576 - epage:tests, r=weihanglo
test: Remove the last of our custom json assertions

### What does this PR try to resolve?

This is part of #14039 and consolidates us down to only one way of doing json assertions, using snapbox.

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

### Additional information
2024-10-04 18:18:15 +00:00
Ed Page
498d4df89f docs(ref): Document MSRV-aware resolver 2024-10-04 12:49:28 -05:00
Ed Page
0498e84f89 feat: Stabilize MSRV-aware resolver config
This includes
- `cargo generate-lockfile --ignore-rust-version`
- `cargo update --ignore-rust-version`

This does not include
- `edition = "2024"`
- `resolver = "3"`
2024-10-04 12:49:28 -05:00
bors
e1179b5507 Auto merge of #14636 - epage:msrv-policy, r=weihanglo
docs(ref): Expand on MSRV

### What does this PR try to resolve?

The need for this has been growing and becomes especially important with the upcoming MSRV aware resolver
We will be making having an MSRV easier so we need to meet those maintainers where they are and help them.

In particular, this covers
- What setting an MSRV does
- What "support" in MSRV means, according to the definition we developed during the review of [RFC 3537](https://rust-lang.github.io/rfcs/3537-msrv-resolver.html)
- Background and guidance on setting an MSRV policy

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

### Additional information

This intentionally leaves out anything related to the MSRV-aware resolver as that will be handled as the feature is stabilized.
2024-10-04 17:04:01 +00:00
Ed Page
c3f19a8ec1 refactor(test): Migrate validate_upload to snapbox for json comparisons 2024-10-03 21:15:10 -05:00
Ed Page
01a47f3c4d fix(test): Remove unused, deprecated with_json 2024-10-03 21:15:10 -05:00
Ed Page
c18765a152 test: Migrate remaining build with_json tests to snapbox 2024-10-03 21:15:10 -05:00
Ed Page
f92e54faf9 test: Migrate remaining metadata with_json tests to snapbox 2024-10-03 21:15:10 -05:00
Ed Page
01e138fc0e chore: Update snapbox 2024-10-03 21:09:18 -05:00
Ed Page
b48e5f1e5f docs(ref): Step users through MSRV policies 2024-10-03 16:14:11 -05:00
Ed Page
9ae75338c1 docs(ref): Set Rust version support expectations 2024-10-03 16:14:11 -05:00
Ed Page
17ecc17ea9 docs(ref): Expand on uses of Rust version 2024-10-03 16:14:11 -05:00
Ed Page
e38e966d0d docs(ref): Change from rust-version from compilation to support 2024-10-03 16:14:10 -05:00
Ed Page
1652c3bdb2 docs(ref): Split rust-version into its own chapter 2024-10-03 16:11:52 -05:00
bors
0473ee8b87 Auto merge of #14620 - epage:guideless, r=weihanglo
docs: Minor re-grouping of pages

### What does this PR try to resolve?

In figuring out where MSRV documentation should live, I found the location of some items confusing
- Publishing is written in more of a guide-form, rather than reference
- Caching is written in more of a reference form, rather than a guide, and is more advanced
- Dependency references were scattered, making it harder to find

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

### Additional information
2024-10-03 20:01:11 +00:00
bors
a06986cda6 Auto merge of #14638 - epage:msrv-feat, r=ehuss
docs(ref): Highleft whats left for msrv-policy

### What does this PR try to resolve?

While there is a tracking issue for these,
I didn't want to have everything under `msrv-policy` to be stabilized,
making it look like it should be moved to the Stable section of the
page, when there are independently stabilizable pieces missing.

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

### Additional information

This is prep for stabilizing MSRV-aware resover
2024-10-03 16:45:54 +00:00
Ed Page
cb2bcc938b docs(ref): Highleft whats left for msrv-policy
While there is a tracking issue for these,
I didn't want to have everything under `msrv-policy` to be stabilized,
making it look like it should be moved to the Stable section of the
page, when there are independently stabilizable pieces missing.
2024-10-03 10:17:46 -05:00
Ed Page
ade52cfe3f docs(ref): Have msrv-policy feature link to RFC 2024-10-03 10:13:52 -05:00
Ed Page
3a0236fb90 docs: Group dep related references 2024-10-03 08:23:46 -05:00
Ed Page
1dde071548 docs: Move Cache topic from Guide to Reference
It doesn't "guide" people through a topic but explains in a more
top-down fashion what caches exist and is not particularly a common
topic people need to know.
2024-10-03 08:23:45 -05:00
Ed Page
a3eaa4b92b docs: Move publishing from ref to guide 2024-10-03 08:23:03 -05:00
bors
8725e78484 Auto merge of #14637 - nyurik:patch-1, r=weihanglo
Fix `cargo:version_number` - has only one `:`

See [openssl code](8d60e21146/openssl-sys/build/main.rs (L392)) -- it uses a single colon. Also inlined arg into format to make it a bit more consice.

```rust
let openssl_version = openssl_version.unwrap();
println!("cargo:version_number={:x}", openssl_version);
if openssl_version >= 0x4_00_00_00_0 {
...
```
2024-10-03 04:05:40 +00:00
Yuri Astrakhan
f64f11d518
Update src/doc/src/reference/build-script-examples.md
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2024-10-02 23:59:40 -04:00
Yuri Astrakhan
3654e61843
Fix cargo:version_number - has only one :
See [openssl code](8d60e21146/openssl-sys/build/main.rs (L392)):

```rust
let openssl_version = openssl_version.unwrap();
println!("cargo:version_number={:x}", openssl_version);
if openssl_version >= 0x4_00_00_00_0 {
...
```
2024-10-02 22:48:33 -04:00
bors
2652990f5f Auto merge of #14600 - epage:charter-crates, r=weihanglo
docs: Declare support level for each crate in our Charter / docs

### What does this PR try to resolve?

This is to bring us into conformance with the [Rust crate ownership policy](https://forge.rust-lang.org/policies/crate-ownership.html).

Items of note
- `cargo` does not have a status specified on it.  `cargo install cargo` shouldn't be done and `cargo add cargo` is "internal" but putting in our README that Cargo is "internal" feels weird from a messaging perspective.
- `cargo-credential-1password` is declared as Experimental as it is intended for the community but I was unsure if we wanted to commit to full support for it.  In my mind, the ideal thing to do would be to expatriate this to 1password.
- `home` is declared as Internal despite its wide use within the ecosystem.
- `cargo-credential` is declared as Intentional as its an API intended for the wider ecosystem and I didn't see a reason to declare it experimental.
- `cargo-platform`, `cargo-util-schemas`, and `crates-io` are declared as Intentional as they are both used internally and intended for others to use for logic that integrates with cargo/registries. I wondered about these being Experimental or Internal instead.

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

I was mixed on what to do with unpublished crates (and didn't fully check what all is unpublished).
I ended up only skipping xtasks.

### Additional information
2024-10-02 18:58:49 +00:00
bors
d9c14e664e Auto merge of #14632 - xzfc:tar-0.4.42, r=weihanglo
chore(deps): update tar to 0.4.42

The new version of tar enables the creation of sparse tar archives by default.  The ability to read such sparse entries was added in tar 0.4.6, which has been in use starting from Cargo 0.13 and Rust 1.12. Additionally, `docker cp` doesn't support sparse tar entries in the GNU format.  For compatibility with older versions of Rust and Cargo, as well as with `docker cp`, this commit disables sparse archive creation everywhere the `tar::Builder` is used.

Closes #14594. CC: `@weihanglo,` `@alexcrichton.`
2024-10-02 04:34:21 +00:00
xzfc
0c74d2449d chore(deps): update tar to 0.4.42
The new version of tar enables the creation of sparse tar archives by
default.  The ability to read such sparse entries was added in tar
0.4.6, which has been in use starting from Cargo 0.13 and Rust 1.12.
Additionally, `docker cp` doesn't support sparse tar entries in the GNU
format.  For compatibility with older versions of Rust and Cargo, as
well as with `docker cp`, this commit disables sparse archive creation
in the corresponding cases where the `tar::Builder` is used.  See
#14594.
2024-10-02 03:27:27 +00:00
bors
ac3de0b147 Auto merge of #14599 - epage:charter, r=weihanglo
docs(charter): Declare new Intentional Artifacts as 'small' changes

### What does this PR try to resolve?

The default stance for new "Intentional Artifact" crates is that an RFC is needed, see [Crate ownership policy](https://forge.rust-lang.org/policies/crate-ownership.html).
However, it gives room for team's to have their charter define the process.  As we don't generally need wide input for these decisions, I'm proposing we treat these as "small" changes and only require an FCP.

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

### Additional information
2024-10-01 23:53:12 +00:00
bors
fd5f1a05c1 Auto merge of #14630 - epage:implicit-removal, r=weihanglo
fix: Remove implicit feature removal

### What does this PR try to resolve?

Due to problems we ran into with #14016, we're removing implicit features from the 2024 edition to give ourselves more time to design it as we should.

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

### Additional information

I could have added a new flag for this or made an EditionNext but I decided to remove it in the hopes to avoid any path dependency in solving this the next time.
2024-10-01 20:06:46 +00:00
bors
8fdd7f4b78 Auto merge of #14631 - weihanglo:config-cli, r=epage
docs(config): make `--config <PATH>` more prominent
2024-10-01 19:33:51 +00:00
Weihang Lo
b4253e5057
fix(help): mention --config <PATH> in help text 2024-10-01 14:54:52 -04:00
bors
135ea1c653 Auto merge of #14624 - rust-lang:renovate/unicode-width-0.x, r=epage
chore(deps): update rust crate unicode-width to 0.2.0

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [unicode-width](https://redirect.github.com/unicode-rs/unicode-width) | workspace.dependencies | minor | `0.1.13` -> `0.2.0` |

---

### Release Notes

<details>
<summary>unicode-rs/unicode-width (unicode-width)</summary>

### [`v0.1.14`](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

[Compare Source](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-10-01 18:51:23 +00:00
Weihang Lo
6269ab4dd9
docs(config): make --config <PATH> more prominent 2024-10-01 14:31:10 -04:00