Commit graph

620 commits

Author SHA1 Message Date
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
Weihang Lo f9e726b056
refactor(util-schemas): make error enum private 2023-12-20 10:38:03 -05:00
Weihang Lo a0201cd465
refactor(util-schemas): make fn in restricted_names crate private
pub
2023-12-20 10:38:02 -05:00
Weihang Lo d1e1c3d0aa
refactor(util-schemas): remove unused arg 2023-12-20 10:38:02 -05:00
Weihang Lo f1216495bb
refactor(util-schemas): remove anyhow 2023-12-20 10:38:02 -05:00
Weihang Lo 1e577614c5
refactor(util-schemas): error type for PackageIdSpec 2023-12-20 10:38:02 -05:00
Weihang Lo a3267bfa29
refactor(util-schemas): error type for restricted_names 2023-12-20 10:38:02 -05:00
bors c21be2b7cf Auto merge of #13168 - leonzchang:handlebars-v4, r=epage
chore(deps): update rust crate handlebars to `v4.5.0`

In the latest version of `handlebars`, rules for whitespace auto elimination is to check if the directive `{{# xxx}}`` and ``{{/ xxx}}` is holding a whole line, with leading and trailing whitespaces counted, and then remove the trailing NEWLINE (See [`template.rs`](9d7d555628/src/template.rs (L568-L889))).

```md
{{#options}}
                              <--- this newline will be removed after a standalone block
{{#option "`-o` _outdir_"}}
                              <--- this newline will be removed
Some content

{{/option}}
                              <--- this newline will be removed
{{/options}}
                              <--- this newline will be removed
```

This PR changes includes (fixes #13162):
1. update `handlebars` crate to `v4.5.0`.
2. add extra NEWLINE to helper blocks `options`, `option` to align with the new strip rules, preserving the original behavior.
3. update doc(the rest handlebars expression) to align with the new strip rules..
2023-12-20 14:52:29 +00:00
leonzchang b96b244c28
update handlebars & fix tests & update doc 2023-12-20 11:12:49 +08:00
Weihang Lo 90017c0747
refactor(util-schemas): error type for RustVerion 2023-12-19 18:28:01 -05:00
Weihang Lo d7b811b686
refactor(util-schemas): error type for PartialVersion 2023-12-19 18:28:01 -05:00
Weihang Lo da6cf9cde2
refactor(util-schemas): add thiserror 2023-12-19 03:34:35 -05:00
bors 69255bb10d Auto merge of #13184 - weihanglo:ws-homepage, r=epage
refactor: clean up package metadata

Like #12352 but for `homepage` and `repository`.

Inspired by <https://github.com/rust-lang/cargo/pull/13178#discussion_r1429394873>.
2023-12-18 22:12:59 +00:00
Weihang Lo ad2c45bde9
refactor: clean up package metadata
Like PR 12352 but for homepage and repository

Versions for

* `cargo-credential-1password`
* `cargo-util-schemas`
* `home`

are bumped along with the change.
2023-12-18 16:09:03 -05:00
Weihang Lo 0ac9cdeeec
ci: check SemVer for cargo-util-schemas on CI 2023-12-18 15:56:13 -05:00
Ed Page 633929d3aa refactor(schemas): Pull out cargo-util-schemas crate
Fixes #12801
2023-12-15 13:22:25 -06:00
bors 9c1316ff3f Auto merge of #13181 - hi-rustin:rustin-patch-rename-files, r=weihanglo
chore(rustfix): rename Readme.md to README.md
2023-12-18 15:04:01 +00:00
hi-rustin 0b6c229e9d chore(rustfix): remove useless clippy rules
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-18 20:17:05 +08:00
hi-rustin b8e2f75881 chore(rustfix): fix a typo
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-18 20:10:28 +08:00
hi-rustin efdaf4bbc6 chore(rustfix): rename Changelog.md to CHANGELOG.md
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-18 20:05:52 +08:00
hi-rustin 88993a3bbe chore(rustfix): rename Readme.md to README.md
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-18 20:04:50 +08:00
Ed Page c7bcc6c199
docs(home): Set release date 2023-12-15 12:32:15 -06:00
Guillaume Dallenne 7ce9c26f39
docs(home): prepare the changelog for 0.5.9 2023-12-15 19:04:51 +01:00
Chris Denton 6e11c77384
Replace SHGetFolderPathW with SHGetKnownFolderPath 2023-12-15 03:36:39 +00:00
Weihang Lo 516313379e
chore(bump-check): dont check home against beta/stable branches
The publish of home is not tied with Rust release process, hence.
2023-12-13 18:21:55 -05:00
bors 1aa9df1a5b Auto merge of #13158 - Turbo87:crates-io-status-codes, r=epage
crates-io: Add support for other 2xx HTTP status codes

Replying with `201 Created` of `202 Accepted` should not result in showing errors.

Related:

- https://github.com/rust-lang/cargo/issues/3995
- https://github.com/rust-lang/cargo/pull/6771
2023-12-12 14:52:31 +00:00
Tobias Bieniek 32d4c0fd80
crates-io: Add support for other 2xx HTTP status codes
Replying with `201 Created` of `202 Accepted` should not result in showing errors.
2023-12-12 13:33:03 +01:00
Ed Page 808e2a174f refactor(schema): Adopt RustVersion 2023-12-11 13:44:14 -06:00
bors 749654c5fd Auto merge of #13132 - arlosi:cachedir, r=epage
Avoid writing CACHEDIR.TAG if it already exists

Cargo currently unconditionally writes `CACHEDIR.TAG` files even if they already exist.

This practice causes problems for build systems that disallow multiple writes to the same file.
2023-12-07 22:37:55 +00:00
Arlo Siemsen 04af5e7a06 Avoid writing CACHEDIR.TAG if it already exists 2023-12-07 14:51:01 -06:00
Ed Page 96f8517a28 test(mdman): Switch to snapbox
- We use it elsewhere
- We don't have to bake our own snapshotting solution
- It is more obvious how to update the snapshots
2023-12-01 15:31:27 -06:00
renovate[bot] ab6adab01b
chore(deps): update compatible 2023-12-01 17:33:18 +00:00
Ed Page 378502bf20 refactor: Try to make PackageId conversion clearer 2023-12-01 10:48:14 -06:00
bors c192d989b3 Auto merge of #13091 - weihanglo:trim-paths-lldb, r=epage
test(trim-paths): exercise with real world debugger
2023-12-01 15:47:10 +00:00
Weihang Lo 5c32fe0432
test(trim-paths): exercise with real world debugger 2023-12-01 08:48:24 -05:00
Eric Huss 1aa769240d Add more options to registry test support. 2023-11-30 16:39:08 -08:00
Ed Page a43e09073c test(resolver): Don't bother generating public cases 2023-11-29 13:11:39 -06:00
Ed Page e6da166c8b test(resolver-tests): Remove public dep support from SAT resolver 2023-11-29 12:17:26 -06:00
Ed Page 71172d52b5 fix(resolver): Remove unused public-deps error handling
To implement rust-lang/rfcs#3516, we need to decouple the resolver's
behavior from the unstable flag.  Since the code path is now dead, I
went ahead and removed it.
2023-11-22 15:20:10 -06:00
Weihang Lo 21274da65b
chore: bump rustfix to 0.7.0 2023-11-27 10:50:10 -05:00
Weihang Lo ed347ce4dc
refactor: use custom error instead of anyhow 2023-11-27 10:50:10 -05:00
bors 3920bd5ea5 Auto merge of #13047 - tompscanlan:rustfix-ignored-tests, r=weihanglo
review and remove ignored tests in rustfix

### What does this PR try to resolve?
review ignored tests in rustfix crate per #13034.

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

### Additional information

* Removed unproductive test in `parse_and_replace`
* un-ignore proptests, and reduce runtime from ~2s to ~<.25s
2023-11-26 17:14:11 +00:00
Tom Scanlan b179cd175a
review and remove ignored tests in rustfix
* reduce time in proptest
* delete edition dir
* remove refs to fixmode::EDITION
2023-11-26 09:29:18 -05:00
bors 35ed69cb1b Auto merge of #13048 - weihanglo:rustfix-doc, r=epage
docs: add doc comments for rustfix
2023-11-25 23:45:45 +00:00
Weihang Lo 358b7ae76d
docs(rustfix): add more doc comments 2023-11-25 17:48:21 -05:00
Weihang Lo 27b7c6c203
docs(rustfix): comments for diagnostic JSON output
Most doc comments are copied from rust-lang/rust repo.

The doc for each item is hand-written as there is no comment in the
original place.
2023-11-25 13:09:39 -05:00
Tom Scanlan e9e22e5c2f try running on windows 2023-11-23 18:34:56 -05:00
bors 65d0eb536d Auto merge of #12997 - hi-rustin:rustin-patch-cargo-test-support, r=epage
cargo-test-support: Add features to the default Cargo.toml file
2023-11-22 01:47:31 +00:00
bors eed300d5e8 Auto merge of #13005 - ehuss:rustfix, r=weihanglo
Migrate rustfix to the cargo repo

This migrates the `rustfix` crate from https://github.com/rust-lang/rustfix/ to the cargo repo. The cargo team has been responsible for the client-side of `cargo fix`, and it can make it easier to maintain with all our tooling and tracking here. This crate is used by some external parties (like the compiler), so it will need to be maintained like an "ecosystem" package, but hopefully there shouldn't be any outside requirements (I haven't seen any in several years).

After merging, I'll follow up with some things to address in the future, such as:
- Migrating issues from the other repo.
- Opening new issues for some cleanup tasks, such as adding documentation, fixing the `#[ignore]` annotations, fixing testing on windows, maybe migrating the test code to use different dependencies, various code cleanup.
- Archiving the repo.
2023-11-21 18:36:36 +00:00