Eric Huss
dffa757620
Add test for unexpected stray files in the caches
2025-02-05 14:10:43 -08:00
Ed Page
f6514977ef
feat: add cargo pkgid
support for cargo-script ( #14961 )
...
### What does this PR try to resolve?
close https://github.com/rust-lang/cargo/issues/14831
In this PR, we added the `cargo pkgid` support for the cargo-script.
For the package itself:
```console
cargo pkgid --manifest-path foo.rs
path+file:///my-project/foo.rs/foo#0.86.0
```
For its dependence:
```console
cargo pkgid --manifest-path foo.rs -p sqlx
registry+https://github.com/rust-lang/crates.io-index#sqlx@0.7.4
```
### How should we test and review this PR?
I have updated the unit tests and also added more test cases for it.
### Additional information
None
2025-02-04 19:52:07 +00:00
Ed Page
83c11eebef
Suggest similar feature names on CLI ( #15133 )
...
### What does this PR try to resolve?
When you typo a feature name on the CLI, the error message isn't very
helpful. Concretely, I was testing a PR which adds a feature called
`cosmic_text` to enable a `cosmic-text` dependency, and got a correct
but unhelpful error message:
```rust
error: Package `scenes v0.0.0 ([ELIDED]/linebender/vello/examples/scenes)` does not have feature `cosmic-text`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
```
I had to dig into the Cargo.lock file to find out how to fix this.
### How should we test and review this PR?
Observe the new test cases
2025-02-04 19:44:26 +00:00
Daniel McNab
378f021a34
Suggest relevant feature names on the CLI
...
The left-aligned error message is there to
workaround rustfmt refusing to format files
which contain string literals which are too
wide. I have not found a consistent way to
fix this behaviour, but left-aligning does
resolve it in this case. I believe that this
should have an explanatory comment, but code
review determined that to be "noise" and so
I removed it.
2025-02-04 18:33:15 +00:00
Daniel McNab
b0dc18d158
Add new tests
2025-02-04 18:24:48 +00:00
Weihang Lo
f327379622
fix: Don't use "did you mean" in errors ( #15138 )
...
### What does this PR try to resolve?
This is an attempt at moving Cargo closer to [rustc's diagnostic
guide](https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide )
(clap already did this)
> Suggestions should not be a question. In particular, language like
"did you mean" should be avoided. Sometimes, it's unclear why a
particular suggestion is being made. In these cases, it's better to be
upfront about what the suggestion is.
>
> Compare "did you mean: Foo" vs. "there is a struct with a similar
name: Foo".
### How should we test and review this PR?
### Additional information
I did leave behind three "did you mean"s as I was a little less sure in
how to handle them
2025-02-04 17:16:54 +00:00
Ed Page
e78a8a19db
fix: Align new help messages with their error
2025-02-04 10:46:09 -06:00
Rustin170506
9fe45b2010
test: add a test for error handling in script installation
...
Signed-off-by: Rustin170506 <techregister@pm.me>
2025-02-04 22:57:12 +08:00
Rustin170506
91da8dba0d
fix: better error message for using the script as a dep
...
Signed-off-by: Rustin170506 <techregister@pm.me>
2025-02-04 22:57:06 +08:00
Weihang Lo
3f48c221b9
Fix changelog link ( #15142 )
...
I accidentally copied the wrong link here.
2025-02-04 14:41:36 +00:00
Eric Huss
e3d24276d5
Fix changelog link
2025-02-04 06:11:14 -08:00
Ed Page
6d1f6be115
chore(deps): update rust crate rand to 0.9.0 ( #15129 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [rand](https://rust-random.github.io/book )
([source](https://redirect.github.com/rust-random/rand )) |
workspace.dependencies | minor | `0.8.5` -> `0.9.0` |
---
### Release Notes
<details>
<summary>rust-random/rand (rand)</summary>
###
[`v0.9.0`](https://redirect.github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#090---2025-01-27 )
[Compare
Source](https://redirect.github.com/rust-random/rand/compare/0.8.5...0.9.0 )
##### Security and unsafe
- Policy: "rand is not a crypto library"
([#​1514](https://redirect.github.com/rust-random/rand/issues/1514 ))
- Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead,
it is recommended to call `ThreadRng::reseed` on fork.
([#​1379](https://redirect.github.com/rust-random/rand/issues/1379 ))
- Use `zerocopy` to replace some `unsafe` code
([#​1349](https://redirect.github.com/rust-random/rand/issues/1349 ),
[#​1393](https://redirect.github.com/rust-random/rand/issues/1393 ),
[#​1446](https://redirect.github.com/rust-random/rand/issues/1446 ),
[#​1502](https://redirect.github.com/rust-random/rand/issues/1502 ))
##### Dependencies
- Bump the MSRV to 1.63.0
([#​1207](https://redirect.github.com/rust-random/rand/issues/1207 ),
[#​1246](https://redirect.github.com/rust-random/rand/issues/1246 ),
[#​1269](https://redirect.github.com/rust-random/rand/issues/1269 ),
[#​1341](https://redirect.github.com/rust-random/rand/issues/1341 ),
[#​1416](https://redirect.github.com/rust-random/rand/issues/1416 ),
[#​1536](https://redirect.github.com/rust-random/rand/issues/1536 ));
note that 1.60.0 may work for dependents when using
`--ignore-rust-version`
- Update to `rand_core` v0.9.0
([#​1558](https://redirect.github.com/rust-random/rand/issues/1558 ))
##### Features
- Support `std` feature without `getrandom` or `rand_chacha`
([#​1354](https://redirect.github.com/rust-random/rand/issues/1354 ))
- Enable feature `small_rng` by default
([#​1455](https://redirect.github.com/rust-random/rand/issues/1455 ))
- Remove implicit feature `rand_chacha`; use `std_rng` instead.
([#​1473](https://redirect.github.com/rust-random/rand/issues/1473 ))
- Rename feature `serde1` to `serde`
([#​1477](https://redirect.github.com/rust-random/rand/issues/1477 ))
- Rename feature `getrandom` to `os_rng`
([#​1537](https://redirect.github.com/rust-random/rand/issues/1537 ))
- Add feature `thread_rng`
([#​1547](https://redirect.github.com/rust-random/rand/issues/1547 ))
##### API changes: rand_core traits
- Add fn `RngCore::read_adapter` implementing `std::io::Read`
([#​1267](https://redirect.github.com/rust-random/rand/issues/1267 ))
- Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng:
RngCore`
([#​1273](https://redirect.github.com/rust-random/rand/issues/1273 ))
- Add traits `TryRngCore`, `TryCryptoRng`
([#​1424](https://redirect.github.com/rust-random/rand/issues/1424 ),
[#​1499](https://redirect.github.com/rust-random/rand/issues/1499 ))
- Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible
variant `fn from_rng`
([#​1424](https://redirect.github.com/rust-random/rand/issues/1424 ))
- Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add
fallible variant `fn try_from_os_rng`
([#​1424](https://redirect.github.com/rust-random/rand/issues/1424 ))
- Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed`
([#​1491](https://redirect.github.com/rust-random/rand/issues/1491 ))
##### API changes: Rng trait and top-level fns
- Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the
prelude
([#​1506](https://redirect.github.com/rust-random/rand/issues/1506 ))
- Remove fn `rand::random()` from the prelude
([#​1506](https://redirect.github.com/rust-random/rand/issues/1506 ))
- Add top-level fns `random_iter`, `random_range`, `random_bool`,
`random_ratio`, `fill`
([#​1488](https://redirect.github.com/rust-random/rand/issues/1488 ))
- Re-introduce fn `Rng::gen_iter` as `random_iter`
([#​1305](https://redirect.github.com/rust-random/rand/issues/1305 ),
[#​1500](https://redirect.github.com/rust-random/rand/issues/1500 ))
- Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen`
keyword in Rust 2024
([#​1438](https://redirect.github.com/rust-random/rand/issues/1438 ))
- Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to
`random_bool`, `gen_ratio` to `random_ratio`
([#​1505](https://redirect.github.com/rust-random/rand/issues/1505 ))
- Annotate panicking methods with `#[track_caller]`
([#​1442](https://redirect.github.com/rust-random/rand/issues/1442 ),
[#​1447](https://redirect.github.com/rust-random/rand/issues/1447 ))
##### API changes: RNGs
- Fix `<SmallRng as SeedableRng>::Seed` size to 256 bits
([#​1455](https://redirect.github.com/rust-random/rand/issues/1455 ))
- Remove first parameter (`rng`) of `ReseedingRng::new`
([#​1533](https://redirect.github.com/rust-random/rand/issues/1533 ))
##### API changes: Sequences
- Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`,
`SliceRandom`
([#​1382](https://redirect.github.com/rust-random/rand/issues/1382 ))
- Add `IndexedRandom::choose_multiple_array`, `index::sample_array`
([#​1453](https://redirect.github.com/rust-random/rand/issues/1453 ),
[#​1469](https://redirect.github.com/rust-random/rand/issues/1469 ))
##### API changes: Distributions: renames
- Rename module `rand::distributions` to `rand::distr`
([#​1470](https://redirect.github.com/rust-random/rand/issues/1470 ))
- Rename distribution `Standard` to `StandardUniform`
([#​1526](https://redirect.github.com/rust-random/rand/issues/1526 ))
- Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` ->
`distr::slice::Empty`
([#​1548](https://redirect.github.com/rust-random/rand/issues/1548 ))
- Rename trait `distr::DistString` -> `distr::SampleString`
([#​1548](https://redirect.github.com/rust-random/rand/issues/1548 ))
- Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` ->
`distr::Map`
([#​1548](https://redirect.github.com/rust-random/rand/issues/1548 ))
##### API changes: Distributions
- Relax `Sized` bound on `Distribution<T> for &D`
([#​1278](https://redirect.github.com/rust-random/rand/issues/1278 ))
- Remove impl of `Distribution<Option<T>>` for `StandardUniform`
([#​1526](https://redirect.github.com/rust-random/rand/issues/1526 ))
- Let distribution `StandardUniform` support all `NonZero*` types
([#​1332](https://redirect.github.com/rust-random/rand/issues/1332 ))
- Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a
`Result` (instead of potentially panicking)
([#​1229](https://redirect.github.com/rust-random/rand/issues/1229 ))
- Distribution `Uniform` implements `TryFrom` instead of `From` for
ranges
([#​1229](https://redirect.github.com/rust-random/rand/issues/1229 ))
- Add `UniformUsize`
([#​1487](https://redirect.github.com/rust-random/rand/issues/1487 ))
- Remove support for generating `isize` and `usize` values with
`StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and
usage as a `WeightedAliasIndex` weight
([#​1487](https://redirect.github.com/rust-random/rand/issues/1487 ))
- Add impl `DistString` for distributions `Slice<char>` and
`Uniform<char>`
([#​1315](https://redirect.github.com/rust-random/rand/issues/1315 ))
- Add fn `Slice::num_choices`
([#​1402](https://redirect.github.com/rust-random/rand/issues/1402 ))
- Add fn `p()` for distribution `Bernoulli` to access probability
([#​1481](https://redirect.github.com/rust-random/rand/issues/1481 ))
##### API changes: Weighted distributions
- Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there
([#​1548](https://redirect.github.com/rust-random/rand/issues/1548 ))
- Add trait `weighted::Weight`, allowing `WeightedIndex` to trap
overflow
([#​1353](https://redirect.github.com/rust-random/rand/issues/1353 ))
- Add fns `weight, weights, total_weight` to distribution
`WeightedIndex`
([#​1420](https://redirect.github.com/rust-random/rand/issues/1420 ))
- Rename enum `WeightedError` to `weighted::Error`, revising variants
([#​1382](https://redirect.github.com/rust-random/rand/issues/1382 ))
and mark as `#[non_exhaustive]`
([#​1480](https://redirect.github.com/rust-random/rand/issues/1480 ))
##### API changes: SIMD
- Switch to `std::simd`, expand SIMD & docs
([#​1239](https://redirect.github.com/rust-random/rand/issues/1239 ))
##### Reproducibility-breaking changes
- Make `ReseedingRng::reseed` discard remaining data from the last block
generated
([#​1379](https://redirect.github.com/rust-random/rand/issues/1379 ))
- Change fn `SmallRng::seed_from_u64` implementation
([#​1203](https://redirect.github.com/rust-random/rand/issues/1203 ))
- Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to
yield `high`
([#​1462](https://redirect.github.com/rust-random/rand/issues/1462 ))
- Fix portability of distribution `Slice`
([#​1469](https://redirect.github.com/rust-random/rand/issues/1469 ))
- Make `Uniform` for `usize` portable via `UniformUsize`
([#​1487](https://redirect.github.com/rust-random/rand/issues/1487 ))
- Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and
optimize for large input length / low memory
([#​1530](https://redirect.github.com/rust-random/rand/issues/1530 ))
##### Reproducibility-breaking optimisations
- Optimize fn `sample_floyd`, affecting output of
`rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple`
([#​1277](https://redirect.github.com/rust-random/rand/issues/1277 ))
- New, faster algorithms for `IteratorRandom::choose` and
`choose_stable`
([#​1268](https://redirect.github.com/rust-random/rand/issues/1268 ))
- New, faster algorithms for `SliceRandom::shuffle` and
`partial_shuffle`
([#​1272](https://redirect.github.com/rust-random/rand/issues/1272 ))
- Optimize distribution `Uniform`: use Canon's method (single sampling)
/ Lemire's method (distribution sampling) for faster sampling (breaks
value stability;
[#​1287](https://redirect.github.com/rust-random/rand/issues/1287 ))
- Optimize fn `sample_single_inclusive` for floats (+~20% perf)
([#​1289](https://redirect.github.com/rust-random/rand/issues/1289 ))
##### Other optimisations
- Improve `SmallRng` initialization performance
([#​1482](https://redirect.github.com/rust-random/rand/issues/1482 ))
- Optimise SIMD widening multiply
([#​1247](https://redirect.github.com/rust-random/rand/issues/1247 ))
##### Other
- Add `Cargo.lock.msrv` file
([#​1275](https://redirect.github.com/rust-random/rand/issues/1275 ))
- Reformat with `rustfmt` and enforce
([#​1448](https://redirect.github.com/rust-random/rand/issues/1448 ))
- Apply Clippy suggestions and enforce
([#​1448](https://redirect.github.com/rust-random/rand/issues/1448 ),
[#​1474](https://redirect.github.com/rust-random/rand/issues/1474 ))
- Move all benchmarks to new `benches` crate
([#​1329](https://redirect.github.com/rust-random/rand/issues/1329 ),
[#​1439](https://redirect.github.com/rust-random/rand/issues/1439 ))
and migrate to Criterion
([#​1490](https://redirect.github.com/rust-random/rand/issues/1490 ))
##### Documentation
- Improve `ThreadRng` related docs
([#​1257](https://redirect.github.com/rust-random/rand/issues/1257 ))
- Docs: enable experimental `--generate-link-to-definition` feature
([#​1327](https://redirect.github.com/rust-random/rand/issues/1327 ))
- Better doc of crate features, use `doc_auto_cfg`
([#​1411](https://redirect.github.com/rust-random/rand/issues/1411 ),
[#​1450](https://redirect.github.com/rust-random/rand/issues/1450 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-02-03 22:19:09 +00:00
Weihang Lo
eddd7ec6f7
Remove the original changelog ( #15123 )
...
This removes the original changelog now that it is located in the cargo
book.
This places a notice in the original location that it has moved to a new
place. There are a few other alternatives we could consider:
* Keep the headings but replace the content with a link. This would make
it a little easier for someone to jump to the exact position in the new
page. However, it looks a little messy. Each section could be something
like:
> This content has moved to
[CHANGELOG.md#186-2025-04-03](https://doc.rust-lang.org/cargo/nightly/CHANGELOG.md#186-2025-04-03 )
* Keep the content, with a notice at the top that the page is no longer
being updated. I was a little uncomfortable with this, since I wasn't
sure people would see the notice, it duplicates some content, and still
leaves the potential problems of GitHub not rendering the page. If we
cut some content, it ensures the page still renders reliably.
* As a variant, we could delete the content but keep the last 1 or 2
releases since those are probably what people will be looking for.
Opening as draft until https://github.com/rust-lang/cargo/pull/15119 is
published on nightly.
2025-02-03 22:13:23 +00:00
Ed Page
990c7f41e0
chore(deps): update rust crate gix to 0.70.0 ( #15128 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [gix](https://redirect.github.com/GitoxideLabs/gitoxide ) |
workspace.dependencies | minor | `0.69.1` -> `0.70.0` |
---
### Release Notes
<details>
<summary>GitoxideLabs/gitoxide (gix)</summary>
###
[`v0.70.0`](https://redirect.github.com/GitoxideLabs/gitoxide/releases/tag/gix-v0.70.0 ):
gix v0.70.0
[Compare
Source](https://redirect.github.com/GitoxideLabs/gitoxide/compare/gix-v0.69.1...gix-v0.70.0 )
##### Chore
- <csr-id-17835bccb066bbc47cc137e8ec5d9fe7d5665af0/> bump `rust-version`
to 1.70
That way clippy will allow to use the fantastic `Option::is_some_and()`
and friends.
##### New Features
- add
`Repository::upstream_branch_and_remote_name_for_tracking_branch()`
It's a way to learn about the Remote and upstream branch which would
match the given local tracking branch.
- more often check for interrupts in status iterator
- add `tree::Editor|editor::Cursor::get()` to see if an entry is loaded
at path.
This can be useful to get a feeling for how far the tree was already
made available,
even though it won't reveal if an entry was edited.
- `Repository::is_dirty()` now also checks for tree/index changes.
This copmpletes the `is_dirty()` implementation.
- `Repository::tree_index_status()` to see the changes between a tree
and an index.
It also respects `status.rename` and `status.renameLimit` to configure
rename tracking.
- add `Tree::depthfirst()` with a delegate.
This allows a depth-first traversal with a delegate.
- Add `blame` plumbing crate to the top-level.
For now, it doesn't come with a simplified `gix` API though.
##### Bug Fixes
- `Repository::status()` detects files added to the index in an unborn
repository.
Previously it wouldn't show them.
- `Respository::status()` iterator won't fail in unborn directories.
- worktrees of submodules now know their correct worktree
Previously they would use a very incorrect worktree which would cause
the status to be calculated very wrongly.
- status-iterator won't swallow legitimate modification during
'racy-git'.
When a modification is marked as being racy, then previously the
iterator would have
kept the whole modification even though it should just have tracked the
single change.
This made the legitimate modification disappear.
- `write_blob_stream()` does not need `Seek` trait anymore.
Internally, it has to turn it into a buffer so it's not needed anymore.
It also counteracts the idea of using a stream with arbitrarily big
files.
- `Submodule::status()` now konws about tree-index changes as well.
This completes the status implementation.
- remove unused fetch-error variants
Note that it's a breaking change, but it's on top of a previous breaking
change
so folks would already have to update explicitly.
##### Other
- <csr-id-9db21601b61601c01cd2419543e2c461a7dd568d/> make really clear
that `Repository::worktrees()` lists linked worktrees.
Excluding the main worktree which isn't always present.
##### New Features (BREAKING)
- add `status::Platform::into_iter()` for obtaining a complete status.
Note that it is still possible to disable the head-index status.
Types moved around, effectivey removing the `iter::` module for most
more general types, i.e. those that are quite genericlally useful in
a status.
##### Bug Fixes (BREAKING)
- all `config::Snapshot` access now uses the new `Key` trait.
That way one can officially use "section.name" strings or
`&Section::NAME`.
##### Commit Statistics
- 40 commits contributed to the release over the course of 27 calendar
days.
- 27 days passed between releases.
- 18 commits were understood as
[conventional](https://www.conventionalcommits.org ).
- 1 unique issue was worked on:
[#​1770](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1770 )
##### Thanks Clippy
[Clippy](https://redirect.github.com/rust-lang/rust-clippy ) helped 1
time to make code idiomatic.
##### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
-
**[#​1770](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1770 )**
- `Repository::status()` detects files added to the index in an unborn
repository.
([`cd8fabf`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/cd8fabf ))
- **Uncategorized**
- Update all changelogs prior to release
([`1f6390c`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/1f6390c ))
- Merge pull request
[#​1774](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1774 )
from EliahKagan/complex-graph-no-baseline-next
([`90e08f1`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/90e08f1 ))
- Use parse_spec_no_baseline with :/ for all 2.47.\* on CI
([`fe33fa7`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/fe33fa7 ))
- Merge pull request
[#​1772](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1772 )
from GitoxideLabs/improvements
([`4c8200f`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/4c8200f ))
- Merge pull request
[#​1769](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1769 )
from GitoxideLabs/improvements
([`47e44c5`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/47e44c5 ))
- `Respository::status()` iterator won't fail in unborn directories.
([`84019cb`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/84019cb ))
- Merge pull request
[#​1768](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1768 )
from GitoxideLabs/improvements
([`34fa6bb`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/34fa6bb ))
- Adapt to changes in `gix-status`
([`25d480c`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/25d480c ))
- Merge pull request
[#​1750](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1750 )
from GitoxideLabs/odb-issue
([`e4fb21e`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/e4fb21e ))
- Reproduce issue with 'too many packs' for slotmap
([`dbf079f`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/dbf079f ))
- Merge pull request
[#​1763](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1763 )
from GitoxideLabs/better-refspec-primitives
([`af8f201`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/af8f201 ))
- Add
`Repository::upstream_branch_and_remote_name_for_tracking_branch()`
([`da0e1c7`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/da0e1c7 ))
- Adapt to changes in `gix-refspec`
([`6d7dd9b`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/6d7dd9b ))
- Merge pull request
[#​1762](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1762 )
from GitoxideLabs/fix-1759
([`7ec21bb`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/7ec21bb ))
- Bump `rust-version` to 1.70
([`17835bc`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/17835bc ))
- Make really clear that `Repository::worktrees()` lists linked
worktrees.
([`9db2160`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/9db2160 ))
- Worktrees of submodules now know their correct worktree
([`bc02284`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/bc02284 ))
- Merge pull request
[#​1752](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1752 )
from GitoxideLabs/git-shell
([`1ca480a`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/1ca480a ))
- Thanks clippy
([`9193b05`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/9193b05 ))
- Merge pull request
[#​1749](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1749 )
from GitoxideLabs/status
([`8d84818`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/8d84818 ))
- More often check for interrupts in status iterator
([`5b6e5c8`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/5b6e5c8 ))
- Merge pull request
[#​1746](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1746 )
from GitoxideLabs/status
([`af704f5`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/af704f5 ))
- Add `tree::Editor|editor::Cursor::get()` to see if an entry is loaded
at path.
([`3b53982`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/3b53982 ))
- Status-iterator won't swallow legitimate modification during
'racy-git'.
([`3bbd1f7`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/3bbd1f7 ))
- `write_blob_stream()` does not need `Seek` trait anymore.
([`a03bde5`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/a03bde5 ))
- Merge pull request
[#​1410](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1410 )
from GitoxideLabs/status
([`0ab4f64`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/0ab4f64 ))
- `Submodule::status()` now konws about tree-index changes as well.
([`a987e68`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/a987e68 ))
- Add `status::Platform::into_iter()` for obtaining a complete status.
([`801689b`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/801689b ))
- All `config::Snapshot` access now uses the new `Key` trait.
([`a6f397f`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/a6f397f ))
- `Repository::is_dirty()` now also checks for tree/index changes.
([`8ae9e57`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/8ae9e57 ))
- `Repository::tree_index_status()` to see the changes between a tree
and an index.
([`83f3d93`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/83f3d93 ))
- Add `Tree::depthfirst()` with a delegate.
([`592e250`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/592e250 ))
- Adapt to changes in `gix-traverse`
([`1de4e70`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/1de4e70 ))
- Merge pull request
[#​1453](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1453 )
from cruessler/gix-blame
([`6ed9976`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/6ed9976 ))
- Add `blame` plumbing crate to the top-level.
([`25efbfb`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/25efbfb ))
- Release gix v0.69.1
([`7659a65`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/7659a65 ))
- Merge pull request
[#​1740](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1740 )
from GitoxideLabs/cargo-improvements
([`3fb0c18`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/3fb0c18 ))
- Remove unused fetch-error variants
([`51a4301`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/51a4301 ))
- Merge pull request
[#​1739](https://redirect.github.com/GitoxideLabs/gitoxide/issues/1739 )
from GitoxideLabs/new-release
([`d22937f`](https://redirect.github.com/GitoxideLabs/gitoxide/commit/d22937f ))
</details>
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-02-03 21:30:17 +00:00
Ed Page
08055a443c
refactor: Resolve deprecations
2025-02-03 15:07:36 -06:00
Eric Huss
e82878c66c
allow windows reserved names in CI ( #15135 )
...
<!--
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.
-->
We are progressively moving the windows CI from windows 2022 to windows
2025 because we found windows 2025 more stable.
In https://github.com/rust-lang/rust/pull/136478 a cargo test failed and
this might solve the issue. See
[this](https://github.com/rust-lang/rust/pull/136478#issuecomment-2631307932 )
comment. What do you think?
If you have a better way of solving this, let me know 👍
2025-02-03 20:54:43 +00:00
Ed Page
5408bd9f52
fix: Update generic 'did you meann' reports to not say that
2025-02-03 13:07:47 -06:00
Ed Page
c2023a14e1
fix(cli): Don't use 'did you mean' on unknown command errors
2025-02-03 12:58:53 -06:00
Ed Page
fefd9fbb32
removed a word that was repeated ( #15136 )
...
Hey there,
While reading the documentation, I noticed that the word 'considered'
was written two times. So I removed one.
Thank you!
<!--
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.
-->
2025-02-03 18:46:29 +00:00
Ed Page
e090b6fcd6
fix(spec): Don't use 'did you mean' for PackageIdSpec errors
2025-02-03 12:26:47 -06:00
Bilal Khan
ca1d8f640e
removed a word that was repeated
2025-02-03 23:13:57 +05:00
MarcoIeni
54f97e28fd
allow windows reserved names in CI
2025-02-03 17:51:51 +01:00
Ed Page
759178e42b
fix(cli): Don't use 'did you mean' for +toolchain errors
2025-02-03 10:37:53 -06:00
Scott Schafer
0e3d73849a
Revert "Conditionally mark the test
cfg as a well known cfg ( #15007 )" ( #15132 )
...
This reverts #15007 ,
as it causes confusions and needs more time to figure out a proper
solution.
See
* #15131
*
<https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/.60test.60.20well.20known.20cfg.20error >
* <https://github.com/rust-lang/cargo/pull/15007#discussion_r1938322212 >
2025-02-01 20:14:40 +00:00
Weihang Lo
e79dae5bec
Revert "Conditionally mark the test
cfg as a well known cfg ( #15007 )"
...
This reverts commit 26ce02737ae4b74a008355d302ef283375032cf6, reversing
changes made to 730d9977f1d0b6967f473d93f4034c6580d33a35.
2025-02-01 14:14:05 -05:00
renovate[bot]
e9132fb248
chore(deps): update rust crate rand to 0.9.0
2025-02-01 00:25:29 +00:00
renovate[bot]
4f60d690bc
chore(deps): update rust crate gix to 0.70.0
2025-02-01 00:25:03 +00:00
Weihang Lo
776129a2b9
Don't suggest cargo login
when using incompatible credental providers ( #15124 )
...
Authentication errors shouldn't unconditionally recommend running `cargo
login`, because alternative registries configured to use custom
credential providers won't use the token obtained by `cargo login`.
2025-01-30 15:34:14 +00:00
Kornel
aa6c48ffea
Don't suggest cargo login
for other credential providers
2025-01-30 13:39:10 +00:00
Kornel
8f12fe581a
Test login error with non-token provider
2025-01-30 13:38:58 +00:00
Eric Huss
daf3b16816
Remove the original changelog
...
The changelog is now located in the cargo book.
2025-01-29 13:28:57 -08:00
Scott Schafer
51346addcc
chore: Update clap_complete ( #15121 )
...
### What does this PR try to resolve?
This includes `CARGO_COMPLETE=` and `CARGO_COMPLETE=0` to disable
completions. I'm wanting access to this for my bash script that runs
Cargo out of the `target/debug` without the outer cargo doing the
completions
### How should we test and review this PR?
### Additional information
2025-01-29 16:28:06 +00:00
Ed Page
7ab469d339
chore: Update clap_complete
2025-01-29 09:43:25 -06:00
Weihang Lo
5a882c1f23
Move the changelog to the cargo book ( #15119 )
...
This moves cargo's changelog to the cargo book. We're bumping into
rendering limits on GitHub's side, so we're moving the changelog to the
cargo book where it can be statically served under our control.
This PR is structured in such a way that the original CHANGELOG.md file
is kept in place (and history is preserved in the new copy). The intent
is to wait until this PR makes it to the nightly channel, and then open
a new PR that will delete the original. That will look something like
5ce7947693
.
This makes use of a new mdbook feature in order to exclude the changelog
chapter from the search index. It completely swamps the search results,
so I think it is best to just exclude it.
We'll need to coordinate with the release team so that future release
notes link directly to the cargo book instead of GitHub.
2025-01-29 15:22:50 +00:00
Eric Huss
790c776f1a
Fix broken markdown syntax
2025-01-28 20:24:17 -08:00
Eric Huss
2e65c8913e
Keeping changelog to retain history
...
This is so that we temporarily keep a copy of the CHANGELOG in
the original location until the website is updated.
2025-01-28 18:55:13 -08:00
Eric Huss
1ed329b186
Merging changlog to preserve history
2025-01-28 18:53:52 -08:00
Eric Huss
767445df48
Backing up changelog
2025-01-28 18:53:21 -08:00
Eric Huss
19b5e2356c
Move changelog to the cargo book
...
Due to rendering limits with GitHub's markdown renderer, we're moving
the changelog to the cargo book where it can be statically served under
our control.
2025-01-28 18:52:33 -08:00
Ed Page
26ce02737a
Conditionally mark the test
cfg as a well known cfg ( #15007 )
...
### What does this PR try to resolve?
This PR conditionally mark the `test` cfg as a well known cfg depending
on the target unit "test" field (ie `lib.test = false`, `[[bin]] test =
false` and others).
This is related to https://github.com/rust-lang/rust/issues/117778 and
https://users.rust-lang.org/t/cargo-what-is-the-purpose-of-lib-test-false/102361 .
When defining `lib.test = false` (and others), any use of `cfg(test)`
will trigger the `unexpected_cfgs` lint.
```toml
[lib]
test = false # will now warn on cfg(test)
```
### How should we test and review this PR?
Best reviewed commit by commit. Second commit removes the `test` cfg
from the `--check-cfg` args.
### Additional information
T-compiler
[MCP#785](https://github.com/rust-lang/compiler-team/issues/785 ) and
https://github.com/rust-lang/cargo/pull/14963 were of preparatory work.
r? @epage
2025-01-28 19:55:00 +00:00
Eric Huss
730d9977f1
fix broken links in the Cargo book ( #15109 )
...
This PR closes #15102 . I fixed broken links in the SUMMARY.md and
guide/index.md of the Cargo book.
2025-01-28 03:44:32 +00:00
Eric Huss
ba4d7869a6
Fix a typo and touch up documentation ( #15108 )
...
This PR closes #15101 . I fixed a typo and touched up some sentences.
2025-01-28 03:43:31 +00:00
Eric Huss
f71f565bbd
Fix shared_std_dependency_rebuild running on Windows ( #15111 )
...
This fixes the `standard_lib::shared_std_dependency_rebuild` test while
running on Windows. On my system, `CARGO_MANIFEST_DIR` is a normal
windows-style path (`D:\rust\cargo`) with backslashes. That is not valid
TOML syntax. I don't know why this doesn't fail on CI (maybe CI sets a
unix-style current dir?).
2025-01-28 03:39:35 +00:00
Eric Huss
f62525d31b
Fix warnings on Windows ( #15112 )
...
This fixes some warnings that show up on Windows:
```
warning: unused variable: `path`
--> tests\testsuite\registry.rs:3146:24
|
3146 | fn set_permissions(path: &Path, permissions: u32) {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_path`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `permissions`
--> tests\testsuite\registry.rs:3146:37
|
3146 | fn set_permissions(path: &Path, permissions: u32) {
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_permissions`
```
2025-01-28 03:34:33 +00:00
yegeunyang
a9eec5cbb5
Fix a typo and touch up documentation
2025-01-27 19:14:24 -08:00
Eric Huss
7908e4210b
Sync reference contents with SUMMARY.md
2025-01-27 19:12:01 -08:00
yegeunyang
8cd5cdf91e
fix broken links in the Cargo book
2025-01-27 19:10:04 -08:00
Eric Huss
caff80d7f5
Fix shared_std_dependency_rebuild running on Windows
2025-01-27 19:06:22 -08:00
Eric Huss
e722344620
Fix warnings on Windows
2025-01-27 19:05:28 -08:00
Weihang Lo
9eda47ee04
fix(login): Deprecate CLI token ( #15057 )
...
### What does this PR try to resolve?
This came up in #13623 to avoid putting tokens into shell history.
### How should we test and review this PR?
The exact approach to deprecation can vary
- Include `<token>` in at least some docs for discovery (most likely the
man page)
- Don't warn yet
etc
I also suspect we could reorganize `cargo help login` but wanted to
decouple that from this change.
### Additional information
2025-01-28 02:53:08 +00:00