Commit graph

16343 commits

Author SHA1 Message Date
Eric Huss c54fa88ea4 Cleanup rustfix parse_and_replace test.
This is just some minor code cleanup for the parse_and_replace test,
there should not be any functional differences.
2023-12-31 09:56:20 -08:00
bors ef94adb927 Auto merge of #13224 - ehuss:fix-error-format, r=epage
cleanup: Remove error-format special-case in `cargo fix`

`cargo fix` had some special handling to deal with ensuring that the `--error-format=json` flag was passed to rustc. However, cargo was changed in https://github.com/rust-lang/cargo/pull/7450 to always pass that flag. This special handling is no longer necessary, so this PR removes it.
2023-12-31 02:20:45 +00:00
Eric Huss 1a8034cc80 cleanup: Remove error-format special-case in cargo fix
`cargo fix` had some special handling to deal with ensuring that the
`--error-format=json` flag was passed to rustc. However, cargo was
changed in https://github.com/rust-lang/cargo/pull/7450 to always pass
that flag. This special handling is no longer necessary, so this PR
removes it.
2023-12-30 18:18:45 -08:00
bors bc7e5cefca Auto merge of #13225 - ehuss:fix-jobserver-always, r=epage
`cargo fix`: always inherit the jobserver

https://github.com/rust-lang/cargo/pull/12951 changed `cargo fix` to ensure that `rustc` has access to the jobserver. However, it only did that for the final "verification" step. It was not set for any of the previous calls to rustc (which is up to ~5 calls).

I'm not sure if this was done intentionally, I did not see any discussion of this in #12951.

This isn't too important in the grand scheme of things, because `rustc` is not doing codegen, so the parallel behavior is currently not used. However, this removes an extraneous `warning: failed to connect to jobserver from environment variable` warning that is printed in cargo's log every time it runs rustc. It also might be relevant in the future if rustc enables the parallel frontend.
2023-12-31 01:17:27 +00:00
Eric Huss 448c437ef0 fix: cargo fix: always inherit the jobserver 2023-12-30 15:10:04 -08:00
bors 2ed2dbd8ce Auto merge of #13221 - ehuss:bump-cargo-credential, r=epage
Bump cargo-credential to 0.4.3

This should fix the check-version-bump CI job. #13216 made some changes without bumping the version.
2023-12-29 20:48:16 +00:00
Eric Huss 1bab2005f3 Bump cargo-credential to 0.4.3 2023-12-29 12:44:31 -08:00
bors 4f70d1781a Auto merge of #13213 - stupendoussuperpowers:mulpack-features-git, r=epage
`cargo add` - fix for adding features from repository with multiple packages.

Fixes #13121

As discussed in the issue, when using `cargo add` to add a package with features from a git repository from one of it's members, the command might fail due to improper target for querying for said features.

This PR adds a test for this edge-case where we expect it to fail with current code. It also adds a fix for this, and updates the test to expect success.

While populating available features, the current code does a `Fuzzy` search which might lead to searching for features in a wrong member package. If we change it to an `Exact` query, we get back the proper member to search within.
2023-12-29 18:46:27 +00:00
bors 04b6aed4d5 Auto merge of #13216 - rustaceanclub:master, r=epage
Remove repetitive words
2023-12-29 13:01:22 +00:00
cui fliter 5c7fbd80f2 Remove repetitive words
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-12-29 13:55:24 +08:00
sanchit e46d80e24e Fixes #13121: Use Exact query during populating features. Update test
fix target output
2023-12-29 10:03:54 +05:30
bors 312ad26ca3 Auto merge of #13212 - Brooooooklyn:master, r=epage
Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list

After https://github.com/rust-lang/cargo/pull/12201 was merged, the `cargo:rustc-cdylib-link-arg` in build script no longer works
```rs
println!("cargo:rustc-cdylib-link-arg=-Wl");
println!("cargo:rustc-cdylib-link-arg=-undefined");
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
```
2023-12-29 02:04:16 +00:00
sanchit 61f6248a07 add test expecting failure: adding features from git repo w multiple packages 2023-12-29 04:54:50 +05:30
LongYinan 7aaf2752ad
Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list 2023-12-28 11:28:22 +08:00
bors 1f70597241 Auto merge of #13203 - linyihai:subcommand-doc, r=weihanglo
chore(doc): doc for custom subcommands look up.

### What does this PR try to resolve?

as the https://github.com/rust-lang/cargo/issues/13194 metions, the lookup rules for custom subcommands are only reflected in comments inside the code, and it is time to inform users of this behavior through documentation.

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

### Additional information
2023-12-27 12:07:18 +00:00
bors ac6bbb3329 Auto merge of #13209 - weihanglo:link, r=epage
docs: fix link to nightly doc of cargo-util-schemas

should be https://doc.rust-lang.org/nightly/nightly-rustc/cargo_util_schemas/
2023-12-26 23:22:08 +00:00
bors d711ac06c1 Auto merge of #13206 - shivdhar:patch-1, r=weihanglo
doc: improve word usage
2023-12-26 22:38:22 +00:00
Weihang Lo 79f09db818
docs: fix link to nightly doc of cargo-util-schemas
https://doc.rust-lang.org/nightly/nightly-rustc/cargo_util_schemas/
2023-12-26 11:41:24 -05:00
bors 308ceee7fa Auto merge of #13205 - weihanglo:install, r=hi-rustin
fix: clarify `--path` is the installation source not destination

### What does this PR try to resolve?

There is a misunderstanding of “default location” mentioned in `cargo install --help`.
I don't think one-line explanation helps much there, So remove that imprecise description.

This PR also add more "from" for places mentioning installation sources.

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

Read the new help text.
2023-12-26 16:17:54 +00:00
Weihang Lo eb8870f098
docs(cargo-install): clarify default location is about "sources" 2023-12-26 10:42:57 -05:00
Weihang Lo 48cffc6729
fix(cargo-install): clarify --path is installation source 2023-12-26 10:42:57 -05:00
Weihang Lo 14ef091bd0
fix(cargo-install): remove imprecise install root descriptions 2023-12-26 10:42:57 -05:00
Lin Yihai d71b2bc5df chore(doc): doc for custom subcommands 2023-12-26 14:19:48 +08:00
Shiv Dhar d148d690e9
doc: improve word usage 2023-12-26 02:40:08 +05:30
bors 4e792c2858 Auto merge of #13202 - hi-rustin:rustin-patch-spec-example, r=weihanglo
refactor: give some better examples for package ID spec
2023-12-25 14:51:31 +00:00
hi-rustin ad18dd017b refactor: give some better examples for package ID spec
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-25 10:08:27 +08:00
bors c2408a712e Auto merge of #13201 - hi-rustin:rustin-patch-build-script-typo, r=weihanglo
chore: fix a typo
2023-12-25 02:03:27 +00:00
hi-rustin 1687fb8513 chore: fix a typo
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-25 09:39:44 +08:00
bors d45969a781 Auto merge of #12201 - hi-rustin:rustin-patch-build-script, r=epage
Extend the build directive syntax with `cargo::`
2023-12-24 03:06:43 +00:00
hi-rustin dec9e8cc1b Add tests for msrv check
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:24:53 +08:00
hi-rustin 0e42a8ae6d Add msrv check for new syntax
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:24:46 +08:00
hi-rustin a76564b9ba Update the dirty reason message
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin eac79ec152 Update other docs to use cargo:: syntax
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin ed9dc44f47 Update other tests to use cargo:: syntax
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin 9eeffbf0d7 Add some syntax tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin bd230e810c Update build script docs
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin dfb2795ffe Update build script tests to use cargo::
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin 25365d904c Use syntax_prefix to improve error message
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin 56fdb1d0b6 Add parse_metadata to prase metadata
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
hi-rustin 9ebe3b332a Extend the build directive syntax with cargo::
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-23 13:17:55 +08:00
bors 74ef21bb3f Auto merge of #13195 - Urgau:check-cfg-rework-comment, r=weihanglo
Rework `--check-cfg` generation comment

While working on something related to `--check-cfg`, I looked back at this comment and realized it could be improved, so here is my PR improving it.
2023-12-22 23:38:58 +00:00
Urgau 2dafb340dc Rework --check-cfg generation comment 2023-12-22 18:15:54 +01:00
bors 363a2d1132 Auto merge of #13187 - weihanglo:git-paths, r=ehuss
refactor: centralize git checkouts and db paths
2023-12-22 03:12:42 +00:00
bors 53eb9a28f7 Auto merge of #13192 - weihanglo:version-bump, r=epage
Bump to 0.78.0; update changelog

[rendered](https://github.com/weihanglo/cargo/blob/version-bump/CHANGELOG.md)
2023-12-22 02:41:20 +00:00
Weihang Lo 5429c90e48
Update changelog for 1.77.0 2023-12-21 16:12:19 -05:00
Weihang Lo 484452359b
Update changelog for 1.76.0 2023-12-21 16:12:19 -05:00
Weihang Lo 49ada9f092
Bump to 0.78.0 2023-12-21 16:08:24 -05:00
Weihang Lo 0a4ce466dd
refactor: centralize git checkouts and db paths 2023-12-20 17:50:42 -05:00
bors a9c749c33e Auto merge of #13186 - weihanglo:cargo-util-schemas-error-types, r=epage
refactor: custom error types for `cargo-util-schemas`
2023-12-20 15:52:40 +00:00
Weihang Lo 0b0e78fa3f
chore: bump cargo-util-schemas to 0.2.0 2023-12-20 10:38:03 -05:00