From b2aecee7155c151f9b443db45957bf5075d5085d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Dec 2024 12:48:07 -0600 Subject: [PATCH 01/20] docs(contrib): Fix language --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9fca37f..ee501ec8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,18 +7,18 @@ appreciate any level you're willing to do. Need some new functionality to help? You can let us know by opening an [issue][new issue]. It's helpful to look through [all issues][all issues] in -case its already being talked about. +case it's already being talked about. ## Bug Reports Please let us know about what problems you run into, whether in behavior or ergonomics of API. You can do this by opening an [issue][new issue]. It's -helpful to look through [all issues][all issues] in case its already being +helpful to look through [all issues][all issues] in case it's already being talked about. ## Pull Requests -Looking for an idea? Check our [issues][issues]. If it's look more open ended, +Looking for an idea? Check our [issues][issues]. If the issue looks open ended, it is probably best to post on the issue how you are thinking of resolving the issue so you can get feedback early in the process. We want you to be successful and it can be discouraging to find out a lot of re-work is needed. From 15ede43536f52b96d69152522bf57156662960a3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 3 Dec 2024 12:54:52 -0600 Subject: [PATCH 02/20] docs(readme): Add a hyphen --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e6c4e79..ace2bb24 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 -license, shall be dual licensed as above, without any additional terms or +license, shall be dual-licensed as above, without any additional terms or conditions. [Crates.io]: https://crates.io/crates/PROJECT From 2f01ad6725cc0dfe275b8120bab58ff07d2bffe2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 16 Dec 2024 14:07:22 -0600 Subject: [PATCH 03/20] chore(ci): Allow 2-clause BSD --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index b6ecbe9c..ee5ae89b 100644 --- a/deny.toml +++ b/deny.toml @@ -87,6 +87,7 @@ allow = [ "MIT", "MIT-0", "Apache-2.0", + "BSD-2-Clause", "BSD-3-Clause", "MPL-2.0", "Unicode-DFS-2016", From e783559994c5e56d4d3327443dd70abb0f95ef68 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 18 Dec 2024 08:44:02 -0600 Subject: [PATCH 04/20] docs(contrib): Try to remove ambiguity about commits/PRs --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee501ec8..8048d243 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,15 +41,18 @@ As a heads up, we'll be running your PR through the following gauntlet: Not everything can be checked automatically though. We request that the commit history gets cleaned up. + We ask that commits are atomic, meaning they are complete and have a single responsibility. -PRs should tell a cohesive story, with test and refactor commits that keep the +A complete commit should build, pass tests, update documentation and tests, and not have dead code. + +PRs should tell a cohesive story, with refactor and test commits that keep the fix or feature commits simple and clear. Specifically, we would encourage - File renames be isolated into their own commit -- Add tests in a commit before their feature or fix, showing the current behavior. +- Add tests in a commit before their feature or fix, showing the current behavior (i.e. they should pass). The diff for the feature/fix commit will then show how the behavior changed, - making it clearer to reviewers and the community and showing people that the + making the commit's intent clearer to reviewers and the community, and showing people that the test is verifying the expected state. - e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520) From d159ec5290740054b9b344f995d453d37307e7ff Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 24 Jan 2025 11:54:12 -0600 Subject: [PATCH 05/20] test: Verify readme --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 2eabbd09..f66c1100 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,3 +4,7 @@ #![warn(clippy::print_stderr)] #![warn(clippy::print_stdout)] #![allow(non_snake_case)] // TODO: Delete me + +#[doc = include_str!("../README.md")] +#[cfg(doctest)] +pub struct ReadmeDoctests; From 743e4b83e75d65b2cb909aa85b4219c0d82a3acd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 20 Feb 2025 09:03:29 -0600 Subject: [PATCH 06/20] perf: Optimize release builds --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7e38ce35..6eb3113a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,15 @@ verbose_file_reads = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" +codegen-units = 1 +lto = true +debug = "line-tables-only" + [package] name = "PROJECT" version = "0.0.1" From 9a2e0cc0952b7e75fbe113fc5e1e4dc09a2c8941 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 5 Mar 2025 11:48:22 -0600 Subject: [PATCH 07/20] chore: Ensure MSRV-aware resolver is used --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..4a6a1abd --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[resolver] +incompatible-rust-versions = "fallback" From f4ac56d27673ecaea9bcfef20e72a9e51be05502 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 14 Mar 2025 10:48:58 -0500 Subject: [PATCH 08/20] chore: Lint for unnameable_types like unreachable_pub --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 6eb3113a..bc8afad3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ include = [ [workspace.lints.rust] rust_2018_idioms = { level = "warn", priority = -1 } +unnameable_types = "warn" unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" unused_lifetimes = "warn" From 77d28b23543fd98295b2c43696cc66ce5721e05e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 3 Apr 2025 12:08:52 -0500 Subject: [PATCH 09/20] style: Extra continues can communicate intent --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index bc8afad3..92d8817d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,7 +62,7 @@ lossy_float_literal = "warn" macro_use_imports = "warn" mem_forget = "warn" mutex_integer = "warn" -needless_continue = "warn" +needless_continue = "allow" needless_for_each = "warn" negative_feature_names = "warn" path_buf_push_overwrite = "warn" From 06061d8558c3d3cee369c7d81b2f4a7a0ea18f1e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 10 Apr 2025 11:35:50 -0500 Subject: [PATCH 10/20] chore(ci): Report more results --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fb9591c..7bcbd419 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets + run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets --keep-going minimal-versions: name: Minimal versions runs-on: ubuntu-latest @@ -82,7 +82,7 @@ jobs: - name: Downgrade dependencies to minimal versions run: cargo +nightly generate-lockfile -Z minimal-versions - name: Compile with minimal versions - run: cargo +stable check --workspace --all-features --locked + run: cargo +stable check --workspace --all-features --locked --keep-going lockfile: runs-on: ubuntu-latest steps: @@ -109,7 +109,7 @@ jobs: - name: Check documentation env: RUSTDOCFLAGS: -D warnings - run: cargo doc --workspace --all-features --no-deps --document-private-items + run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going rustfmt: name: rustfmt runs-on: ubuntu-latest @@ -155,7 +155,7 @@ jobs: sarif_file: clippy-results.sarif wait-for-processing: true - name: Report status - run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated + run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated coverage: name: Coverage runs-on: ubuntu-latest From 97755b3c011d292774d5a3199327bfb1dc29e6a6 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 30 Apr 2025 20:07:18 -0500 Subject: [PATCH 11/20] chore(ci): Improve perf at the cost of coverage --- .github/workflows/ci.yml | 4 ++-- .github/workflows/rust-next.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bcbd419..baf17232 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Build run: cargo test --workspace --no-run - name: Test - run: cargo hack test --feature-powerset --workspace + run: cargo hack test --each-feature --workspace msrv: name: "Check MSRV" runs-on: ubuntu-latest @@ -64,7 +64,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets --keep-going + run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going minimal-versions: name: Minimal versions runs-on: ubuntu-latest diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index e98386c4..be8b2dbe 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -40,7 +40,7 @@ jobs: - name: Build run: cargo test --workspace --no-run - name: Test - run: cargo hack test --feature-powerset --workspace + run: cargo hack test --each-feature --workspace latest: name: "Check latest dependencies" runs-on: ubuntu-latest @@ -58,4 +58,4 @@ jobs: - name: Build run: cargo test --workspace --no-run - name: Test - run: cargo hack test --feature-powerset --workspace + run: cargo hack test --each-feature --workspace From d1a562756a21d6ed9626ffcbb157af5841c4a1b5 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 7 May 2025 08:42:54 -0500 Subject: [PATCH 12/20] chore: Update RenovateBot --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7ab13b9f..cf3c8fe7 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -9,7 +9,7 @@ customManagers: [ { customType: 'regex', - fileMatch: [ + managerFilePatterns: [ '^rust-toolchain\\.toml$', 'Cargo.toml$', 'clippy.toml$', From 8c5c6ad69f2da2abaf2f8254df40ee1d52478837 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 7 May 2025 14:06:57 -0500 Subject: [PATCH 13/20] chore: Fix regex for renovatebot --- .github/renovate.json5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index cf3c8fe7..27749d4b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -10,12 +10,12 @@ { customType: 'regex', managerFilePatterns: [ - '^rust-toolchain\\.toml$', - 'Cargo.toml$', - 'clippy.toml$', - '\\.clippy.toml$', - '^\\.github/workflows/ci.yml$', - '^\\.github/workflows/rust-next.yml$', + '/^rust-toolchain\\.toml$/', + '/Cargo.toml$/', + '/clippy.toml$/', + '/\\.clippy.toml$/', + '/^\\.github/workflows/ci.yml$/', + '/^\\.github/workflows/rust-next.yml$/', ], matchStrings: [ 'STABLE.*?(?\\d+\\.\\d+(\\.\\d+)?)', From cf166e316a92ce71afd467e4c10affe29b7b3395 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 20 May 2025 14:58:07 -0500 Subject: [PATCH 14/20] chore(pre-commit): Update default stages --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68db968e..4acd1787 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,22 +3,22 @@ repos: rev: v4.5.0 hooks: - id: check-yaml - stages: [commit] + stages: [pre-commit] - id: check-json - stages: [commit] + stages: [pre-commit] - id: check-toml - stages: [commit] + stages: [pre-commit] - id: check-merge-conflict - stages: [commit] + stages: [pre-commit] - id: check-case-conflict - stages: [commit] + stages: [pre-commit] - id: detect-private-key - stages: [commit] + stages: [pre-commit] - repo: https://github.com/crate-ci/typos rev: v1.16.20 hooks: - id: typos - stages: [commit] + stages: [pre-commit] - repo: https://github.com/crate-ci/committed rev: v1.0.20 hooks: From a7bfa220ca56e7c6b0c9785a46e88d125bd8797b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 20 May 2025 15:00:06 -0500 Subject: [PATCH 15/20] chore(pre-commit): Use default stages --- .pre-commit-config.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4acd1787..8f7afc59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,24 +3,16 @@ repos: rev: v4.5.0 hooks: - id: check-yaml - stages: [pre-commit] - id: check-json - stages: [pre-commit] - id: check-toml - stages: [pre-commit] - id: check-merge-conflict - stages: [pre-commit] - id: check-case-conflict - stages: [pre-commit] - id: detect-private-key - stages: [pre-commit] - repo: https://github.com/crate-ci/typos rev: v1.16.20 hooks: - id: typos - stages: [pre-commit] - repo: https://github.com/crate-ci/committed rev: v1.0.20 hooks: - id: committed - stages: [commit-msg] From 65fdcf65ba58357ac3c2f85fe551627dbd22046f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 20 May 2025 15:03:11 -0500 Subject: [PATCH 16/20] chore(pre-commit): Update hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f7afc59..dbaa86ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-yaml - id: check-json @@ -9,10 +9,10 @@ repos: - id: check-case-conflict - id: detect-private-key - repo: https://github.com/crate-ci/typos - rev: v1.16.20 + rev: v1.32.0 hooks: - id: typos - repo: https://github.com/crate-ci/committed - rev: v1.0.20 + rev: v1.1.7 hooks: - id: committed From 7a72bd0e0dcfee16d8a59cb1c89042968e3d01f4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 20 May 2025 15:04:41 -0500 Subject: [PATCH 17/20] chore(pre-commit): Ensure commit-msg hook is installed --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbaa86ce..656c68ec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +default_install_hook_types: ["pre-commit", "commit-msg"] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 From 5e85d6859df1d28dc8208b5be9d8bd03756957b3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 27 May 2025 09:01:17 -0500 Subject: [PATCH 18/20] chore: Strip benches on publish --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 92d8817d..71ae7cf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,6 @@ include = [ "Cargo.lock", "LICENSE*", "README.md", - "benches/**/*", "examples/**/*" ] From f9842b3b3f920ef64c5fc06298b4762018d88809 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Jun 2025 12:27:10 -0500 Subject: [PATCH 19/20] chore: Avoid MSRV problems out of the box --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 71ae7cf8..0de8e135 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,7 +93,7 @@ panic = "abort" panic = "abort" codegen-units = 1 lto = true -debug = "line-tables-only" +# debug = "line-tables-only" # requires Cargo 1.71 [package] name = "PROJECT" From 66a7d10ab2f97e2bebdafbb746227d392e4b4c5e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Jun 2025 12:14:03 -0500 Subject: [PATCH 20/20] docs(readme): Specify code fence --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21f95c4b..97599d36 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,10 @@ which may look like this: Local Development ----------------- - cargo build - cargo test +```console +$ cargo build +$ cargo test +``` When submitting a PR please use [`cargo fmt`][] (nightly).