diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 928485cbf..2c77d8adf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,12 +108,9 @@ jobs: path: 'semver' - name: Install rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: rustfmt, clippy - profile: minimal - override: true - uses: Swatinem/rust-cache@v2 with: @@ -122,16 +119,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1 - name: cargo clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path semver/Cargo.toml --workspace --all-features --all-targets -- -D warnings --allow deprecated + run: cargo clippy --manifest-path semver/Cargo.toml --workspace --all-features --all-targets -- -D warnings --allow deprecated - name: cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path semver/Cargo.toml -- --check + run: cargo fmt --manifest-path semver/Cargo.toml -- --check - name: cargo doc env: @@ -144,7 +135,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} strategy: matrix: - toolchain: ["1.65", "1.66", "stable", "beta"] + toolchain: ["1.65", "1.66", "1.67", "stable", "beta"] experimental: [false] include: - toolchain: "nightly" @@ -157,22 +148,17 @@ jobs: path: 'semver' - name: Install rust - uses: actions-rs/toolchain@v1 + id: toolchain + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - profile: minimal - override: true - - - shell: bash - run: | - rustc --version | tee .rustc-version - name: restore test rustdocs id: cache-test-rustdocs uses: actions/cache@v3 with: path: semver/localdata/test_data/ - key: test-rustdocs-${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/test_crates/**/Cargo.toml') }} + key: test-rustdocs-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/test_crates/**/Cargo.toml') }} - name: Regenerate test data if: steps.cache-test-rustdocs.outputs.cache-hit != 'true' @@ -207,11 +193,7 @@ jobs: path: 'semver' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: @@ -249,11 +231,7 @@ jobs: path: 'semver' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: @@ -310,21 +288,14 @@ jobs: fail-on-cache-miss: true - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.67 - profile: minimal - override: true - - - shell: bash - run: | - rustc --version | tee .rustc-version + id: toolchain + uses: dtolnay/rust-toolchain@1.67 - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: cross-version-caching-${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: cross-version-caching-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -344,15 +315,11 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: cross-version-caching-${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: cross-version-caching-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.68 - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - name: Check with older rustdoc version cached run: | @@ -371,6 +338,9 @@ jobs: export OLD_RUSTDOC_VERSION="$(jq .format_version subject-new/target/semver-checks/cache/registry-libp2p_core-0_37_0.json)" # Run cargo-semver-checks with the older cached file. + # In a prior step, we installed stable Rust, so we'll set that as the default + # for cargo-semver-checks to invoke here. + rustup override set stable bins/cargo-semver-checks semver-checks check-release --manifest-path="subject-new/core/Cargo.toml" --verbose export NEW_RUSTDOC_VERSION="$(jq .format_version subject-new/target/semver-checks/cache/registry-libp2p_core-0_37_0.json)" @@ -406,11 +376,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable # rust-libp2p requires protobuf-compiler. - name: Install protobuf-compiler @@ -424,15 +391,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -458,7 +421,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-libp2p-dcutr-relay: @@ -489,11 +452,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable # rust-libp2p requires protobuf-compiler. - name: Install protobuf-compiler @@ -507,15 +467,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -539,7 +495,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-libp2p-gossipsub-request-response: @@ -567,11 +523,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable # rust-libp2p requires protobuf-compiler. - name: Install protobuf-compiler @@ -585,15 +538,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -617,7 +566,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-libp2p-uds: @@ -643,11 +592,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable # rust-libp2p requires protobuf-compiler. - name: Install protobuf-compiler @@ -661,15 +607,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -687,7 +629,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-core-graphics: @@ -715,11 +657,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable # This job runs on macOS, not Linux like the rest. # It should save its cache, because no other job will save it in its place. @@ -730,15 +669,11 @@ jobs: semver subject/target/semver-checks/local-core_graphics-0_22_3 - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Run semver-checks @@ -750,7 +685,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-bevy-core: @@ -777,11 +712,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -791,15 +723,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -817,7 +745,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-bevy-gltf: @@ -844,11 +772,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -858,15 +783,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -884,7 +805,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-sqllogictest: @@ -910,11 +831,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -924,15 +842,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -955,7 +869,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-tokio-explicit: @@ -981,11 +895,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore cargo index and rustdoc target dir uses: Swatinem/rust-cache@v2 @@ -1005,15 +916,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache # This test caught two bugs: @@ -1037,7 +944,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-tokio-implicit: @@ -1063,11 +970,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore cargo index and rustdoc target dir uses: Swatinem/rust-cache@v2 @@ -1087,15 +991,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache # This test caught a bug where `publish = false` items in a workspace were semver-checked @@ -1109,7 +1009,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-clap: @@ -1144,11 +1044,8 @@ jobs: path: 'subject-baseline' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -1158,15 +1055,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject-current/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -1233,7 +1126,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject-current/target/semver-checks/cache run-on-ref-slice-fork: @@ -1266,11 +1159,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -1280,15 +1170,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - shell: bash - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache - name: Restore cargo index and rustdoc target dir @@ -1337,7 +1223,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc path: subject/target/semver-checks/cache run-on-ref-slice-fork-windows: @@ -1365,11 +1251,8 @@ jobs: path: 'subject' - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - name: Restore binary id: cache-binary @@ -1379,14 +1262,11 @@ jobs: key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true - - run: | - rustc --version | tee .rustc-version - - name: Restore rustdoc id: cache uses: actions/cache/restore@v3 with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver\**\Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver\**\Cargo.lock') }}-${{ github.job }}-rustdoc path: subject\target\semver-checks\cache - name: Restore cargo index and rustdoc target dir @@ -1434,7 +1314,7 @@ jobs: uses: actions/cache/save@v3 if: steps.cache.outputs.cache-hit != 'true' with: - key: ${{ runner.os }}-${{ hashFiles('.rustc-version', 'semver\**\Cargo.lock') }}-${{ github.job }}-rustdoc + key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver\**\Cargo.lock') }}-${{ github.job }}-rustdoc path: subject\target\semver-checks\cache init-release: @@ -1463,11 +1343,8 @@ jobs: persist-credentials: false - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + id: toolchain + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd1d3abca..1e5c9d3df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,11 +29,7 @@ jobs: persist-credentials: true - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 @@ -79,11 +75,7 @@ jobs: persist-credentials: false - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + uses: dtolnay/rust-toolchain@stable - name: Upload binary uses: taiki-e/upload-rust-binary-action@v1 diff --git a/Cargo.lock b/Cargo.lock index 213b86589..04eb331d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,23 +35,57 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + [[package]] name = "anstyle" -version = "0.3.1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c697cc33851b02ab0c26b2e8a211684fbe627ff1cc506131f35026dd7686dd" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "assert_cmd" -version = "2.0.9" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0dcbed38184f9219183fcf38beb4cdbf5df7163a6d7cd227c6ac89b7966d6fe" +checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" dependencies = [ "anstyle", "bstr", @@ -125,12 +159,24 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" + [[package]] name = "block-buffer" version = "0.10.4" @@ -142,9 +188,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -206,11 +252,15 @@ dependencies = [ "bugreport", "cargo_metadata", "cargo_toml", + "chrono", "clap", "clap-cargo", "clap-verbosity-flag", "crates-index", + "crates_io_api", + "csv", "directories", + "gag", "git2", "handlebars", "human-panic", @@ -218,6 +268,7 @@ dependencies = [ "itertools", "lazy_static", "log", + "regex", "ron 0.7.1", "semver", "serde", @@ -286,11 +337,11 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" dependencies = [ - "bitflags", + "bitflags 2.0.2", "clap_derive", "clap_lex", "is-terminal", @@ -322,22 +373,22 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" +checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" dependencies = [ "os_str_bytes", ] @@ -353,21 +404,29 @@ dependencies = [ ] [[package]] -name = "concolor" -version = "0.0.12" +name = "concolor-override" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b3e3c41e9488eeda196b6806dbf487742107d61b2e16485bcca6c25ed5755b" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" dependencies = [ - "bitflags", - "concolor-query", - "is-terminal", + "windows-sys 0.45.0", ] [[package]] -name = "concolor-query" -version = "0.1.0" +name = "core-foundation" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a90734b3d5dcf656e7624cca6bce9c3a90ee11f900e80141a7427ccfb3d317" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "core-foundation-sys" @@ -377,9 +436,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -405,6 +464,24 @@ dependencies = [ "toml 0.7.3", ] +[[package]] +name = "crates_io_api" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fdfaac64c5eb7a33a5b895ffbaf6f1146721b6cd4c889010d19c8a1c1cae562" +dependencies = [ + "chrono", + "futures", + "log", + "reqwest", + "serde", + "serde_derive", + "serde_json", + "serde_path_to_error", + "tokio", + "url", +] + [[package]] name = "crossbeam-channel" version = "0.5.7" @@ -458,11 +535,32 @@ dependencies = [ "typenum", ] +[[package]] +name = "csv" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + [[package]] name = "cxx" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" +checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" dependencies = [ "cc", "cxxbridge-flags", @@ -472,9 +570,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" +checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" dependencies = [ "cc", "codespan-reporting", @@ -482,24 +580,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.10", ] [[package]] name = "cxxbridge-flags" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" +checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" [[package]] name = "cxxbridge-macro" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" +checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] @@ -550,6 +648,15 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + [[package]] name = "errno" version = "0.2.8" @@ -571,12 +678,47 @@ dependencies = [ "libc", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "filedescriptor" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" +dependencies = [ + "libc", + "thiserror", + "winapi", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.1.0" @@ -586,6 +728,105 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" + +[[package]] +name = "futures-executor" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" + +[[package]] +name = "futures-macro" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "futures-sink" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" + +[[package]] +name = "futures-task" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" + +[[package]] +name = "futures-util" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gag" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a713bee13966e9fbffdf7193af71d54a6b35a0bb34997cd6c9519ebeb5005972" +dependencies = [ + "filedescriptor", + "tempfile", +] + [[package]] name = "generic-array" version = "0.14.6" @@ -632,7 +873,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -641,7 +882,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -663,6 +904,25 @@ dependencies = [ "regex", ] +[[package]] +name = "h2" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "handlebars" version = "4.3.6" @@ -731,34 +991,105 @@ dependencies = [ "winapi", ] +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + [[package]] name = "human-panic" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d13dc3bae03e53a5e81a3944773631df2c5a33c060e195c1f7bf3fd0d2a696" +checksum = "0a6557b29bbdc9d6c7a5cdbe2962e78eaf48115e8d55b0b62282956981c1f605" dependencies = [ + "anstream", + "anstyle", "backtrace", - "concolor", "os_info", "serde", "serde_derive", - "termcolor", "toml 0.7.3", "uuid", ] +[[package]] +name = "hyper" +version = "0.14.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] @@ -800,35 +1131,51 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "io-lifetimes" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.45.0", ] +[[package]] +name = "ipnet" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" + [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", "rustix", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -946,6 +1293,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + [[package]] name = "miniz_oxide" version = "0.6.2" @@ -955,6 +1308,36 @@ dependencies = [ "adler", ] +[[package]] +name = "mio" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.45.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -999,6 +1382,32 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +[[package]] +name = "openssl" +version = "0.10.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "openssl-probe" version = "0.1.5" @@ -1007,18 +1416,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.1+1.1.1t" +version = "111.25.2+1.1.1t" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef9a9cc6ea7d9d5e7c4a913dc4b48d0e359eddf01af1dfec96ba7064b4aba10" +checksum = "320708a054ad9b3bf314688b5db87cf4d6683d64cfc835e2337924ae62bf4431" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.81" +version = "0.9.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176be2629957c157240f68f61f2d0053ad3a4ecfdd9ebf1e6521d18d9635cf67" +checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b" dependencies = [ "autocfg", "cc", @@ -1030,9 +1439,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c424bc68d15e0778838ac013b5b3449544d8133633d8016319e7e05a820b8c0" +checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", "serde", @@ -1041,9 +1450,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "percent-encoding" @@ -1081,7 +1490,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1095,6 +1504,18 @@ dependencies = [ "sha2", ] +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" version = "0.3.26" @@ -1103,9 +1524,9 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "predicates" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba7d6ead3e3966038f68caa9fc1f860185d95a793180bbcfe0d0da47b3961ed" +checksum = "c575290b64d24745b6c57a12a31465f0a66f3a4799686a6921526a33b0797965" dependencies = [ "anstyle", "difflib", @@ -1138,7 +1559,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1161,9 +1582,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" dependencies = [ "unicode-ident", ] @@ -1205,7 +1626,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1221,9 +1642,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -1238,9 +1659,46 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "reqwest" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +dependencies = [ + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] [[package]] name = "ron" @@ -1248,8 +1706,8 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86018df177b1beef6c7c8ef949969c4f7cb9a9344181b92486b23c79995bdaa4" dependencies = [ - "base64", - "bitflags", + "base64 0.13.1", + "bitflags 1.3.2", "serde", ] @@ -1259,16 +1717,16 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ - "base64", - "bitflags", + "base64 0.13.1", + "bitflags 1.3.2", "serde", ] [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -1276,33 +1734,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustdoc-types" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a61fb498f838b7da375722c088e3c2571c3fbe7fe38c8fa208a6de1a6fdc3907" -dependencies = [ - "serde", -] - -[[package]] -name = "rustdoc-types" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7745b68b43d89a088d2d270be09f54f948e587fc540cb15e3d3b75cb327a01c3" -dependencies = [ - "serde", -] - -[[package]] -name = "rustdoc-types" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd62550e9cd1e785b22928008446bdecc4e5b093abecc74186cbf45dee5adf12" -dependencies = [ - "serde", -] - [[package]] name = "rustdoc-types" version = "0.20.0" @@ -1314,16 +1745,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.9" +version = "0.36.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -1341,6 +1772,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys 0.42.0", +] + [[package]] name = "scopeguard" version = "1.1.0" @@ -1353,6 +1793,29 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +[[package]] +name = "security-framework" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.17" @@ -1364,22 +1827,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.156" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.156" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] @@ -1393,6 +1856,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b04f22b563c91331a10074bda3dd5492e3cc39d56bd557e91c0af42b6c7341" +dependencies = [ + "serde", +] + [[package]] name = "serde_spanned" version = "0.6.1" @@ -1402,6 +1874,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "sha2" version = "0.10.6" @@ -1419,6 +1903,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.10.0" @@ -1437,6 +1930,16 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a21dcece9b5991cfd1ece74654c8e3d0d5aab499d359b0395e38229c0bb5a3" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "strsim" version = "0.10.0" @@ -1454,6 +1957,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sys-info" version = "0.9.1" @@ -1464,6 +1978,19 @@ dependencies = [ "libc", ] +[[package]] +name = "tempfile" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.42.0", +] + [[package]] name = "termcolor" version = "1.2.0" @@ -1497,22 +2024,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] @@ -1551,6 +2078,47 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys 0.45.0", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.11" @@ -1583,9 +2151,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.7" +version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ "indexmap", "serde", @@ -1595,54 +2163,45 @@ dependencies = [ ] [[package]] -name = "trustfall-rustdoc-adapter" -version = "21.5.2" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac24fdb875cacf7d3a24a60e07720d5266e3b77f15b1294babf4162703d3850" -dependencies = [ - "rustdoc-types 0.17.0", - "trustfall_core", -] +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "trustfall-rustdoc-adapter" -version = "22.5.2" +name = "tracing" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2febb7c7ef340889a72bf7ef4bd5643947e456a83c262a0731a6465f0894c1db" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "rustdoc-types 0.18.0", - "trustfall_core", + "cfg-if", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "trustfall-rustdoc-adapter" -version = "23.2.1" +name = "tracing-core" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f52f10d42a8e0ec203855ad2306f38a12dd5be253dab21945a9763ce967c744" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "rustdoc-types 0.19.0", - "trustfall_core", + "once_cell", ] [[package]] name = "trustfall-rustdoc-adapter" version = "24.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2b792e093fdce04d43269f7456ff9cd14923ee10de723979ed9174e82ba3f8" dependencies = [ - "rustdoc-types 0.20.0", + "rustdoc-types", "trustfall_core", ] [[package]] name = "trustfall_core" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9270da3f637b107458c4c84a6595a9913aab71fb20a363119d7686e759d11b" +version = "0.3.2" dependencies = [ "async-graphql-parser", "async-graphql-value", - "camino", "chrono", "itertools", "lazy_static", @@ -1650,41 +2209,27 @@ dependencies = [ "regex", "ron 0.6.6", "serde", - "serde_json", "smallvec", "thiserror", - "trustfall_filetests_macros", -] - -[[package]] -name = "trustfall_filetests_macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709b815561cd5fc1b4a0572ec2e35d16f9ce65895318f147ee3602bbbf6cb24b" -dependencies = [ - "globset", - "proc-macro2", - "quote", - "syn", - "walkdir", ] [[package]] name = "trustfall_rustdoc" version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f350bb76f94a69f79a391c9f49d0f081df095bfbbb4b10f96ccfccc1dd4754f" dependencies = [ "anyhow", "serde", "serde_json", - "trustfall-rustdoc-adapter 21.5.2", - "trustfall-rustdoc-adapter 22.5.2", - "trustfall-rustdoc-adapter 23.2.1", - "trustfall-rustdoc-adapter 24.1.1", + "trustfall-rustdoc-adapter", "trustfall_core", ] +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + [[package]] name = "typenum" version = "1.16.0" @@ -1699,9 +2244,9 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "unicode-bidi" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -1735,6 +2280,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "1.3.0" @@ -1767,15 +2318,24 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" @@ -1809,10 +2369,22 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.84" @@ -1831,7 +2403,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1842,6 +2414,16 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +[[package]] +name = "web-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1873,6 +2455,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -1941,9 +2547,18 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winnow" -version = "0.3.6" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" dependencies = [ "memchr", ] + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] diff --git a/Cargo.toml b/Cargo.toml index a11a2afed..bd62f4734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,12 +9,13 @@ repository = "https://github.com/obi1kenobi/cargo-semver-checks" readme = "./README.md" keywords = ["semver", "check", "crate", "cargo"] categories = ["command-line-utilities", "development-tools::cargo-plugins"] +default-run = "cargo-semver-checks" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -trustfall_core = "0.1.1" -trustfall_rustdoc = { version = "0.8.2", features = ["v21", "v22", "v23", "v24"] } +trustfall_core = { version = "0.3.2", path = "../trustfall/trustfall_core" } +trustfall_rustdoc = { version = "0.8.2", features = ["v24"], path = "../trustfall-rustdoc" } clap = { version = "4.0.0", features = ["derive", "cargo"] } serde_json = "1.0.82" anyhow = "1.0.58" @@ -38,6 +39,11 @@ itertools = "0.10.5" cargo_toml = "0.15.2" toml = "0.5.9" directories = "4.0.1" +crates_io_api = { version = "0.8.1", optional = true } +gag = { version = "1.0.0", optional = true } +csv = { version = "1.2.1", optional = true } +regex = { version = "1.7.3", optional = true } +chrono = { version = "0.4.22", optional = true } [dev-dependencies] assert_cmd = "2.0" @@ -46,6 +52,11 @@ lazy_static = "1.4.0" [features] default = ["vendored-openssl"] vendored-openssl = ["crates-index/vendored-openssl"] +semver-crater = ["dep:crates_io_api", "dep:gag", "dep:csv", "dep:regex", "dep:chrono"] + +[[bin]] +name = "semver-crater" +required-features = ["semver-crater"] # In dev and test profiles, compile all dependencies with optimizations enabled, # but still checking debug assertions and overflows. diff --git a/src/bin/semver-crater.rs b/src/bin/semver-crater.rs new file mode 100644 index 000000000..78abc1840 --- /dev/null +++ b/src/bin/semver-crater.rs @@ -0,0 +1,257 @@ +use clap::Parser; +use itertools::Itertools; +use std::io::Read; + +#[derive(Parser, Debug)] +#[command(author)] +struct Args { + #[arg(short, long)] + crates: Vec, +} + +fn is_major_bump(prev: &semver::Version, next: &semver::Version) -> bool { + assert!(prev < next); + prev.major != next.major + || (next.major == 0 && prev.minor != next.minor) + || (next.major == 0 && next.minor == 0) +} + +fn is_minor_bump(prev: &semver::Version, next: &semver::Version) -> bool { + match is_major_bump(prev, next) { + true => false, + false => prev.minor != next.minor || next.major == 0, + } +} + +fn save_report( + name: &str, + baseline: &semver::Version, + current: &semver::Version, + result: anyhow::Result<(bool, String)>, + csv_writer: &mut csv::Writer, +) { + let mut write_record = |short_descr, full_output| { + csv_writer + .write_record([ + name, + &format!("{baseline} -> {current}"), + short_descr, + full_output, + ]) + .unwrap(); + }; + match result { + Ok((true, output)) => { + write_record("OK", &output); + } + Ok((false, output)) => { + let prefix = "--- failure "; + let suffix = ": "; + for found_match in regex::Regex::new(&format!("{prefix}(\\w*){suffix}")) + .unwrap() + .find_iter(&output) + { + let triggered_lint = found_match + .as_str() + .strip_prefix(prefix) + .unwrap() + .strip_suffix(suffix) + .unwrap(); + write_record(triggered_lint, &output); + } + } + Err(e) => { + write_record("compile error", &format!("{e:?}")); + } + } +} + +fn run_on_releases( + name: &str, + baseline: &semver::Version, + current: &semver::Version, +) -> anyhow::Result<(bool, String)> { + println!("comparing {name}: {baseline} -> {current}"); + // Capturing stderr's output (to parse it manually later), because currently + // the tool's reports dont't contain enough data needed for semver-crater. + // This method works only on linux. + let mut buf_stdout = gag::BufferRedirect::stdout().unwrap(); + let mut buf_stderr = gag::BufferRedirect::stderr().unwrap(); + + let report = cargo_semver_checks::Check::new(cargo_semver_checks::Rustdoc::from_registry( + current.to_string(), + )) + .with_baseline(cargo_semver_checks::Rustdoc::from_registry( + baseline.to_string(), + )) + .with_packages(vec![name.to_string()]) + .check_release()?; + + let mut output_stdout = String::new(); + let mut output_stderr = String::new(); + buf_stdout.read_to_string(&mut output_stdout).unwrap(); + buf_stderr.read_to_string(&mut output_stderr).unwrap(); + Ok((report.success(), output_stderr + &output_stdout)) + // Ok((report.success(), "".to_string())) +} + +fn run_and_save( + name: &str, + baseline: &semver::Version, + current: &semver::Version, + csv_writer: &mut csv::Writer, +) { + save_report( + name, + baseline, + current, + run_on_releases(name, baseline, current), + csv_writer, + ); +} + +fn check_crate( + versions: Vec, + name: &str, + csv_writer: &mut csv::Writer, +) { + // Considering only non-yanked non-prereleased versions + // that have been released since 2015. + let versions: Vec = versions + .into_iter() + .filter(|v| !v.yanked) + .filter(|v| v.created_at >= chrono::DateTime::parse_from_rfc3339("2017-01-01T00:00:00+00:00").unwrap()) + .map(|v| semver::Version::parse(&v.num).expect("couldn't parse a version")) + .filter(|v| v.pre.is_empty()) + .collect(); + + // Grouping each version into (major, minor, patch) vectors. + let mut groups: Vec>> = vec![vec![vec![versions + .first() + .expect("version list should be non-empty") + .clone()]]]; + for (next, prev) in versions.into_iter().tuple_windows() { + if is_major_bump(&prev, &next) { + groups.push(vec![vec![prev]]); + } else if is_minor_bump(&prev, &next) { + groups.last_mut().unwrap().push(vec![prev]); + } else { + groups.last_mut().unwrap().last_mut().unwrap().push(prev); + } + } + + for major_group in groups.into_iter() { + // Comparing versions only in each major group, + // because the tool doesn't run any lints on major bumps. + + let check_patch_releases = + |patch_group: &Vec, csv_writer: &mut csv::Writer| { + if patch_group.len() <= 1 { + return; + } + let newest = patch_group.first().unwrap(); + let oldest = patch_group.last().unwrap(); + match run_on_releases(name, oldest, newest) { + Ok((true, s)) => { + // Since comparing the first and last version returned no errors, + // there is no need to check versions between them. + save_report(name, oldest, newest, Ok((true, s)), csv_writer); + } + _ => { + for (current, baseline) in patch_group.iter().tuple_windows() { + run_and_save(name, baseline, current, csv_writer); + } + } + } + }; + + check_patch_releases(major_group.first().unwrap(), csv_writer); + for (previous_patch_group, patch_group) in major_group.iter().tuple_windows() { + // Comparing two adjacent versions that are a minor bump. + run_and_save( + name, + patch_group.first().unwrap(), + previous_patch_group.last().unwrap(), + csv_writer, + ); + + check_patch_releases(patch_group, csv_writer); + } + } +} + +fn get_crates(client: &crates_io_api::SyncClient, query: crates_io_api::CratesQuery) -> Vec { + match client.crates(query.clone()) { + Ok(page) => page.crates, + _ => { + println!("failed to get crates, probably because of network issues"); + get_crates(client, query) + }, + } +} + +fn get_versions(client: &crates_io_api::SyncClient, name: &str) -> Vec { + match client.get_crate(name) { + Ok(crate_) => crate_.versions, + _ => { + println!("failed to get versions, probably because of network issues"); + get_versions(client, name) + }, + } +} + +fn main() -> anyhow::Result<()> { + let args = Args::parse(); + let writer_file = std::fs::File::create("full_report.csv")?; + let mut csv_writer = csv::Writer::from_writer(writer_file); + + let client = crates_io_api::SyncClient::new( + // The format of the string and the duration + // is documented in https://crates.io/policies#crawlers + "crates_io_api: cargo-semver-checks (https://github.com/obi1kenobi/cargo-semver-checks/)", + std::time::Duration::from_millis(1000), + )?; + + match args.crates.is_empty() { + true => { + for page in 1..101 { + let mut query = crates_io_api::CratesQuery::builder() + .page_size(50) + .sort(crates_io_api::Sort::Downloads) + .build(); + query.set_page(page); + if page == 1 { + println!("skip {page}"); + } + else { + for crate_info in get_crates(&client, query).into_iter() { + let name = crate_info.name; + if name == "percent-encoding" || name == "idna" || name == "either" || name == "pin-project-lite" || name == "url" || name == "ppv-lite86" || name == "tokio" || name == "heck" || name == "unicode-width" || name == "slab" || name == "thiserror" || name == "thiserror-impl" || name == "futures" { + println!("skip {name}"); + } + else { + check_crate( + get_versions(&client, &name), + &name, + &mut csv_writer, + ); + csv_writer.flush()?; + } + } + } + } + } + false => { + for crate_name in args.crates { + check_crate( + get_versions(&client, &crate_name), + &crate_name, + &mut csv_writer, + ); + csv_writer.flush()?; + } + } + } + + Ok(()) +} diff --git a/src/query.rs b/src/query.rs index db70eca2e..d58907cbe 100644 --- a/src/query.rs +++ b/src/query.rs @@ -111,8 +111,7 @@ mod tests { use std::{collections::BTreeMap, path::Path}; use anyhow::Context; - use trustfall_core::ir::TransparentValue; - use trustfall_core::{frontend::parse, ir::FieldValue}; + use trustfall::{FieldValue, TransparentValue}; use trustfall_rustdoc::{ load_rustdoc, VersionedCrate, VersionedIndexedCrate, VersionedRustdocAdapter, }; @@ -189,15 +188,16 @@ mod tests { } #[test] - fn all_queries_parse_correctly() { + fn all_queries_are_valid() { let (_baseline_crate, current_crate) = &TEST_CRATE_RUSTDOCS["template"]; let indexed_crate = VersionedIndexedCrate::new(current_crate); - let adapter = - VersionedRustdocAdapter::new(&indexed_crate, None).expect("failed to create adapter"); - let schema = adapter.schema(); + let adapter = VersionedRustdocAdapter::new(&indexed_crate, Some(&indexed_crate)) + .expect("failed to create adapter"); for semver_query in SemverQuery::all_queries().into_values() { - let _ = parse(schema, semver_query.query).expect("not a valid query"); + let _ = adapter + .run_query(&semver_query.query, semver_query.arguments) + .expect("not a valid query"); } } @@ -246,7 +246,7 @@ mod tests { ); let mut actual_paths = actual_results[0]["path"] - .as_vec(|val| val.as_vec(FieldValue::as_str)) + .as_vec_with(|val| val.as_vec_with(FieldValue::as_str)) .expect("not a Vec>"); actual_paths.sort_unstable(); diff --git a/src/rustdoc_gen.rs b/src/rustdoc_gen.rs index 8490e32ab..265f9a1e8 100644 --- a/src/rustdoc_gen.rs +++ b/src/rustdoc_gen.rs @@ -95,7 +95,26 @@ impl<'a> CrateSource<'a> { // from regular features: https://github.com/obi1kenobi/cargo-semver-checks/issues/265 let mut all_crate_features = self.implicit_features(); all_crate_features.extend(self.regular_features()); - all_crate_features.into_iter().collect() + //all_crate_features.into_iter().collect() + /* + all_crate_features + .into_iter() + .filter(|s| { + !vec![ + "unstable", + "nightly", + "bench", + "no_std", + "rustc-dep-of-std", + "std", + ] + .into_iter() + .map(|x| x.to_string()) + .contains(s) + }) + .collect() + */ + vec![] } } @@ -128,6 +147,7 @@ fn create_placeholder_rustdoc_manifest( // Fixes: https://github.com/obi1kenobi/cargo-semver-checks/issues/261 version: Some(format!("={}", crate_.version())), features: crate_source.all_features(), + default_features: true, ..DependencyDetail::default() }, CrateSource::ManifestPath { manifest } => DependencyDetail { @@ -144,6 +164,7 @@ fn create_placeholder_rustdoc_manifest( .to_string() }), features: crate_source.all_features(), + default_features: true, ..DependencyDetail::default() }, };