hi-rustin
b8b84ceffd
chore(deps): update rust crate pulldown-cmark to 0.11.0
...
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-06-10 21:47:13 +08:00
bors
54d9c3306b
Auto merge of #13902 - heisen-li:plugin, r=weihanglo
...
fix(toml): remove `lib.plugin` key support and make it warning
### What does this PR try to resolve?
Remove `lib.plugin` key, making it an "unused key" warning.
Remove some of the tests, which should look useless (I hope I'm understanding this
- [x] Remove key, and related tests.
- [x] Adjust the documentation about the plugin.
- [ ] Some of the comments and function names have not yet finished being modified.
part of #13629
Closes #13246
2024-06-09 18:07:55 +00:00
bors
fb123c668b
Auto merge of #13979 - tweag:issue-12425, r=epage
...
Add `cargo update --breaking`
Related to #12425 .
There are two kinds of manifest mutations here. In `upgrade_manifests` we have to mutate `cargo::core::manifest::Manifest` so that `resolve_ws` does what it needs to do, and outputs a correct lock file. Then, in `write_manifest_upgrades` we mutate `cargo::util::toml_mut::manifest::Manifest`, because that is how we can preserve the existing formatting in the manifest files on disk.
Some of the code here is copied from `cargo-edit`.
# Comparison with `cargo upgrade`
Running on the Cargo source itself gives the following:
```
❯ cargo upgrade --dry-run --incompatible allow --compatible ignore
Updating 'https://github.com/rust-lang/crates.io-index ' index
Checking benchsuite's dependencies
Checking capture's dependencies
Checking cargo's dependencies
name old req compatible latest new req note
==== ======= ========== ====== ======= ====
anstream 0.6.13 0.6.14 0.6.14 0.6.13 compatible
anstyle 1.0.6 1.0.7 1.0.7 1.0.6 compatible
anyhow 1.0.82 1.0.86 1.0.86 1.0.82 compatible
itertools 0.12.1 0.12.1 0.13.0 0.13.0
libc 0.2.154 0.2.155 0.2.155 0.2.154 compatible
opener 0.7.0 0.7.1 0.7.1 0.7.0 compatible
openssl 0.10.57 0.10.64 0.10.64 0.10.57 compatible
openssl-sys =0.9.92 0.9.92 0.9.102 =0.9.92 pinned
pulldown-cmark 0.10.3 0.10.3 0.11.0 0.11.0
security-framework 2.10.0 2.11.0 2.11.0 2.10.0 compatible
semver 1.0.22 1.0.23 1.0.23 1.0.22 compatible
serde 1.0.199 1.0.203 1.0.203 1.0.199 compatible
serde-untagged 0.1.5 0.1.6 0.1.6 0.1.5 compatible
serde_json 1.0.116 1.0.117 1.0.117 1.0.116 compatible
tar 0.4.40 0.4.41 0.4.41 0.4.40 compatible
thiserror 1.0.59 1.0.61 1.0.61 1.0.59 compatible
toml 0.8.12 0.8.14 0.8.14 0.8.12 compatible
toml_edit 0.22.12 0.22.14 0.22.14 0.22.12 compatible
unicode-width 0.1.12 0.1.13 0.1.13 0.1.12 compatible
Checking cargo-credential's dependencies
Checking cargo-credential-1password's dependencies
Checking cargo-credential-libsecret's dependencies
Checking cargo-credential-macos-keychain's dependencies
Checking cargo-credential-wincred's dependencies
Checking cargo-platform's dependencies
Checking cargo-test-macro's dependencies
Checking cargo-test-support's dependencies
Checking cargo-util's dependencies
Checking cargo-util-schemas's dependencies
Checking crates-io's dependencies
Checking home's dependencies
Checking mdman's dependencies
Checking resolver-tests's dependencies
Checking rustfix's dependencies
Checking semver-check's dependencies
Checking xtask-build-man's dependencies
Checking xtask-bump-check's dependencies
Checking xtask-stale-label's dependencies
note: Re-run with `--pinned` to upgrade pinned version requirements
note: Re-run with `--verbose` to show all dependencies
local: cargo
unchanged: annotate-snippets, base64, bytesize, cargo-credential, cargo-credential-libsecret, cargo-credential-macos-keychain, cargo-credential-wincred, cargo-platform, cargo-test-macro, cargo-test-support, cargo-util, cargo-util-schemas, cargo_metadata, clap, color-print, core-foundation, crates-io, criterion, curl, curl-sys, filetime, flate2, git2, git2-curl, gix, glob, handlebars, hex, hmac, home, http-auth, humantime, ignore, im-rc, indexmap, jobserver, lazycell, libgit2-sys, libloading, memchr, miow, os_info, pasetors, pathdiff, percent-encoding, pkg-config, proptest, rand, regex, rusqlite, rustfix, same-file, serde-value, serde_ignored, sha1, sha2, shell-escape, similar, snapbox, supports-hyperlinks, supports-unicode, tempfile, time, tracing, tracing-chrome, tracing-subscriber, unicase, unicode-xid, url, varisat, walkdir, windows-sys
warning: aborting upgrade due to dry run
❯ target/debug/cargo update --breaking --dry-run -Zunstable-options
Updating crates.io index
Upgrading itertools ^0.12.1 -> ^0.13.0
Upgrading pulldown-cmark ^0.10.3 -> ^0.11.0
Updating crates.io index
Locking 3 packages to latest compatible versions
Updating itertools v0.12.1 -> v0.13.0
Updating pulldown-cmark v0.10.3 -> v0.11.0
Updating pulldown-cmark-escape v0.10.0 -> v0.11.0
warning: not updating any files due to dry run
```
In both cases we see an upgrade of `itertools` to `^0.13.0` and `pulldown-cmark` to `^0.11.0`.
The diff to the manifest (when it isn't a dry run) is as follows:
```
--- a/Cargo.toml
+++ b/Cargo.toml
`@@` -57,7 +57,7 `@@` humantime = "2.1.0"
ignore = "0.4.22"
im-rc = "15.1.0"
indexmap = "2.2.6"
-itertools = "0.12.1"
+itertools = "0.13.0"
jobserver = "0.1.31"
lazycell = "1.3.0"
libc = "0.2.154"
`@@` -74,7 +74,7 `@@` pathdiff = "0.2.1"
percent-encoding = "2.3.1"
pkg-config = "0.3.30"
proptest = "1.4.0"
-pulldown-cmark = { version = "0.10.3", default-features = false, features = ["html"] }
+pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] }
rand = "0.8.5"
regex = "1.10.4"
rusqlite = { version = "0.31.0", features = ["bundled"] }
```
# TODO
- [x] In the case of `--incompatible`, we also need to let `update_lockfile` use `upgrades` in order to only update the incompatible dependencies.
- [x] Testing all the different cases of package sources, version requirements, pinned versions, renamed dependencies, inherited workspace dependencies, multiple versions of the same dependency, selecting a subset `--package`, etc.
- [x] Passing tests.
- [x] Implement suggestions from reviews.
- [x] The preservation of formatting in manifest files should be improved.
- [x] Compare with `cargo upgrade`.
2024-06-07 17:11:18 +00:00
Tor Hovland
031b410181
feat: Implement cargo update --breaking
.
2024-06-07 09:13:28 +02:00
Scott Schafer
7d7b7c2c8b
feat: Add an xtask to generate lint documentation
2024-06-06 23:03:53 -06:00
bors
d503f744bc
Auto merge of #13977 - linyihai:doc-resolver-tests, r=Eh2406
...
doc: Add README for resolver-tests
### What does this PR try to resolve?
This collect the comments from `@Eh2406` about the resolver-tests and add a README to it.
### How should we test and review this PR?
### Additional information
Maybe Fixed https://github.com/rust-lang/cargo/issues/13319
See https://github.com/rust-lang/cargo/pull/11938#issuecomment-1868426431
2024-06-03 15:14:46 +00:00
bors
4b681c7338
Auto merge of #13980 - epage:compare, r=hi-rustin
...
refactor: Transition direct assertions from cargo-test-support to snapbox
### What does this PR try to resolve?
Cargo has a bespoke testing framework for functional tests
- Extra stuff for us to maintain
- Don't leverage benefits from contributions related to other projects
- Less incentive to be thoroughly documented
UI tests are written using snapbox. The latest release of snapbox (#13963 ) was geared at supporting cargo's needs in the hope that we can consolidate on testing frameworks.
Besides having a single set of semantics, benefits we'd gain include
- Updating of test snapshots
- Fancier redacting of test output (e.g. #13973 )
This is the first incremental step in this direction. This replaces direct assertions with snapbox assertions. This still leaves all of the CLI output assertions. These will be done incrementally.
### How should we test and review this PR?
### Additional information
2024-06-02 14:48:01 +00:00
renovate[bot]
a2e32f2493
chore(deps): update alpine docker tag to v3.20
2024-06-01 00:52:26 +00:00
Lin Yihai
861429b113
doc: Add README for resolver-tests
2024-05-30 17:02:34 +08:00
Ed Page
995746b937
refactor: Port from matches_contains to assert_e2e
2024-05-29 14:08:10 -05:00
Ed Page
eee1053384
refactor: Port from matches_unordered to assert_e2e
2024-05-29 14:08:10 -05:00
Ed Page
3054936cab
refactor: Port from assert_matches_exact to assert_e2e
...
This leaves off `validate_crate_contents` as that would be an effort on
its own
2024-05-29 14:08:10 -05:00
Ed Page
fe5c2d393a
refactor(test): Pull out end-to-end literal redactions
2024-05-29 14:08:10 -05:00
Ed Page
ea36ed09f3
refactor(test): Share redactions between ui and e2e
2024-05-29 14:08:10 -05:00
Ed Page
94119af2a5
docs(test): Clarify role of assert_ui
2024-05-29 14:08:10 -05:00
Ed Page
f22c43b87d
fix(test)!: Hide API that isnt used by Cargo
2024-05-29 14:08:10 -05:00
Ed Page
5ea1c8fea9
feat(test): Auto-redact elapsed time
2024-05-27 21:27:25 -05:00
Ed Page
9af864ee55
refactor: Resolve deprecations
2024-05-27 21:27:03 -05:00
Ed Page
eafc743c0d
chore: Update to snapbox 0.6
...
We needed to tweak the redactions because snapbox no longer normalizes
slashes on redactions unless the data type is a `PathBuf`.
2024-05-27 21:26:20 -05:00
Ed Page
0bd034cd06
refactor(test): Split up calls by type
2024-05-27 21:24:43 -05:00
Ed Page
4a6f25c112
refactor: Resolve snapbox deprecations
2024-05-27 10:28:13 -05: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
Urgau
1e4857a4d9
Allow lint config to have extra custom configs
...
And report the unused manifest key warning for every key that we do not
use, which is currently every of them.
2024-05-16 17:03:42 +02:00
heisen-li
1f48eab757
fix(toml): remove lib.plugin key
2024-05-16 20:03:26 +08:00
Weihang Lo
2fd4b440bc
test: use git clone --bare
instead of manual mv
2024-05-16 00:14:12 -04:00
Weihang Lo
699f6f454d
test: set safe.directory for git repo in apache container
...
See f4aa8c8bb1
2024-05-16 00:14:12 -04: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
Weihang Lo
a47766149f
test(rustfix): bless multiple-solutions.nightly.rs
2024-05-09 09:30:25 -04:00
Weihang Lo
26bcf58bfe
test(rustfix): run some tests only on nightly
2024-05-09 09:30:25 -04:00
Ed Page
befb66d9ce
style(test): Remove check-cfg warning
...
This is currently breaking CI because we run effectively `RUSTDOCFLAGS=-Dwarnings cargo +nightly doc`
2024-05-06 16:52:29 +02: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
Ed Page
627b1d1470
feat(fix): Migrate inherited deps with ignored default-features
2024-05-01 12:43:47 -05:00
Ed Page
1e6047763d
fix(toml): Warn, rather than fail publish, if build.rs is excluded
...
This could offer a minor performance gain when reading this manifest
since the target doesn't need to be discovered.
2024-04-29 12:25:19 -05:00
Ed Page
39f1a210b8
perf(toml): Avoid looking up readme on published packages
...
Not much of a performance gain;
this is mostly done to be consistent with the target work.
2024-04-29 12:25:19 -05:00
Ed Page
bdd4bda518
fix(toml)!: Remove support for inheriting badges
...
We allowed `[badges]` to inherit from `[workspace.package.badges]`
This was a bug:
- This was not specified in the RFC
- We did not document this
- Even if someone were to try to guess to use this, it is inconsistent
with how inheritance works because this should inherit from
`workspace.badges` instead of `workspace.package.badges`
While keeping in mind that `[badges]` is effectively deprecated.
In that context, I think its safe to break support for this without a
transition period.
Fixes #13643
2024-04-22 14:22:01 -05:00
Ed Page
705c4f1cae
chore(ci): Don't check cargo
against beta channel
...
We already only partially check it and it has been a source of false
positives.
While there is trust in the job, contributors and maintainers go into
the job assuming there is a problem and it takes time to break that
assumption.
If we lose trust in the job, we then won't trust it when it fails for
other reasons.
This also increases the risk of us not seeing other problems
`bump-checks` is meant to find if the steps in the job get re-arranged
to make this one of the early ones.
2024-04-29 09:05:33 -05:00
bors
70fb498994
Auto merge of #13797 - Muscraft:cleanup-linting-system, r=epage
...
Cleanup linting system
There are a number of problems with the current linting system, most notably that lints could run without `-Zcargo-lints` being set. This PR fixes that issue and a few others that are low-hanging fruit.
2024-04-24 16:31:40 +00:00
bors
125aa57ad2
Auto merge of #13782 - klensy:llibc, r=weihanglo
...
gate some libc usages under cfg(unix), drop os_info features
Places few `libc` usages under `cfg(unix)`. That didn't remove it from tree, but still looks cleaner.
Drop features from os_info crate, as serde support currently unused.
2024-04-23 17:32:32 +00:00
Scott Schafer
11d6013c1d
fix(cargo-lints): Respect Forbid lint level
2024-04-20 20:12:47 -06:00
klensy
3215929365
gate some libc usages under cfg(unix)
2024-04-19 15:27:21 +03:00
Sebastian Thiel
07d2bd7517
reproduce failure when packaging a path-dependency inside a symlinked git repository ( #13773 )
2024-04-19 07:11:37 +02:00
Ed Page
6d8d3b6420
fix(schemas): Allow parsing pre-release with X
2024-04-17 16:49:22 -05:00