19804 Commits

Author SHA1 Message Date
Weihang Lo
e3b5faaaef
Temporarily ignore cargo_test_doctest_xcompile_ignores (#15348)
This was broken due to a change in
https://github.com/rust-lang/rust/pull/138535. There is an approved PR
in https://github.com/rust-lang/rust/pull/138877 to fix it, but it may
take a day or two for it to make its way to nightly. This should be
reverted after it hits nightly.
2025-03-25 15:46:36 +00:00
Eric Huss
98a273f770 Temporarily ignore cargo_test_doctest_xcompile_ignores
This was broken due to a change in
https://github.com/rust-lang/rust/pull/138535. There is an approved PR
in https://github.com/rust-lang/rust/pull/138877 to fix it, but it may
take a day or two for it to make its way to nightly. This should be
reverted after it hits nightly.
2025-03-25 08:02:22 -07:00
Ed Page
cc585c0175
docs: fix typo in the "Shared cache" section (#15346)
### What does this PR try to resolve?
This PR addresses a typo in the "Shared cache" section. The word
"environmental" has been corrected to "environment" for proper grammar
in the phrase:
- "set `RUSTC_WRAPPER` environmental variable to `sccache`" → "set
`RUSTC_WRAPPER` environment variable to `sccache`".

### How should we test and review this PR?
Review the change in the relevant documentation section and verify that
the typo has been corrected. No functional changes are involved.

### Additional information
This is a simple grammar fix to ensure clarity in the documentation.
2025-03-22 11:18:54 +00:00
Darya
96523cb1b2
docs: fix typo in the "Shared cache" section 2025-03-22 13:08:47 +03:00
Weihang Lo
7d11b58efc
Fix some issues with future-incompat report generation (#15345)
This fixes various issues with the future-incompat report. In
particular, it addresses the off-by-one for the `--id` flag when the
report is already cached, and it doesn't recommend updating dependencies
when the error comes from a local crate. See each commit for more
details.

Fixes #15337
2025-03-22 00:24:49 +00:00
Eric Huss
0b2299e889 Remove an excess newline
The udpate_message already has a newline when it is there. When it is an
empty string, it ends up adding an unnecessary blank line.
2025-03-21 16:32:28 -07:00
Eric Huss
b17b9a4b90 Elaborate the full output when there are newer versions available
This output was never tested.
2025-03-21 16:32:28 -07:00
Eric Huss
4d961ed19c Don't show a suggestion to update dependencies
This removes the suggestion to update dependencies when the future
incompat error comes from the local crate. It doesn't make sense to
suggest that.
2025-03-21 16:32:28 -07:00
Eric Huss
497cfe5e48 Remove excess trailing space 2025-03-21 16:32:28 -07:00
Eric Huss
3fb97ecf28 Fix off-by-one error when future-incompat report is cached
This fixes a problem introduced by
https://github.com/rust-lang/cargo/pull/11648 where the future-incompat
report will tell you to run with an `--id` flag with the wrong value
if the report is already cached.

The solution is to add a method to determine which ID to use for the
suggestions *before* attempting to save the report.
2025-03-21 16:32:26 -07:00
Eric Huss
afdfd9263e Add some more explicit future-incompat tests
This updates some tests to include the full output for both a local
crate and a dependency.
2025-03-21 16:26:45 -07:00
Eric Huss
941c414a90 Add test for cached report id 2025-03-21 16:04:43 -07:00
Ed Page
307cbfda31
feat: Add custom completer for cargo <TAB> to complete aliases defined in config.toml (#15319)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

### What does this PR try to resolve?

Related to https://github.com/rust-lang/cargo/issues/14520

This PR introduces auto-completion for the `cargo <TAB>` option. When a
user types `cargo <TAB>` and presses the TAB key, the system will
automatically suggest aliases defined in `config.toml`

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

To verify this feature, follow these steps:
1. In the terminal, type `cargo <TAB>`
2. Press the TAB key.
3. You should see aliases suggestions

https://github.com/user-attachments/assets/d8a265e8-bbd9-4f58-8121-80caf142d8a6
2025-03-20 20:00:39 +00:00
Ed Page
7440762a78
fix(build-dir): Renamed workspace-manifest-path-hash to workspace-path-hash (#15334)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

### What does this PR try to resolve?

Small PR to rename `workspace-manifest-path-hash` to
`workspace-path-hash` in the build-dir template as mentioned
[here](https://github.com/rust-lang/cargo/issues/14125#issuecomment-2733611870)
(cc: #14125)

r? @epage
2025-03-20 19:51:15 +00:00
Weihang Lo
8364f7b687
feat: vcs, color, and message format native completion (#15322)
### What does this PR try to resolve?

Related to https://github.com/rust-lang/cargo/issues/14520

This PR introduces auto-completion for following options:
1. `--color` option with values: auto, always, never
2. `--vcs` option with values: git, hg, pijul, fossil, none
3. `--message-format` option with values: human, short, json,
json-diagnostic-short, json-diagnostic-rendered

Take `--color` as an example, when a user types ` cargo build --color
<TAB>`the system will automatically suggest auto, always, never

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

To verify this feature, follow these steps:
1. In the terminal, type `cargo build --color <TAB>` or `cargo new
my_project --vcs <TAB>` or `cargo check --message-format <TAB>`
2. Press the TAB key.
3. You should see option suggestions

https://github.com/user-attachments/assets/0cf12785-fdc0-4fb1-84b5-715c29a95e0e
2025-03-20 15:07:41 +00:00
NOOMA-42
3ea0e6b751
feat: vcs, color, and message format native completion 2025-03-20 22:16:27 +08:00
NOOMA-42
7e98310bbd
feat: Add custom completer for cargo <TAB> to complete aliases defined in config.toml 2025-03-20 15:04:00 +08:00
Ross Sullivan
5b077cb489
chore(build-dir): Renamed workspace-manifest-path-hash to workspace-path-hash 2025-03-20 12:16:40 +09:00
Weihang Lo
c746f164fe
Fix [env] relative description in reference (#15332)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

Current short description does not match reality nor the longer
description:
> Setting the relative flag evaluates the value as a config-relative
path that is relative to the parent directory of the .cargo directory
that contains the config.toml file. The value of the environment
variable will be the full absolute path.
2025-03-20 00:00:55 +00:00
Mingwei Samuel
f72e3a271b
Update config.md 2025-03-19 14:57:45 -07:00
Mingwei Samuel
826234c151
Fix [env] relative description in reference 2025-03-19 14:52:23 -07:00
Ed Page
aca563aad3
chore: fix some typos (#15329)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

 fix some typos
2025-03-19 13:55:32 +00:00
pudongair
6c7c360dec chore: fix some typos
Signed-off-by: pudongair <744355276@qq.com>
2025-03-19 21:05:18 +08:00
Weihang Lo
662213b095
Cleanup for rustc-link-arg-cdylib (#15326)
This does a little bit of cleanup around rustc-link-arg-cdylib build
script instruction:

* Reorders the documentation so that it is consistent.
* Updates the documentation to mention both the new
(`rustc-link-arg-cdylib`) and old (`rustc-cdylib-link-arg`) forms are
documented, with the new form as the primary form.
* Adds a test for the old form, since we didn't have any.

Somehow I missed all this in
https://github.com/rust-lang/cargo/pull/8441 and
https://github.com/rust-lang/cargo/pull/9557.
2025-03-19 01:28:37 +00:00
Eric Huss
5516ffa1c3 Add a test for rustc-cdylib-link-arg
We didn't have any tests that included the old `rustc-cdylib-link-arg`
form.
2025-03-18 16:28:09 -07:00
Eric Huss
9c2e8302fc Make rustc-link-arg-cdylib the standard form
This form has the consistent pattern of `rustc-link-arg-$KIND`.
The old, original `rustc-cdylib-link-arg` is just an alias.
2025-03-18 16:28:08 -07:00
Eric Huss
21d58d4f14 Reorder the rustc-link-arg sections
This reorders these sections so they are presented in a logical order,
and matches the summary at the top.
2025-03-18 16:28:08 -07:00
Eric Huss
01c529349b
fix(toml): Report '<target>.edition' deprecation to users (#15321)
### What does this PR try to resolve?

This is a part of rust-lang/cargo#15283

In the RFC, I mentioned this might be blocked on #12235.
In hindsight, the use of this is [rare
enough](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Deprecate.20build-target.20.60edition.60.20field.3F/near/499047806)
that I suspect we can go ahead and warn without user controllable lints.

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

### Additional information
2025-03-18 19:13:03 +00:00
Ed Page
fb3b37b3a7
test(build-std): address overly-matched snapshot (#15325)
Still trying to bisect what went wrong,
but this should be fairly safe to merge.

Failed on nightly-2025-03-18 but not nightly-2025-03-17 btw.
2025-03-18 18:29:25 +00:00
Weihang Lo
b65e1dde25
test(build-std): address overly-matched snapshot
Still trying to bisect what went wrong,
but this should be fairly safe to merge.

Failed on nightly-2025-03-18 but not nightly-2025-03-17 btw.
2025-03-18 13:55:52 -04:00
Ed Page
68c26f6c3f
Added build.build_dir templating support (#15236)
### What does this PR try to resolve?

This PR is a follow up on #15104 and and adds support for the path
templating in `build.build-dir` as defined in #14125.

Supported templates:
* `{workspace-root}`
* `{cargo-cache}` (pointing to `CARGO_HOME` for now)
* `{workspace-manifest-path-hash}`

#### Unresolved questions

What should we name `{workspace-manifest-path-hash}` and what should it
include? Should we shorten to `{workspace-hash}` or even just `{hash}`?
Should we include the Cargo version so we get unique whole-target
directories for easier cleanup (#13136)

How should this handle unknown variables (error) or unclosed `{` / `}`
(ignored), see
https://github.com/rust-lang/cargo/pull/15236#discussion_r1977898973

When using `{workspace-manifest-path-hash}` this hash will change based
on the project path. In the event of a cargo being executed in a
symlinked project, the hash will change.

For example, given the following directory
```
/Users/
└─ user1/
    └─ projects/
        ├─ actual-crate/
        │  └─ Cargo.toml
        └─ symlink-to-crate/ -> actual-crate/
```

the hash will be unique when running cargo from each of the following
directories.
* `/Users/user1/actual-crate`
* `/Users/user1/symlink-to-crate`

Figuring out whether to handle this is deferred out, see
- https://github.com/rust-lang/cargo/pull/15236#discussion_r1971938021
-
https://github.com/poliorcetics/rfcs/blob/cargo-target-directories/text/3371-cargo-target-dir-templates.md#symbolic-links
-
https://github.com/rust-lang/cargo/issues/12207#issuecomment-2711402159

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

This PR is fairly small. I included tests for each template variable.

You can also clone my branch and test it locally with
```console
CARGO_BUILD_BUILD_DIR='{workspace-root}/foo' cargo -Z build-dir build
```

### Additional information

While searching Cargo for any prior art for path templating, I found
[`sources/registry/download.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/sources/registry/download.rs#L84)
doing a simple string replace. Thus I followed the same behavior.

r? @epage
2025-03-17 18:29:17 +00:00
Ed Page
40a4d1e87f
docs: make it clearer that rust_version is enforced during compile (#15303)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them. -->

### What does this PR try to resolve?

The current wording makes it sound like Cargo will only refuse to
compile the package if it encounters any missing functionality in stdlib
while compiling the package on an unsupported toolchain. However, cargo
will actually refuse to build the package unless overridden or the
toolchain is updated.

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

No tests are required or applicable for this PR unless I am mistaken

### Additional information
2025-03-17 17:02:23 +00:00
Eric Park
51283b8ccb
Update with suggestion from @epage
Co-authored-by: Ed Page <eopage@gmail.com>
2025-03-17 12:32:30 -04:00
Ed Page
083dc92b0e
feat: Add custom completer for cargo +<TAB> to complete toolchain name (#15301)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

### What does this PR try to resolve?

Related to https://github.com/rust-lang/cargo/issues/14520

This PR introduces auto-completion for the `cargo +<TAB>` option. When a
user types `cargo +<TAB>` and presses the TAB key, the system will
automatically suggest toolchain in current device

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

To verify this feature, follow these steps:
1. In the terminal, type `cargo +<TAB>`
2. Press the TAB key.
3. You should see toolchain suggestions

https://github.com/user-attachments/assets/c8bd8a5e-e97d-4d0a-b284-1ed52734c4a2
2025-03-17 16:31:36 +00:00
Weihang Lo
26a87d6b09
chore: fix some typos (#15316)
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

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

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

 fix some typos
2025-03-16 13:26:59 +00:00
jimmycathy
20a05ba9e1 chore: fix some typos
Signed-off-by: jimmycathy <clonecode@outlook.com>
2025-03-16 12:26:08 +08:00
Weihang Lo
437ff042f4
fix: deduplicate crate types in cargo rustc command (#15314)
### What does this PR try to resolve?

close: #15312

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

deduplicate `crate-type` in cargo `rustc` command
2025-03-16 00:21:21 +00:00
Frank Wang
36de02f4a6 fix: deduplicate and update snapshot 2025-03-15 17:55:15 -05:00
Frank Wang
b8849dcb74 add test for duplicate crate-type arg 2025-03-15 17:51:18 -05:00
Ross Sullivan
229489e9b3
Added invalid variable validation for build.buil-dir path templating.
This commit adds logic to check for unexpected variables in templated
paths like `build.build-dir`. Cargo will error if it finds a variable
that it does not know how to expand.
2025-03-15 17:24:45 +09:00
Ross Sullivan
76e54339f7
Added test for unknown templating variables 2025-03-15 17:24:40 +09:00
Ed Page
c13453ffda fix(toml): Report '<target>.edition' deprecation to users
In hindsight, the use of this is rare enough that we can go ahead and
warn without user controllable lints.
2025-03-15 03:04:18 -05:00
NOOMA-42
1cea458703
feat: Add custom completer for cargo +<TAB> to complete toolchain name 2025-03-15 16:02:09 +08:00
Weihang Lo
3e96f1a28e
docs: mention wrong URLs as a cause of git authentication errors (#15304)
I was seeing an error like the following in my `rust-analyzer` output.

```
error: failed to load source for dependency `fontdue`

Caused by:
  Unable to update https://github.com/xiphseer/fontdue.git?rev=67b963af0d5ca9e09bfeb0b5a9adf85c302d0a67

Caused by:
  failed to fetch into: /home/daniel/.local/share/cargo/git/db/fontdue-4d0b06b88bb2e092

Caused by:
  revision 67b963af0d5ca9e09bfeb0b5a9adf85c302d0a67 not found

Caused by:
  failed to authenticate when downloading repository

  * attempted to find username/password via git's `credential.helper` support, but failed

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  failed to acquire username/password from local configuration
```

I spent about 10 minutes reading the docs on *git authentication*,
before realizing I had just typo'ed my own GitHub username. This PR adds
a note to the reference that explicitly mentions wrong (not malformed)
URLs as a cause of authentication errors.

It's not directly on the linked
<https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli>
mainly because *Git Authentication* is already linked there, so it may
catch more people and that's meant as the more detailed explanation
anyway.
2025-03-15 03:07:33 +00:00
Ed Page
6cf8267012
feat(package): add --exclude-lockfile flag (#15234)
### What does this PR try to resolve?

Fixes #15059
Fixes #15159

This provides an escape hatch `--exclude-lockfile`for uncommon workflows
that don't verify (`--no-verify` is passed) the build with their
unpublished packages
In effect, this takes the heuristic removed in #14815 and replaces it
with a flag

When `--exclude-lockfile` is enabled,
`cargo package` will not verify the lock file if present,
nor will it generate a new one if absent.
Cargo.lock will not be included in the resulting tarball.

Together with `--no-verify`,
this flag decouples packaging from checking the registry index.
While this is useful for some non-normal workflows that requires
to assemble packages having unpublished dependencies.
It is recommended to use `-Zpackage-workspace` to package the entire
workspace, instead of opting out lockfile.

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

The first commit was stolen from
<1a104b5444>
(credit to @NoisyCoil!)

The second added two failing cases we observed in #15059.

### Additional information
2025-03-14 15:25:36 +00:00
Ross Sullivan
ba4df9f86b
Implemented templating support for build.build-dir 2025-03-14 20:11:51 +09:00
Ross Sullivan
d0a3ec7366
Added build_dir templating tests.
This is in preparation for adding templating suppport to
the `build.build-dir` configuration option.
2025-03-14 20:11:51 +09:00
Weihang Lo
ca694a8b89
Redox OS is part of the unix family (#15307) 2025-03-14 05:02:38 +00:00
Weihang Lo
44277a48be
docs(ref): Mention x.y.* as a kind of version requirement to avoid. (#15310)
This expands the text introduced by #12323.

`x.y.*` is equivalent to `>=x.y.0, <x.(y+1).0`, so it can create an
unresolvable conflict in the same way as already discussed.

I also added a little punctuation to improve the structure of some
nearby sentences.

@rustbot label A-documenting-cargo-itself
2025-03-14 05:00:37 +00:00
Kevin Reid
c0cc00390b
Also mention tilde requirements. 2025-03-13 21:18:29 -07:00