134 Commits

Author SHA1 Message Date
Ed Page
178a07231e chore: Bump versions 2025-08-07 10:15:50 -05:00
renovate[bot]
f0379a2a8c chore(deps): update msrv (1 version) to v1.89 2025-08-07 13:00:25 +00:00
Eric Huss
1ce8023626 Rustfmt 2024 2025-07-05 19:50:36 -07:00
Ed Page
d8975d2901 chore: Update incompatible versions 2025-07-01 13:51:18 -05:00
Ed Page
e5987ea9b6 chore: Bump versions 2025-06-26 16:38:16 -05:00
renovate[bot]
e6740738a8
chore(deps): update msrv (1 version) to v1.88 2025-06-26 19:55:27 +00:00
Weihang Lo
d7940042bd
Fix cargo add overwriting symlinked Cargo.toml files (#15281)
### What does this PR try to resolve?

This PR fixes a bug where `cargo add` breaks symlinks to Cargo.toml
files. Currently, when Cargo.toml is a symlink and `cargo add` is used
to add a dependency, the symlink is replaced with a regular file,
breaking the link to the original target file.

This issue was reported in #15241 where a user who relies on symlinked
Cargo.toml files found that `cargo add` breaks their workflow.

Fixes #15241

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

I've modified `LocalManifest::write()` to check if the path is a
symlink, and if so, follow it to get the actual target path. This
ensures we write to the actual file rather than replacing the symlink.

I've also added a test in `tests/testsuite/cargo_add/symlink.rs` that:
1. Creates a symlinked Cargo.toml file
2. Runs `cargo add` to add a dependency
3. Verifies the symlink is preserved and the dependency is added to the
target file

I've manually tested this fix and confirmed it works correctly.
2025-06-02 10:23:52 +00:00
Raghavender Singh
ecfe3a961d fix: handle symlinks properly in write_atomic
- Preserve symlinks when writing files atomically in write_atomic()
- Update test to verify correct symlink preservation behavior
- Apply rustfmt formatting

This fixes the issue where cargo add would replace symlinked Cargo.toml
files with regular files, breaking the symlink to the original target.

Fixes #15241
2025-06-02 10:26:42 +05:30
Ed Page
31433a3094 chore: Bump package versions 2025-05-20 16:08:34 -05:00
renovate[bot]
8b5fd61ec8
chore(deps): update msrv (1 version) to v1.87 2025-05-15 23:35:57 +00:00
Eric Huss
be781458a9 Bump versions due to MSRV update 2025-04-03 07:11:48 -07:00
renovate[bot]
fc88578277
chore(deps): update msrv (1 version) to v1.86 2025-04-03 12:07:38 +00:00
bjorn3
9e74cce829 Redox OS is part of the unix family 2025-03-13 21:19:46 +01:00
Ed Page
f5ec77b18e docs(utils): Clarify expected state of name for make_dep_path
For index entries, the caller must lowercase the name.
2025-02-21 08:25:23 -06:00
Ed Page
b4dee5dcf9 chore: Bump versions 2025-02-20 15:47:07 -06:00
renovate[bot]
c30d4f9293
chore(deps): update msrv (1 version) to v1.85 2025-02-20 19:37:56 +00:00
Samuel Moelius
65521c3ba0
Typo: "explicitally" -> "explicitly" 2025-02-18 19:06:15 -05:00
Ed Page
b75783a923 chore: Bump versions 2025-01-09 15:18:56 -06:00
renovate[bot]
7ee43a58ec
chore(deps): update msrv (1 version) to v1.84 2025-01-09 19:15:56 +00:00
Weihang Lo
4c06c57d0d
refactor(cargo-util): one generic for each argument
So `path` and `base` are able to accept different types
2024-12-31 16:21:43 -05:00
Ed Page
6da546c9e1 chore: Bump versions 2024-11-29 10:43:19 -06:00
renovate[bot]
1ec49b8947
chore(deps): update msrv 2024-11-29 03:54:45 +00:00
Ed Page
878caf7447 docs: Surround identifiers in backticks
This was mostly done by clippy via `clippy::doc_markdown`.
I then reviewed it to fix words that shouldn't have it or where `--fix`
put the backtick in the wrong location.
2024-11-15 09:33:23 -06:00
Ed Page
7a6eaf9667 fix(util): Respect all ..s in normalize_path 2024-10-30 14:41:47 -05:00
Ed Page
c53bdc4745 refactor(util): Clarify intent of normalize_path 2024-10-30 14:40:51 -05:00
Ed Page
1f8b294b87 test(util): Show relative path behavior for normalize_path 2024-10-30 14:04:32 -05:00
renovate[bot]
341d619f66
chore(deps): update msrv 2024-10-19 01:35:59 -04:00
Ed Page
5c87c14f9a docs: Declare support level for each crate in our Charter / docs
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-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.
2024-09-26 12:43:09 -05:00
Ed Page
1b94fb2326 chore: Bump MSRV to 1.81
This is prep for using `#[expect]`.

Its not clear why RenovateBot didn't do this.
2024-09-23 19:45:57 -05:00
Ed Page
d62fcae81d chore: Bump versions 2024-07-26 16:32:54 -05:00
renovate[bot]
74f01c4b65
chore(deps): update msrv 2024-07-26 12:52:37 +00:00
Ed Page
b07e87656f chore: Bump version for internal crates 2024-06-13 13:38:32 -05:00
renovate[bot]
a018e3a946
chore(deps): update msrv (1 version) to v1.79 2024-06-13 17:27:19 +00:00
hi-rustin
40ff7be1ad
fix: remove symlink on Windows
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-05-23 21:18:33 +08:00
hi-rustin
0e1b115ccd
test: add case for the symlink file
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-05-21 20:16:35 +08:00
hi-rustin
8b0161ede4
test: add a test case for removing symlink dir
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-05-21 20:00:56 +08:00
Eric Huss
cf7857354f Fix warning about unused Permissions 2024-05-20 11:40:44 -07:00
Steven Engler
36a63b4039 fix: preserve file permissions on unix during write_atomic
Preseves u/g/o r/w/x permissions on unix platforms.
2024-05-14 22:50:28 -04:00
Steven Engler
038ccd29c0 test: write_atomic changes file permissions to 0o600 on unix 2024-05-14 22:48:34 -04:00
bors
97181c67e1 Auto merge of #13851 - weihanglo:macos, r=epage
refactor: remove unnecessary branch for link binary on macOS
2024-05-02 20:11:50 +00:00
Weihang Lo
f8aead9338
refactor: remove unnecessary branch for link binary on macOS
The other workaround branch should have covered that.
2024-05-02 16:04:26 -04:00
renovate[bot]
05ba4d8cfe chore(deps): update msrv (1 version) to v1.78 2024-05-02 15:07:25 +00:00
Thibault Saunier
4634aa6403 cargo-util: Bump version 2024-05-02 10:20:00 -04:00
Thibault Saunier
defff445fa Workaround copying file returning EAGAIN on ZFS on mac OS
Falling back to hard_link when that happens, retrying can lead to very
long wait before copying works (up to 4secs in my tests) while
hard_linking works straight away.

Looks related to https://github.com/openzfsonosx/zfs/issues/809

Closes #13838
2024-05-02 08:32:38 -04:00
klensy
3215929365 gate some libc usages under cfg(unix) 2024-04-19 15:27:21 +03:00
Maybe Waffle
898969e4a4 Don't depend on ? affecting type inference in weird ways 2024-04-04 23:56:01 +00:00
Ed Page
451babb370 chore: Bump versions 2024-03-25 14:13:38 -05:00
renovate[bot]
ccc31b4ddf chore(deps): update msrv 2024-03-25 14:13:38 -05:00
renovate[bot]
5ea658df78 chore(deps): update msrv (1 version) to v1.76.0 2024-02-08 14:32:51 +00:00
Lin Yihai
41f7dc2b35 doc: Replace version with latest for jobserver link 2024-01-29 15:22:57 +08:00