diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000000..c4a595b6185e --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,4 @@ +[alias] +build-man = "run --package xtask-build-man --" +stale-label = "run --package xtask-stale-label --" +unpublished = "run --package xtask-unpublished --" diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f465e1240374..5cee9c65c800 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: Bug Report description: Create a report to help us improve -labels: ["C-bug"] +labels: ["C-bug", "S-triage"] body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index bae2469d1003..e6ed547f82f9 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,6 @@ name: Feature Request description: Suggest an idea for enhancing Cargo -labels: ["C-feature-request"] +labels: ["C-feature-request", "S-triage"] body: - type: markdown attributes: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 400e725e5f22..342fdcc743f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,12 +24,6 @@ jobs: - run: rustup update stable && rustup default stable - run: rustup component add rustfmt - run: cargo fmt --all --check - - run: | - for manifest in `find crates benches/benchsuite benches/capture -name Cargo.toml` - do - echo check fmt for $manifest - cargo fmt --all --manifest-path $manifest --check - done # Ensure there are no clippy warnings clippy: @@ -39,7 +33,23 @@ jobs: - run: rustup update stable && rustup default stable - run: rustup component add clippy # Only check cargo lib for now - - run: cargo clippy -p cargo --lib -- -D warnings + # TODO: check every members + - run: cargo clippy -p cargo --lib --no-deps -- -D warnings + + stale-label: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update stable && rustup default stable + - run: cargo stale-label + + # Ensure Cargo.lock is up-to-date + lockfile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update stable && rustup default stable + - run: cargo update -p cargo --locked test: runs-on: ${{ matrix.os }} @@ -101,47 +111,39 @@ jobs: run: echo CARGO_CONTAINER_TESTS=1 >> $GITHUB_ENV if: matrix.os == 'ubuntu-latest' - - run: cargo test + - run: cargo test -p cargo - name: Clear intermediate test output run: ci/clean-test-output.sh - name: gitoxide tests (all git-related tests) - run: cargo test git + run: cargo test -p cargo git env: __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1 # The testsuite generates a huge amount of data, and fetch-smoke-test was # running out of disk space. - name: Clear test output run: ci/clean-test-output.sh + # This only tests `cargo fix` because fix-proxy-mode is one of the most + # complicated subprocess management in Cargo. - name: Check operability of rustc invocation with argfile + run: 'cargo test -p cargo --test testsuite -- fix::' env: __CARGO_TEST_FORCE_ARGFILE: 1 - run: | - # This only tests `cargo fix` because fix-proxy-mode is one of the most - # complicated subprocess management in Cargo. - cargo test --test testsuite -- fix:: - - run: cargo test --manifest-path crates/cargo-test-support/Cargo.toml - env: - CARGO_TARGET_DIR: target + - run: cargo test -p cargo-test-support - run: cargo test -p cargo-platform - run: cargo test -p cargo-util - - run: cargo test --manifest-path crates/home/Cargo.toml - - run: cargo test --manifest-path crates/mdman/Cargo.toml - - run: cargo build --manifest-path crates/credential/cargo-credential-1password/Cargo.toml - - run: cargo build --manifest-path crates/credential/cargo-credential-gnome-secret/Cargo.toml + - run: cargo test -p home + - run: cargo test -p mdman + - run: cargo build -p cargo-credential-1password + - run: cargo build -p cargo-credential-macos-keychain + - run: cargo build -p cargo-credential-wincred + - run: cargo build -p cargo-credential-gnome-secret if: matrix.os == 'ubuntu-latest' - - run: cargo build --manifest-path crates/credential/cargo-credential-macos-keychain/Cargo.toml - if: matrix.os == 'macos-latest' - - run: cargo build --manifest-path crates/credential/cargo-credential-wincred/Cargo.toml - if: matrix.os == 'windows-latest' - name: Check benchmarks - env: - # Share the target dir to try to cache a few build-time deps. - CARGO_TARGET_DIR: target run: | # This only tests one benchmark since it can take over 10 minutes to # download all workspaces. - cargo test --manifest-path benches/benchsuite/Cargo.toml --all-targets -- cargo - cargo check --manifest-path benches/capture/Cargo.toml + cargo test -p benchsuite --all-targets -- cargo + cargo check -p capture # The testsuite generates a huge amount of data, and fetch-smoke-test was # running out of disk space. - name: Clear benchmark output @@ -154,7 +156,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update stable && rustup default stable - - run: cargo test --manifest-path crates/resolver-tests/Cargo.toml + - run: cargo test -p resolver-tests test_gitoxide: runs-on: ubuntu-latest @@ -164,7 +166,7 @@ jobs: - run: rustup target add i686-unknown-linux-gnu - run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y - run: rustup component add rustfmt || echo "rustfmt not available" - - run: cargo test + - run: cargo test -p cargo env: __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1 @@ -175,7 +177,7 @@ jobs: - run: rustup update nightly && rustup default nightly - run: rustup component add rust-src - run: cargo build - - run: cargo test --test build-std + - run: cargo test -p cargo --test build-std env: CARGO_RUN_BUILD_STD_TESTS: 1 docs: @@ -187,26 +189,36 @@ jobs: - run: rustup component add rust-docs - run: ci/validate-man.sh # This requires rustfmt, use stable. - - run: cd src/doc/semver-check && cargo +stable run - - run: | + - name: Run semver-check + run: cargo +stable run -p semver-check + - name: Ensure intradoc links are valid + run: cargo doc --workspace --document-private-items --no-deps + env: + RUSTDOCFLAGS: -D warnings + - name: Install mdbook + run: | mkdir mdbook curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook echo `pwd`/mdbook >> $GITHUB_PATH - - run: cargo doc --document-private-items --no-deps - env: - RUSTDOCFLAGS: -D warnings - run: cd src/doc && mdbook build --dest-dir ../../target/doc - - run: | - cd src/doc - curl -sSLo linkcheck.sh \ - https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh - sh linkcheck.sh --all cargo + - name: Run linkchecker.sh + run: | + cd target + curl -sSLO https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh + sh linkcheck.sh --all --path ../src/doc cargo success: permissions: contents: none name: bors build finished - needs: [docs, rustfmt, test, resolver, build_std, test_gitoxide] + needs: + - build_std + - docs + - lockfile + - resolver + - rustfmt + - test + - test_gitoxide runs-on: ubuntu-latest if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" steps: @@ -215,7 +227,14 @@ jobs: permissions: contents: none name: bors build finished - needs: [docs, rustfmt, test, resolver, build_std] + needs: + - build_std + - docs + - lockfile + - resolver + - rustfmt + - test + - test_gitoxide runs-on: ubuntu-latest if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" steps: diff --git a/.gitignore b/.gitignore index 8e162b0ff423..1cd9ebdfa4fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ target Cargo.lock -.cargo /config.stamp /Makefile /config.mk diff --git a/CHANGELOG.md b/CHANGELOG.md index a3d488d9249f..40b55ed0e36f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,58 @@ # Changelog +## Cargo 1.71 (2023-07-13) +[84b7041f...HEAD](https://github.com/rust-lang/cargo/compare/84b7041f...HEAD) + +### Added + +### Changed + +- Better error message when getting an empty dependency table in Cargo.toml. + [#11997](https://github.com/rust-lang/cargo/pull/11997) +- Use restricted Damerau-Levenshtein algorithm to provide typo suggestions. + [#11963](https://github.com/rust-lang/cargo/pull/11963) + +### Fixed + +- Corrected the bug report URL for `cargo clippy --fix`. + [#11882](https://github.com/rust-lang/cargo/pull/11882) + +### Nightly only + +- Recompile on profile rustflags changes. + [#11981](https://github.com/rust-lang/cargo/pull/11981) + +### Documentation + +### Internal + +- Cargo is now a Cargo workspace. We dogfood ourselves finally. + [#11851](https://github.com/rust-lang/cargo/pull/11851) + [#11994](https://github.com/rust-lang/cargo/pull/11994) + [#11996](https://github.com/rust-lang/cargo/pull/11996) +- Allow win/mac credential managers to build on all platforms. + [#11993](https://github.com/rust-lang/cargo/pull/11993) +- Use `openssl` only on non-Windows platforms. + [#11979](https://github.com/rust-lang/cargo/pull/11979) +- A new, straightforward issue labels system for Cargo contributors. + [docs](https://doc.crates.io/contrib/issues.html) + [#11995](https://github.com/rust-lang/cargo/pull/11995) + [#12002](https://github.com/rust-lang/cargo/pull/12002) + [#12003](https://github.com/rust-lang/cargo/pull/12003) + ## Cargo 1.70 (2023-06-01) -[9880b408...HEAD](https://github.com/rust-lang/cargo/compare/9880b408...HEAD) +[9880b408...rust-1.70.0](https://github.com/rust-lang/cargo/compare/9880b408...rust-1.70.0) ### Added +- πŸŽ‰ Added `cargo logout` command for removing an API token from the registry locally. + [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-logout.html) + [#11919](https://github.com/rust-lang/cargo/pull/11919) + [#11950](https://github.com/rust-lang/cargo/pull/11950) +- Added `--ignore-rust-version` flag to `cargo install`. + [#11859](https://github.com/rust-lang/cargo/pull/11859) - The `CARGO_PKG_README` environment variable is now set to the path to the - README file when compiling a crate. + README file when compiling a crate. [#11645](https://github.com/rust-lang/cargo/pull/11645) - Cargo now displays richer information of Cargo target failed to compile. [#11636](https://github.com/rust-lang/cargo/pull/11636) @@ -18,6 +64,20 @@ ([docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#registry-protocols)) [#11791](https://github.com/rust-lang/cargo/pull/11791) [#11783](https://github.com/rust-lang/cargo/pull/11783) +- ❗ `cargo login` and `cargo logout` now uses the registry specified in + `registry.default`. This was an unintentional regression. + [#11949](https://github.com/rust-lang/cargo/pull/11949) +- `cargo update` accurately shows `Downgrading` status when downgrading dependencies. + [#11839](https://github.com/rust-lang/cargo/pull/11839) +- Added more information to HTTP errors to help with debugging. + [#11878](https://github.com/rust-lang/cargo/pull/11878) +- Added delays to network retries in Cargo. + [#11881](https://github.com/rust-lang/cargo/pull/11881) +- Refined `cargo puslish` message when waiting for a publish complete. + [#11713](https://github.com/rust-lang/cargo/pull/11713) +- Better error message when `cargo install` from a git repository but found + multiple packages. + [#11835](https://github.com/rust-lang/cargo/pull/11835) ### Fixed @@ -29,6 +89,15 @@ [#11805](https://github.com/rust-lang/cargo/pull/11805) - Don't panic when [`patch`] involved in dependency resolution results in a conflict. [#11770](https://github.com/rust-lang/cargo/pull/11770) +- Fixed credential token format validation. + [#11951](https://github.com/rust-lang/cargo/pull/11951) +- Added the missing token format validation on publish. + [#11952](https://github.com/rust-lang/cargo/pull/11952) +- Fixed case mismatches when looking up env vars in the Config snapshot. + [#11824](https://github.com/rust-lang/cargo/pull/11824) +- `cargo new` generates the correct `.hgignore` aligning semantics with other + VCS ignore files. + [#11855](https://github.com/rust-lang/cargo/pull/11855) ### Nightly only @@ -42,6 +111,8 @@ ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html##gitoxide)) [#11448](https://github.com/rust-lang/cargo/pull/11448) [#11800](https://github.com/rust-lang/cargo/pull/11800) + [#11822](https://github.com/rust-lang/cargo/pull/11822) + [#11830](https://github.com/rust-lang/cargo/pull/11830) - Removed `-Zjobserver-per-rustc`. Its rustc counterpart never got landed. [#11764](https://github.com/rust-lang/cargo/pull/11764) @@ -51,16 +122,69 @@ [#11793](https://github.com/rust-lang/cargo/pull/11793) - Enhanced the documentation of timing report with graphs. [#11798](https://github.com/rust-lang/cargo/pull/11798) +- Clarified requirements about the state of the registry index after publish. + [#11926](https://github.com/rust-lang/cargo/pull/11926) +- Clarified docs on `-C` that it appears before the command. + [#11947](https://github.com/rust-lang/cargo/pull/11947) +- Clarified working directory behaviour for `cargo test`, `cargo bench` and + `cargo run`. + [#11901](https://github.com/rust-lang/cargo/pull/11901) +- Fixed the doc of `registries.name.index` configuration. + [#11880](https://github.com/rust-lang/cargo/pull/11880) +- Notice for potential unexpected shell expansions in help text of `cargo-add`. + [#11826](https://github.com/rust-lang/cargo/pull/11826) +- Updated external-tools JSON docs. + [#11918](https://github.com/rust-lang/cargo/pull/11918) +- Call out the differences between the index JSON and the API or metadata. + [#11927](https://github.com/rust-lang/cargo/pull/11927) +- Consistently use `@` when mentioning pkgid format. + [#11956](https://github.com/rust-lang/cargo/pull/11956) +- Stopped using `UncanonicalizedIter` for `QueryKind::Exact`. + [#11937](https://github.com/rust-lang/cargo/pull/11937) +- Don't query permutations of the path prefix of a dependency in the registry index. + [#11936](https://github.com/rust-lang/cargo/pull/11936) +- Enabled clippy warning on `disallowed_methods` for `std::env::var` and friends. + [#11828](https://github.com/rust-lang/cargo/pull/11828) +- Enhanced Cargo Contributor Guide. + [#11825](https://github.com/rust-lang/cargo/pull/11825) + [#11842](https://github.com/rust-lang/cargo/pull/11842) + [#11869](https://github.com/rust-lang/cargo/pull/11869) + [#11876](https://github.com/rust-lang/cargo/pull/11876) +- Moved a part of Cargo Contributor Guide to Cargo API documentation. + [docs](https://doc.rust-lang.org/nightly/nightly-rustc/cargo) + [#11809](https://github.com/rust-lang/cargo/pull/11809) + [#11841](https://github.com/rust-lang/cargo/pull/11841) + [#11850](https://github.com/rust-lang/cargo/pull/11850) + [#11870](https://github.com/rust-lang/cargo/pull/11870) +- Cargo team now arranges + [office hours](https://github.com/rust-lang/cargo/wiki/Office-Hours)! + [#11903](https://github.com/rust-lang/cargo/pull/11903) ### Internal - Switched to `sha2` crate for SHA256 calculation. [#11795](https://github.com/rust-lang/cargo/pull/11795) [#11807](https://github.com/rust-lang/cargo/pull/11807) -- Updated to `base64` v0.21.0. +- Switched benchsuite to the index archive. + [#11933](https://github.com/rust-lang/cargo/pull/11933) +- Updated to `base64` 0.21.0. [#11796](https://github.com/rust-lang/cargo/pull/11796) +- Updated to `curl-sys` 0.4.61, which corresponds to curl 8.0.1. + [#11871](https://github.com/rust-lang/cargo/pull/11871) +- Updated to `proptest` 1.1.0. + [#11886](https://github.com/rust-lang/cargo/pull/11886) +- Updated to `git2` 0.17.0, which corresponds to libgit2 1.6.3. + [#11928](https://github.com/rust-lang/cargo/pull/11928) +- Updated to `clap` 4.2. + [#11904](https://github.com/rust-lang/cargo/pull/11904) - Integrated `cargo-deny` in Cargo its own CI pipeline. [#11761](https://github.com/rust-lang/cargo/pull/11761) +- Made non-blocking IO calls more robust. + [#11624](https://github.com/rust-lang/cargo/pull/11624) +- Dropped `derive` feature from `serde` in `cargo-platform`. + [#11915](https://github.com/rust-lang/cargo/pull/11915) +- Replaced `std::fs::canonicalize` with a more robust `try_canonicalize`. + [#11866](https://github.com/rust-lang/cargo/pull/11866) ## Cargo 1.69 (2023-04-20) [985d561f...rust-1.69.0](https://github.com/rust-lang/cargo/compare/985d561f...rust-1.69.0) @@ -72,7 +196,7 @@ [#11558](https://github.com/rust-lang/cargo/pull/11558) - Cargo now suggests `cargo add` if you try to install a library crate. [#11410](https://github.com/rust-lang/cargo/pull/11410) -- Cargo now sets `CARGO_BIN_NAME` environment variable also for binary examples. +- Cargo now sets the `CARGO_BIN_NAME` environment variable also for binary examples. [#11705](https://github.com/rust-lang/cargo/pull/11705) ### Changed @@ -82,13 +206,12 @@ Cargo will enable default features of that dependency. [#11409](https://github.com/rust-lang/cargo/pull/11409) - ❗ Deny `CARGO_HOME` in `[env]` configuration table. Cargo itself doesn't - pick up this value, but recursive calls to cargo will. We consider it as a - wrong behavior to only pass it to recursive invocations. + pick up this value, but recursive calls to cargo would, which was not intended. [#11644](https://github.com/rust-lang/cargo/pull/11644) -- ❗ Debuginfo for build dependencies is now off if not explicit set. This is - expected to boost the overall build time. +- ❗ Debuginfo for build dependencies is now off if not explicitly set. This is + expected to improve the overall build time. [#11252](https://github.com/rust-lang/cargo/pull/11252) -- Cargo now emits errors on invalid alphanumeric token for crates.io. +- Cargo now emits errors on invalid alphanumeric characters in a registry token. [#11600](https://github.com/rust-lang/cargo/pull/11600) - `cargo add` now checks only the order of `[dependencies]` without considering `[dependencies.*]`. diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000000..73d5add9f4f5 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3747 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[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.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 = "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.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "benchsuite" +version = "0.0.0" +dependencies = [ + "cargo", + "criterion", + "flate2", + "tar", + "url", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +dependencies = [ + "memchr", + "once_cell", + "regex-automata", + "serde", +] + +[[package]] +name = "btoi" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd6407f73a9b8b6162d8a2ef999fe6afd7cc15902ebf42c5cd296addf17e0ad" +dependencies = [ + "num-traits", +] + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "bytesize" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5" + +[[package]] +name = "camino" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +dependencies = [ + "serde", +] + +[[package]] +name = "capture" +version = "0.1.0" +dependencies = [ + "cargo_metadata", + "flate2", + "tar", + "toml", +] + +[[package]] +name = "cargo" +version = "0.72.0" +dependencies = [ + "anyhow", + "base64", + "bytesize", + "cargo-platform 0.1.3", + "cargo-test-macro", + "cargo-test-support", + "cargo-util", + "clap 4.2.1", + "crates-io", + "curl", + "curl-sys", + "env_logger 0.10.0", + "filetime", + "flate2", + "fwdansi", + "git2", + "git2-curl", + "gix", + "gix-features", + "glob", + "hex", + "hmac", + "home 0.5.5", + "http-auth", + "humantime 2.1.0", + "ignore", + "im-rc", + "indexmap", + "is-terminal", + "itertools", + "jobserver", + "lazy_static", + "lazycell", + "libc", + "libgit2-sys", + "log", + "memchr", + "opener", + "openssl", + "os_info", + "pasetors", + "pathdiff", + "pretty_env_logger", + "rand", + "rustfix", + "same-file", + "semver", + "serde", + "serde-value", + "serde_ignored", + "serde_json", + "sha1", + "shell-escape", + "snapbox", + "strip-ansi-escapes", + "tar", + "tempfile", + "termcolor", + "time", + "toml", + "toml_edit", + "unicode-width", + "unicode-xid", + "url", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "cargo-credential" +version = "0.2.0" + +[[package]] +name = "cargo-credential-1password" +version = "0.2.0" +dependencies = [ + "cargo-credential", + "serde", + "serde_json", +] + +[[package]] +name = "cargo-credential-gnome-secret" +version = "0.2.0" +dependencies = [ + "cargo-credential", + "pkg-config", +] + +[[package]] +name = "cargo-credential-macos-keychain" +version = "0.2.0" +dependencies = [ + "cargo-credential", + "security-framework", +] + +[[package]] +name = "cargo-credential-wincred" +version = "0.2.0" +dependencies = [ + "cargo-credential", + "windows-sys 0.48.0", +] + +[[package]] +name = "cargo-platform" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-test-macro" +version = "0.1.0" + +[[package]] +name = "cargo-test-support" +version = "0.1.0" +dependencies = [ + "anyhow", + "cargo-test-macro", + "cargo-util", + "crates-io", + "filetime", + "flate2", + "git2", + "glob", + "itertools", + "lazy_static", + "pasetors", + "serde", + "serde_json", + "snapbox", + "tar", + "termcolor", + "time", + "toml", + "url", + "windows-sys 0.48.0", +] + +[[package]] +name = "cargo-util" +version = "0.2.4" +dependencies = [ + "anyhow", + "core-foundation", + "filetime", + "hex", + "jobserver", + "libc", + "log", + "miow", + "same-file", + "sha2", + "shell-escape", + "tempfile", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "cargo_metadata" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +dependencies = [ + "camino", + "cargo-platform 0.1.2", + "semver", + "serde", + "serde_json", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "bitflags", + "textwrap", + "unicode-width", +] + +[[package]] +name = "clap" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_lex" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" + +[[package]] +name = "clru" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" + +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + +[[package]] +name = "const-oid" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" + +[[package]] +name = "content_inspector" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38" +dependencies = [ + "memchr", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +dependencies = [ + "libc", +] + +[[package]] +name = "crates-io" +version = "0.36.1" +dependencies = [ + "anyhow", + "curl", + "percent-encoding", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +dependencies = [ + "atty", + "cast", + "clap 2.34.0", + "criterion-plot", + "csv", + "itertools", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_cbor", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csv" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" +dependencies = [ + "csv-core", + "itoa 1.0.6", + "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 = "ct-codecs" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b7eb4404b8195a9abb6356f4ac07d8ba267045c8d6d220ac4dc992e6cc75df" + +[[package]] +name = "ctor" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "curl" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi", +] + +[[package]] +name = "curl-sys" +version = "0.4.61+curl-8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14d05c10f541ae6f3bc5b3d923c20001f47db7d5f0b2bc6ad16490133842db79" +dependencies = [ + "cc", + "libc", + "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi", +] + +[[package]] +name = "der" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b10af9f9f9f2134a42d3f8aa74658660f2e0234b0eb81bd171df8aa32779ed" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dunce" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" + +[[package]] +name = "ecdsa" +version = "0.16.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519-compact" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a3d382e8464107391c8706b4c14b087808ecb909f6c15c34114bc42e53a9e4c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "elliptic-curve" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime 1.3.0", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime 2.1.0", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" + +[[package]] +name = "filetime" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.48.0", +] + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "libz-sys", + "miniz_oxide", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fwdansi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c1f5787fe85505d1f7777268db5103d80a7a374d2316a7ce262e57baf8f208" +dependencies = [ + "memchr", + "termcolor", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "git2" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89511277159354bea13ae1e53e0c9ab85ba1b20d7e91618fa30e6bc5566857fb" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "git2-curl" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f8b7432b72928cff76f69e59ed5327f94a52763731e71274960dee72fe5f8c" +dependencies = [ + "curl", + "git2", + "log", + "url", +] + +[[package]] +name = "gix" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dabfac58aecb4a38cdd2568de66eb1f0d968fd6726f5a80cb8bea7944ef10cc0" +dependencies = [ + "gix-actor", + "gix-attributes", + "gix-config", + "gix-credentials", + "gix-date", + "gix-diff", + "gix-discover", + "gix-features", + "gix-glob", + "gix-hash", + "gix-hashtable", + "gix-index", + "gix-lock", + "gix-mailmap", + "gix-object", + "gix-odb", + "gix-pack", + "gix-path", + "gix-prompt", + "gix-protocol", + "gix-ref", + "gix-refspec", + "gix-revision", + "gix-sec", + "gix-tempfile", + "gix-transport", + "gix-traverse", + "gix-url", + "gix-validate", + "gix-worktree", + "log", + "once_cell", + "prodash", + "signal-hook", + "smallvec", + "thiserror", + "unicode-normalization", +] + +[[package]] +name = "gix-actor" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc22b0cdc52237667c301dd7cdc6ead8f8f73c9f824e9942c8ebd6b764f6c0bf" +dependencies = [ + "bstr", + "btoi", + "gix-date", + "itoa 1.0.6", + "nom", + "thiserror", +] + +[[package]] +name = "gix-attributes" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2231a25934a240d0a4b6f4478401c73ee81d8be52de0293eedbc172334abf3e1" +dependencies = [ + "bstr", + "gix-features", + "gix-glob", + "gix-path", + "gix-quote", + "thiserror", + "unicode-bom", +] + +[[package]] +name = "gix-bitmap" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "024bca0c7187517bda5ea24ab148c9ca8208dd0c3e2bea88cdb2008f91791a6d" +dependencies = [ + "thiserror", +] + +[[package]] +name = "gix-chunk" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0d39583cab06464b8bf73b3f1707458270f0e7383cb24c3c9c1a16e6f792978" +dependencies = [ + "thiserror", +] + +[[package]] +name = "gix-command" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c6f75c1e0f924de39e750880a6e21307194bb1ab773efe3c7d2d787277f8ab" +dependencies = [ + "bstr", +] + +[[package]] +name = "gix-config" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c62e26ce11f607712e4f49a0a192ed87675d30187fd61be070abbd607d12f1" +dependencies = [ + "bstr", + "gix-config-value", + "gix-features", + "gix-glob", + "gix-path", + "gix-ref", + "gix-sec", + "memchr", + "nom", + "once_cell", + "smallvec", + "thiserror", + "unicode-bom", +] + +[[package]] +name = "gix-config-value" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d09154c0c8677e4da0ec35e896f56ee3e338e741b9599fae06075edd83a4081c" +dependencies = [ + "bitflags", + "bstr", + "gix-path", + "libc", + "thiserror", +] + +[[package]] +name = "gix-credentials" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be32b5fe339a31b8e53fa854081dc914c45020dcb64637f3c21baf69c96fc1b" +dependencies = [ + "bstr", + "gix-command", + "gix-config-value", + "gix-path", + "gix-prompt", + "gix-sec", + "gix-url", + "thiserror", +] + +[[package]] +name = "gix-date" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96271912ce39822501616f177dea7218784e6c63be90d5f36322ff3a722aae2" +dependencies = [ + "bstr", + "itoa 1.0.6", + "thiserror", + "time", +] + +[[package]] +name = "gix-diff" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "103a0fa79b0d438f5ecb662502f052e530ace4fe1fe8e1c83c0c6da76d728e67" +dependencies = [ + "gix-hash", + "gix-object", + "imara-diff", + "thiserror", +] + +[[package]] +name = "gix-discover" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c204adba5ebd211c74735cbb65817d277e154486bac0dffa3701f163b80350" +dependencies = [ + "bstr", + "dunce", + "gix-hash", + "gix-path", + "gix-ref", + "gix-sec", + "thiserror", +] + +[[package]] +name = "gix-features" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b76f9a80f6dd7be66442ae86e1f534effad9546676a392acc95e269d0c21c22" +dependencies = [ + "bytes", + "crc32fast", + "crossbeam-channel", + "flate2", + "gix-hash", + "libc", + "once_cell", + "parking_lot", + "prodash", + "sha1_smol", + "thiserror", + "walkdir", +] + +[[package]] +name = "gix-glob" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e43efd776bc543f46f0fd0ca3d920c37af71a764a16f2aebd89765e9ff2993" +dependencies = [ + "bitflags", + "bstr", +] + +[[package]] +name = "gix-hash" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a258595457bc192d1f1c59d0d168a1e34e2be9b97a614e14995416185de41a7" +dependencies = [ + "hex", + "thiserror", +] + +[[package]] +name = "gix-hashtable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e55e40dfd694884f0eb78796c5bddcf2f8b295dace47039099dd7e76534973" +dependencies = [ + "gix-hash", + "hashbrown 0.13.2", + "parking_lot", +] + +[[package]] +name = "gix-index" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12caf7886c7ba06f2b28835cdc2be1dca86bd047d00299d2d49e707ce1c2616" +dependencies = [ + "bitflags", + "bstr", + "btoi", + "filetime", + "gix-bitmap", + "gix-features", + "gix-hash", + "gix-lock", + "gix-object", + "gix-traverse", + "itoa 1.0.6", + "memmap2", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-lock" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66119ff8a4a395d0ea033fef718bc85f8b4f0855874f4ce1e005fc16cfe1f66e" +dependencies = [ + "fastrand", + "gix-tempfile", + "thiserror", +] + +[[package]] +name = "gix-mailmap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b66aea5e52875cd4915f4957a6f4b75831a36981e2ec3f5fad9e370e444fe1a" +dependencies = [ + "bstr", + "gix-actor", + "thiserror", +] + +[[package]] +name = "gix-object" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df068db9180ee935fbb70504848369e270bdcb576b05c0faa8b9fd3b86fc017" +dependencies = [ + "bstr", + "btoi", + "gix-actor", + "gix-features", + "gix-hash", + "gix-validate", + "hex", + "itoa 1.0.6", + "nom", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-odb" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9a5f9e1afbd509761977a2ea02869cedaaba500b4e783deb2e4de5179a55a80" +dependencies = [ + "arc-swap", + "gix-features", + "gix-hash", + "gix-object", + "gix-pack", + "gix-path", + "gix-quote", + "parking_lot", + "tempfile", + "thiserror", +] + +[[package]] +name = "gix-pack" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51db84e1459a8022e518d40a8778028d793dbb28e4d35c9a5eaf92658fb0775" +dependencies = [ + "clru", + "gix-chunk", + "gix-diff", + "gix-features", + "gix-hash", + "gix-hashtable", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-traverse", + "memmap2", + "parking_lot", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-packetline" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63e5e5a9a92d4fc6b63ff9d94954d25c779ce25c98d5bbe2e4399aa42f7073c" +dependencies = [ + "bstr", + "hex", + "thiserror", +] + +[[package]] +name = "gix-path" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32370dce200bb951df013e03dff35b4233fc7a89458642b047629b91734a7e19" +dependencies = [ + "bstr", + "thiserror", +] + +[[package]] +name = "gix-prompt" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3034d4d935aef2c7bf719aaa54b88c520e82413118d886ae880a31d5bdee57" +dependencies = [ + "gix-command", + "gix-config-value", + "nix", + "parking_lot", + "thiserror", +] + +[[package]] +name = "gix-protocol" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d372ab11d5d28ac21800e3f1a6603a67c1ead57f6f5fab07e1e73e960f331c1" +dependencies = [ + "bstr", + "btoi", + "gix-credentials", + "gix-features", + "gix-hash", + "gix-transport", + "maybe-async", + "nom", + "thiserror", +] + +[[package]] +name = "gix-quote" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a282f5a8d9ee0b09ec47390ac727350c48f2f5c76d803cd8da6b3e7ad56e0bcb" +dependencies = [ + "bstr", + "btoi", + "thiserror", +] + +[[package]] +name = "gix-ref" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90a0ed29e581f04b904ecd0c32b11f33b8209b5a0af9c43f415249a4f2fba632" +dependencies = [ + "gix-actor", + "gix-features", + "gix-hash", + "gix-lock", + "gix-object", + "gix-path", + "gix-tempfile", + "gix-validate", + "memmap2", + "nom", + "thiserror", +] + +[[package]] +name = "gix-refspec" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aba332462bda2e8efeae4302b39a6ed01ad56ef772fd5b7ef197cf2798294d65" +dependencies = [ + "bstr", + "gix-hash", + "gix-revision", + "gix-validate", + "smallvec", + "thiserror", +] + +[[package]] +name = "gix-revision" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6f6ff53f888858afc24bf12628446a14279ceec148df6194481f306f553ad2" +dependencies = [ + "bstr", + "gix-date", + "gix-hash", + "gix-hashtable", + "gix-object", + "thiserror", +] + +[[package]] +name = "gix-sec" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ffa5bf0772f9b01de501c035b6b084cf9b8bb07dec41e3afc6a17336a65f47" +dependencies = [ + "bitflags", + "dirs", + "gix-path", + "libc", + "windows", +] + +[[package]] +name = "gix-tempfile" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88751f247234b1f73c8e8056fd835a0999b04e596e052302cb71186005dc4b27" +dependencies = [ + "libc", + "once_cell", + "parking_lot", + "signal-hook", + "signal-hook-registry", + "tempfile", +] + +[[package]] +name = "gix-transport" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d633947b36a2fbbc089195bdc71621158f1660c2ff2a6b12b0279c16e2f764bc" +dependencies = [ + "base64", + "bstr", + "curl", + "gix-command", + "gix-credentials", + "gix-features", + "gix-packetline", + "gix-quote", + "gix-sec", + "gix-url", + "thiserror", +] + +[[package]] +name = "gix-traverse" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd9a4a07bb22168dc79c60e1a6a41919d198187ca83d8a5940ad8d7122a45df3" +dependencies = [ + "gix-hash", + "gix-hashtable", + "gix-object", + "thiserror", +] + +[[package]] +name = "gix-url" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "044072b7ce8601b62dcec841b92129f5cc677072823324121b395d766ac5f528" +dependencies = [ + "bstr", + "gix-features", + "gix-path", + "home 0.5.5", + "thiserror", + "url", +] + +[[package]] +name = "gix-validate" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd629d3680773e1785e585d76fd4295b740b559cad9141517300d99a0c8c049" +dependencies = [ + "bstr", + "thiserror", +] + +[[package]] +name = "gix-worktree" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cb9af6e56152953d8fe113c4f9d7cf60cf7a982362711e9200a255579b49cb" +dependencies = [ + "bstr", + "gix-attributes", + "gix-features", + "gix-glob", + "gix-hash", + "gix-index", + "gix-object", + "gix-path", + "io-close", + "thiserror", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "globset" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "handlebars" +version = "3.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" +dependencies = [ + "log", + "pest", + "pest_derive", + "quick-error 2.0.1", + "serde", + "serde_json", + "walkdir", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "home" +version = "0.5.6" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "http-auth" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5430cacd7a1f9a02fbeb350dfc81a0e5ed42d81f3398cb0ba184017f85bdcfbc" +dependencies = [ + "memchr", +] + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error 1.2.3", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "im-rc" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" +dependencies = [ + "bitmaps", + "rand_core", + "rand_xoshiro", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "imara-diff" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98c1d0ad70fc91b8b9654b1f33db55e59579d3b3de2bffdced0fdb810570cb8" +dependencies = [ + "ahash", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[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-close" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "is-terminal" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.142" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" + +[[package]] +name = "libgit2-sys" +version = "0.15.0+1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "032e537ae4dd4e50c877f258dc55fcd0657b5021f454094a425bb6bcc9edea4c" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" + +[[package]] +name = "libnghttp2-sys" +version = "0.1.7+1.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "maybe-async" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "mdman" +version = "0.0.0" +dependencies = [ + "anyhow", + "handlebars", + "pretty_assertions", + "pulldown-cmark", + "same-file", + "serde_json", + "url", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "miow" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ffbca2f655e33c08be35d87278e5b18b89550a37dbd598c20db92f6a471123" +dependencies = [ + "windows-sys 0.42.0", +] + +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "static_assertions", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "opener" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "293c15678e37254c15bd2f092314abb4e51d7fdde05c2021279c12631b54f005" +dependencies = [ + "bstr", + "winapi", +] + +[[package]] +name = "openssl" +version = "0.10.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.14", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "111.25.3+1.1.1t" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ordered-float" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +dependencies = [ + "num-traits", +] + +[[package]] +name = "orion" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbe74a766292f94f7e69db5a7bf010eadd944f24186c463fe578a7e637582066" +dependencies = [ + "fiat-crypto", + "subtle", + "zeroize", +] + +[[package]] +name = "os_info" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +dependencies = [ + "log", + "serde", + "winapi", +] + +[[package]] +name = "output_vt100" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" +dependencies = [ + "winapi", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.45.0", +] + +[[package]] +name = "partial_ref" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f728bc9b1479656e40cba507034904a8c44027c0efdbbaf6a4bdc5f2d3a910c" +dependencies = [ + "partial_ref_derive", +] + +[[package]] +name = "partial_ref_derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e1d2cb5b898b5a5342e994e0d0c367dbfe69cbf717cd307045ec9fb057581" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "pasetors" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824bf633b85dc1dece2eb07161627ba5d90a951597cd5dbf8d85f4d82b7aea69" +dependencies = [ + "ct-codecs", + "ed25519-compact", + "getrandom", + "orion", + "p384", + "rand_core", + "regex", + "serde", + "serde_json", + "sha2", + "subtle", + "time", + "zeroize", +] + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pest" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.14", +] + +[[package]] +name = "pest_meta" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "plotters" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" + +[[package]] +name = "plotters-svg" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "pretty_assertions" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +dependencies = [ + "ctor", + "diff", + "output_vt100", + "yansi", +] + +[[package]] +name = "pretty_env_logger" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" +dependencies = [ + "env_logger 0.7.1", + "log", +] + +[[package]] +name = "primeorder" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8d3875361e28f7753baefef104386e7aa47642c93023356d97fdef4003bfb5" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prodash" +version = "23.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9516b775656bc3e8985e19cd4b8c0c0de045095074e453d2c0a513b5f978392d" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "proptest" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quote" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "resolver-tests" +version = "0.0.0" +dependencies = [ + "cargo", + "cargo-util", + "is-terminal", + "lazy_static", + "proptest", + "varisat", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustfix" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481" +dependencies = [ + "anyhow", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "rustix" +version = "0.37.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sec1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +dependencies = [ + "bitflags", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-check" +version = "0.0.0" +dependencies = [ + "tempfile", +] + +[[package]] +name = "serde" +version = "1.0.160" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.160" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.14", +] + +[[package]] +name = "serde_ignored" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94eb4a4087ba8bdf14a9208ac44fddbf55c01a6195f7edfc511ddaff6cae45a6" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_json" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +dependencies = [ + "itoa 1.0.6", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +dependencies = [ + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shell-escape" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" + +[[package]] +name = "signal-hook" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "similar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "snapbox" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9615402f9cff539301119bdf2c2f328739cf2b45c2116666618fb6ac399f75bb" +dependencies = [ + "anstream", + "anstyle", + "content_inspector", + "dunce", + "filetime", + "normalize-line-endings", + "similar", + "snapbox-macros", + "tempfile", + "walkdir", +] + +[[package]] +name = "snapbox-macros" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8e40c667388ed1cb5060f545d0013bf0a23efdfa6c5c3e9ef592de391cd860f" +dependencies = [ + "anstream", +] + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spki" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a5be806ab6f127c3da44b7378837ebf01dadca8510a0e572460216b228bd0e" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strip-ansi-escapes" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "011cbb39cf7c1f62871aea3cc46e5817b0937b49e9447370c93cacbe93a766d8" +dependencies = [ + "vte", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "tar" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.14", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +dependencies = [ + "itoa 1.0.6", + "libc", + "num_threads", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "ucd-trie" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-bom" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ec69f541d875b783ca40184d655f2927c95f0bffd486faa83cd3ac3529ec32" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "varisat" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe609851d1e9196674ac295f656bd8601200a1077343d22b345013497807caf" +dependencies = [ + "anyhow", + "itoa 0.4.8", + "leb128", + "log", + "ordered-float", + "partial_ref", + "rustc-hash", + "serde", + "thiserror", + "varisat-checker", + "varisat-dimacs", + "varisat-formula", + "varisat-internal-macros", + "varisat-internal-proof", + "vec_mut_scan", +] + +[[package]] +name = "varisat-checker" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135c977c5913ed6e98f6b81b8e4d322211303b7d40dae773caef7ad1de6c763b" +dependencies = [ + "anyhow", + "log", + "partial_ref", + "rustc-hash", + "smallvec", + "thiserror", + "varisat-dimacs", + "varisat-formula", + "varisat-internal-proof", +] + +[[package]] +name = "varisat-dimacs" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1dee4e21be1f04c0a939f7ae710cced47233a578de08a1b3c7d50848402636" +dependencies = [ + "anyhow", + "itoa 0.4.8", + "thiserror", + "varisat-formula", +] + +[[package]] +name = "varisat-formula" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395c5543b9bfd9076d6d3af49d6c34a4b91b0b355998c0a5ec6ed7265d364520" + +[[package]] +name = "varisat-internal-macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602ece773543d066aa7848455486c6c0422a3f214da7a2b899100f3c4f12408d" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "varisat-internal-proof" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6163bb7bc9018af077b76d64f976803d141c36a27d640f1437dddc4fd527d207" +dependencies = [ + "anyhow", + "varisat-formula", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_mut_scan" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ed610a8d5e63d9c0e31300e8fdb55104c5f21e422743a9dc74848fa8317fd2" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "vte" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983" +dependencies = [ + "arrayvec", + "utf8parse", + "vte_generate_state_changes", +] + +[[package]] +name = "vte_generate_state_changes" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 1.0.109", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +dependencies = [ + "memchr", +] + +[[package]] +name = "xtask-build-man" +version = "0.0.0" + +[[package]] +name = "xtask-stale-label" +version = "0.0.0" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "xtask-unpublished" +version = "0.0.0" +dependencies = [ + "anyhow", + "cargo", + "clap 4.2.1", + "env_logger 0.10.0", + "log", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/Cargo.toml b/Cargo.toml index 319037cde80f..b16a062fd69c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,18 @@ +[workspace] +resolver = "2" +members = [ + "crates/*", + "credential/*", + "benches/benchsuite", + "benches/capture", +] +exclude = [ + "target/", # exclude bench testing +] + [package] name = "cargo" -version = "0.71.0" +version = "0.72.0" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://crates.io" @@ -19,10 +31,10 @@ path = "src/cargo/lib.rs" anyhow = "1.0.47" base64 = "0.21.0" bytesize = "1.0" -cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" } +cargo-platform = { path = "crates/cargo-platform", version = "0.1.3" } cargo-util = { path = "crates/cargo-util", version = "0.2.4" } -clap = "4.2.0" -crates-io = { path = "crates/crates-io", version = "0.36.0" } +clap = { version = "4.2.0", features = ["wrap_help"] } +crates-io = { path = "crates/crates-io", version = "0.36.1" } curl = { version = "0.4.44", features = ["http2"] } curl-sys = "0.4.61" env_logger = "0.10.0" @@ -35,7 +47,7 @@ gix-features-for-configuration-only = { version = "0.28.0", package = "gix-featu glob = "0.3.0" hex = "0.4" hmac = "0.12.1" -home = "0.5" +home = "0.5.5" http-auth = { version = "0.1.6", default-features = false } humantime = "2.0.0" ignore = "0.4.7" @@ -51,7 +63,6 @@ libgit2-sys = "0.15.0" log = "0.4.6" memchr = "2.1.3" opener = "0.5" -openssl = { version = '0.10.11', optional = true } os_info = "3.5.0" pasetors = { version = "0.6.4", features = ["v3", "paserk", "std", "serde"] } pathdiff = "0.2" @@ -77,19 +88,18 @@ unicode-xid = "0.2.0" url = "2.2.2" walkdir = "2.2" -# A noop dependency that changes in the Rust repository, it's a bit of a hack. -# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` -# for more information. -rustc-workspace-hack = "1.0.0" +[target.'cfg(not(windows))'.dependencies] +openssl = { version = "0.10.50", optional = true } [target.'cfg(windows)'.dependencies] fwdansi = "1.1.0" [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.45" +version = "0.48" features = [ "Win32_Foundation", "Win32_Storage_FileSystem", + "Win32_System_Console", "Win32_System_IO", "Win32_System_Threading", "Win32_System_JobObjects", @@ -116,3 +126,5 @@ doc = false vendored-openssl = ["openssl/vendored"] vendored-libgit2 = ["libgit2-sys/vendored"] pretty-env-logger = ["pretty_env_logger"] +# This is primarily used by rust-lang/rust distributing cargo the executable. +all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-osx'] diff --git a/benches/benchsuite/Cargo.toml b/benches/benchsuite/Cargo.toml index f4bc3583a256..5cd4b2330cdb 100644 --- a/benches/benchsuite/Cargo.toml +++ b/benches/benchsuite/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "benchsuite" -version = "0.1.0" +version = "0.0.0" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo" -documentation = "https://docs.rs/cargo-platform" description = "Benchmarking suite for Cargo." +publish = false [dependencies] cargo = { path = "../.." } diff --git a/ci/validate-man.sh b/ci/validate-man.sh index 92df4978143c..a3f114214ddd 100755 --- a/ci/validate-man.sh +++ b/ci/validate-man.sh @@ -3,24 +3,25 @@ set -e -cd src/doc +cargo_man="src/doc" +mdman_man="crates/mdman/doc" -changes=$(git status --porcelain) +changes=$(git status --porcelain -- $cargo_man $mdman_man) if [ -n "$changes" ] then echo "git directory must be clean before running this script." exit 1 fi -./build-man.sh +cargo build-man -changes=$(git status --porcelain) +changes=$(git status --porcelain -- $cargo_man $mdman_man) if [ -n "$changes" ] then - echo "Detected changes in man pages:" + echo "Detected changes of man pages:" echo "$changes" echo - echo "Please run './build-man.sh' in the src/doc directory to rebuild the" - echo "man pages, and commit the changes." + echo 'Please run `cargo build-man` to rebuild the man pages' + echo "and commit the changes." exit 1 fi diff --git a/crates/cargo-platform/Cargo.toml b/crates/cargo-platform/Cargo.toml index a5e51ee5de3c..69a4e552ca29 100644 --- a/crates/cargo-platform/Cargo.toml +++ b/crates/cargo-platform/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://github.com/rust-lang/cargo" diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml index 91e6e4e34c16..a3a83148b365 100644 --- a/crates/cargo-test-support/Cargo.toml +++ b/crates/cargo-test-support/Cargo.toml @@ -29,4 +29,4 @@ toml = "0.7.0" url = "2.2.2" [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.45.0", features = ["Win32_Storage_FileSystem"] } +windows-sys = { version = "0.48.0", features = ["Win32_Storage_FileSystem"] } diff --git a/crates/cargo-test-support/src/publish.rs b/crates/cargo-test-support/src/publish.rs index 64774bc43c87..dccc8356dbbe 100644 --- a/crates/cargo-test-support/src/publish.rs +++ b/crates/cargo-test-support/src/publish.rs @@ -165,6 +165,7 @@ pub(crate) fn create_index_line( features: crate::registry::FeatureMap, yanked: bool, links: Option, + rust_version: Option<&str>, v: Option, ) -> String { // This emulates what crates.io does to retain backwards compatibility. @@ -185,6 +186,9 @@ pub(crate) fn create_index_line( if let Some(v) = v { json["v"] = serde_json::json!(v); } + if let Some(rust_version) = rust_version { + json["rust_version"] = serde_json::json!(rust_version); + } json.to_string() } diff --git a/crates/cargo-test-support/src/registry.rs b/crates/cargo-test-support/src/registry.rs index 5faf23540455..5d23a2ebbbe9 100644 --- a/crates/cargo-test-support/src/registry.rs +++ b/crates/cargo-test-support/src/registry.rs @@ -1144,6 +1144,7 @@ fn save_new_crate( false, new_crate.links, None, + None, ); write_to_index(registry_path, &new_crate.name, line, false); @@ -1400,6 +1401,7 @@ impl Package { self.features.clone(), self.yanked, self.links.clone(), + self.rust_version.as_deref(), self.v, ); diff --git a/crates/cargo-util/Cargo.toml b/crates/cargo-util/Cargo.toml index 7427ceb1a8e5..9ee935ca1a25 100644 --- a/crates/cargo-util/Cargo.toml +++ b/crates/cargo-util/Cargo.toml @@ -25,4 +25,4 @@ core-foundation = { version = "0.9.0", features = ["mac_os_10_7_support"] } [target.'cfg(windows)'.dependencies] miow = "0.5.0" -windows-sys = { version = "0.45.0", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] } +windows-sys = { version = "0.48.0", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] } diff --git a/crates/crates-io/Cargo.toml b/crates/crates-io/Cargo.toml index 004e2daff9e3..6a4012946727 100644 --- a/crates/crates-io/Cargo.toml +++ b/crates/crates-io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crates-io" -version = "0.36.0" +version = "0.36.1" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/cargo" diff --git a/crates/crates-io/lib.rs b/crates/crates-io/lib.rs index e0197568a6cb..3d7608a2900b 100644 --- a/crates/crates-io/lib.rs +++ b/crates/crates-io/lib.rs @@ -57,6 +57,7 @@ pub struct NewCrate { pub repository: Option, pub badges: BTreeMap>, pub links: Option, + pub rust_version: Option, } #[derive(Serialize, Deserialize)] diff --git a/crates/credential/cargo-credential-macos-keychain/src/main.rs b/crates/credential/cargo-credential-macos-keychain/src/main.rs deleted file mode 100644 index 3fef3f92a6f7..000000000000 --- a/crates/credential/cargo-credential-macos-keychain/src/main.rs +++ /dev/null @@ -1,50 +0,0 @@ -//! Cargo registry macos keychain credential process. - -use cargo_credential::{Credential, Error}; -use security_framework::os::macos::keychain::SecKeychain; - -struct MacKeychain; - -/// The account name is not used. -const ACCOUNT: &'static str = ""; - -fn registry(registry_name: &str) -> String { - format!("cargo-registry:{}", registry_name) -} - -impl Credential for MacKeychain { - fn name(&self) -> &'static str { - env!("CARGO_PKG_NAME") - } - - fn get(&self, index_url: &str) -> Result { - let keychain = SecKeychain::default().unwrap(); - let service_name = registry(index_url); - let (pass, _item) = keychain.find_generic_password(&service_name, ACCOUNT)?; - String::from_utf8(pass.as_ref().to_vec()) - .map_err(|_| "failed to convert token to UTF8".into()) - } - - fn store(&self, index_url: &str, token: &str, name: Option<&str>) -> Result<(), Error> { - let keychain = SecKeychain::default().unwrap(); - let service_name = registry(name.unwrap_or(index_url)); - if let Ok((_pass, mut item)) = keychain.find_generic_password(&service_name, ACCOUNT) { - item.set_password(token.as_bytes())?; - } else { - keychain.add_generic_password(&service_name, ACCOUNT, token.as_bytes())?; - } - Ok(()) - } - - fn erase(&self, index_url: &str) -> Result<(), Error> { - let keychain = SecKeychain::default().unwrap(); - let service_name = registry(index_url); - let (_pass, item) = keychain.find_generic_password(&service_name, ACCOUNT)?; - item.delete(); - Ok(()) - } -} - -fn main() { - cargo_credential::main(MacKeychain); -} diff --git a/crates/credential/cargo-credential-wincred/src/main.rs b/crates/credential/cargo-credential-wincred/src/main.rs deleted file mode 100644 index 8ae48f348998..000000000000 --- a/crates/credential/cargo-credential-wincred/src/main.rs +++ /dev/null @@ -1,111 +0,0 @@ -//! Cargo registry windows credential process. - -use cargo_credential::{Credential, Error}; -use std::ffi::OsStr; -use std::os::windows::ffi::OsStrExt; - -use windows_sys::core::PWSTR; -use windows_sys::Win32::Foundation::ERROR_NOT_FOUND; -use windows_sys::Win32::Foundation::FILETIME; -use windows_sys::Win32::Foundation::TRUE; -use windows_sys::Win32::Security::Credentials::CredDeleteW; -use windows_sys::Win32::Security::Credentials::CredReadW; -use windows_sys::Win32::Security::Credentials::CredWriteW; -use windows_sys::Win32::Security::Credentials::CREDENTIALW; -use windows_sys::Win32::Security::Credentials::CRED_PERSIST_LOCAL_MACHINE; -use windows_sys::Win32::Security::Credentials::CRED_TYPE_GENERIC; - -struct WindowsCredential; - -/// Converts a string to a nul-terminated wide UTF-16 byte sequence. -fn wstr(s: &str) -> Vec { - let mut wide: Vec = OsStr::new(s).encode_wide().collect(); - if wide.iter().any(|b| *b == 0) { - panic!("nul byte in wide string"); - } - wide.push(0); - wide -} - -fn target_name(registry_name: &str) -> Vec { - wstr(&format!("cargo-registry:{}", registry_name)) -} - -impl Credential for WindowsCredential { - fn name(&self) -> &'static str { - env!("CARGO_PKG_NAME") - } - - fn get(&self, index_url: &str) -> Result { - let target_name = target_name(index_url); - let p_credential: *mut CREDENTIALW = std::ptr::null_mut() as *mut _; - unsafe { - if CredReadW( - target_name.as_ptr(), - CRED_TYPE_GENERIC, - 0, - p_credential as *mut _ as *mut _, - ) != TRUE - { - return Err( - format!("failed to fetch token: {}", std::io::Error::last_os_error()).into(), - ); - } - let bytes = std::slice::from_raw_parts( - (*p_credential).CredentialBlob, - (*p_credential).CredentialBlobSize as usize, - ); - String::from_utf8(bytes.to_vec()).map_err(|_| "failed to convert token to UTF8".into()) - } - } - - fn store(&self, index_url: &str, token: &str, name: Option<&str>) -> Result<(), Error> { - let token = token.as_bytes(); - let target_name = target_name(index_url); - let comment = match name { - Some(name) => wstr(&format!("Cargo registry token for {}", name)), - None => wstr("Cargo registry token"), - }; - let mut credential = CREDENTIALW { - Flags: 0, - Type: CRED_TYPE_GENERIC, - TargetName: target_name.as_ptr() as PWSTR, - Comment: comment.as_ptr() as PWSTR, - LastWritten: FILETIME { - dwLowDateTime: 0, - dwHighDateTime: 0, - }, - CredentialBlobSize: token.len() as u32, - CredentialBlob: token.as_ptr() as *mut u8, - Persist: CRED_PERSIST_LOCAL_MACHINE, - AttributeCount: 0, - Attributes: std::ptr::null_mut(), - TargetAlias: std::ptr::null_mut(), - UserName: std::ptr::null_mut(), - }; - let result = unsafe { CredWriteW(&mut credential, 0) }; - if result != TRUE { - let err = std::io::Error::last_os_error(); - return Err(format!("failed to store token: {}", err).into()); - } - Ok(()) - } - - fn erase(&self, index_url: &str) -> Result<(), Error> { - let target_name = target_name(index_url); - let result = unsafe { CredDeleteW(target_name.as_ptr(), CRED_TYPE_GENERIC, 0) }; - if result != TRUE { - let err = std::io::Error::last_os_error(); - if err.raw_os_error() == Some(ERROR_NOT_FOUND as i32) { - eprintln!("not currently logged in to `{}`", index_url); - return Ok(()); - } - return Err(format!("failed to remove token: {}", err).into()); - } - Ok(()) - } -} - -fn main() { - cargo_credential::main(WindowsCredential); -} diff --git a/crates/home/CHANGELOG.md b/crates/home/CHANGELOG.md index 7674667c9910..58f960cc3117 100644 --- a/crates/home/CHANGELOG.md +++ b/crates/home/CHANGELOG.md @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - +## 0.5.6 +- Fixed & enhanced documentation. + [#12047](https://github.com/rust-lang/cargo/pull/12047) + +## 0.5.5 - 2023-04-25 +- The `home` crate has migrated to the repository. + [#11359](https://github.com/rust-lang/cargo/pull/11359) +- Replaced the winapi dependency with windows-sys. + [#11656](https://github.com/rust-lang/cargo/pull/11656) ## [0.5.4] - 2022-10-10 - Add `_with_env` variants of functions to support in-process threaded tests for @@ -38,7 +46,6 @@ Use Rust 1.36.0 as minimum Rust version. ### Removed - Remove support for `multirust` folder used in old version of `rustup`. -[Unreleased]: https://github.com/brson/home/compare/v0.5.4...HEAD [0.5.4]: https://github.com/brson/home/compare/v0.5.3...v0.5.4 [0.5.3]: https://github.com/brson/home/compare/v0.5.2...v0.5.3 [0.5.2]: https://github.com/brson/home/compare/v0.5.1...v0.5.2 diff --git a/crates/home/Cargo.toml b/crates/home/Cargo.toml index 2c5b92bcbb67..3691d9c04a8e 100644 --- a/crates/home/Cargo.toml +++ b/crates/home/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "home" -version = "0.5.4" # also update `html_root_url` in `src/lib.rs` +version = "0.5.6" # also update `html_root_url` in `src/lib.rs` authors = ["Brian Anderson "] documentation = "https://docs.rs/home" edition = "2018" @@ -17,4 +17,4 @@ repository = "https://github.com/rust-lang/cargo" description = "Shared definitions of home directories." [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.45.0", features = ["Win32_Foundation", "Win32_UI_Shell"] } +windows-sys = { version = "0.48.0", features = ["Win32_Foundation", "Win32_UI_Shell"] } diff --git a/crates/home/src/env.rs b/crates/home/src/env.rs index e47273bc859c..49fea54220cf 100644 --- a/crates/home/src/env.rs +++ b/crates/home/src/env.rs @@ -9,7 +9,7 @@ use std::{ /// Permits parameterizing the home functions via the _from variants - used for /// in-process unit testing by rustup. pub trait Env { - /// Return the path to the the users home dir, or None if any error occurs: + /// Return the path to the users home dir, or None if any error occurs: /// see home_inner. fn home_dir(&self) -> Option; /// Return the current working directory. diff --git a/crates/home/src/lib.rs b/crates/home/src/lib.rs index 306026e40106..0e1e975e476b 100644 --- a/crates/home/src/lib.rs +++ b/crates/home/src/lib.rs @@ -1,14 +1,5 @@ //! Canonical definitions of `home_dir`, `cargo_home`, and `rustup_home`. //! -//! This provides the definition of `home_dir` used by Cargo and -//! rustup, as well functions to find the correct value of -//! `CARGO_HOME` and `RUSTUP_HOME`. -//! -//! See also the [`dirs`](https://docs.rs/dirs) crate. -//! -//! _Note that as of 2019/08/06 it appears that cargo uses this crate. And -//! rustup has used this crate since 2019/08/21._ -//! //! The definition of `home_dir` provided by the standard library is //! incorrect because it considers the `HOME` environment variable on //! Windows. This causes surprising situations where a Rust program @@ -17,15 +8,17 @@ //! rustup use the standard libraries definition - they use the //! definition here. //! -//! This crate further provides two functions, `cargo_home` and +//! This crate provides two additional functions, `cargo_home` and //! `rustup_home`, which are the canonical way to determine the -//! location that Cargo and rustup store their data. +//! location that Cargo and rustup use to store their data. +//! The `env` module contains utilities for mocking the process environment +//! by Cargo and rustup. //! //! See also this [discussion]. //! //! [discussion]: https://github.com/rust-lang/rust/pull/46799#issuecomment-361156935 -#![doc(html_root_url = "https://docs.rs/home/0.5.4")] +#![doc(html_root_url = "https://docs.rs/home/0.5.6")] #![deny(rust_2018_idioms)] pub mod env; @@ -36,29 +29,34 @@ mod windows; use std::io; use std::path::{Path, PathBuf}; -/// Returns the path of the current user's home directory if known. +/// Returns the path of the current user's home directory using environment +/// variables or OS-specific APIs. /// /// # Unix /// /// Returns the value of the `HOME` environment variable if it is set -/// and not equal to the empty string. Otherwise, it tries to determine the -/// home directory by invoking the `getpwuid_r` function on the UID of the -/// current user. +/// **even** if it is an empty string. Otherwise, it tries to determine the +/// home directory by invoking the [`getpwuid_r`][getpwuid] function with +/// the UID of the current user. +/// +/// [getpwuid]: https://linux.die.net/man/3/getpwuid_r /// /// # Windows /// -/// Returns the value of the `USERPROFILE` environment variable if it -/// is set and not equal to the empty string. If both do not exist, -/// [`SHGetFolderPathW`][msdn] is used to return the appropriate path. +/// Returns the value of the `USERPROFILE` environment variable if it is set +/// **and** it is not an empty string. Otherwise, it tries to determine the +/// home directory by invoking the [`SHGetFolderPathW`][shgfp] function with +/// [`CSIDL_PROFILE`][csidl]. /// -/// [msdn]: https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpathw +/// [shgfp]: https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpathw +/// [csidl]: https://learn.microsoft.com/en-us/windows/win32/shell/csidl /// /// # Examples /// /// ``` /// match home::home_dir() { -/// Some(path) => println!("{}", path.display()), -/// None => println!("Impossible to get your home dir!"), +/// Some(path) if !path.as_os_str().is_empty() => println!("{}", path.display()), +/// _ => println!("Unable to get your home dir!"), /// } /// ``` pub fn home_dir() -> Option { diff --git a/crates/mdman/Cargo.lock b/crates/mdman/Cargo.lock deleted file mode 100644 index 51fe47a9c415..000000000000 --- a/crates/mdman/Cargo.lock +++ /dev/null @@ -1,459 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "anyhow" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "ctor" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39858aa5bac06462d4dd4b9164848eb81ffc4aa5c479746393598fd193afa227" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -dependencies = [ - "typenum", -] - -[[package]] -name = "handlebars" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86dbc8a0746b08f363d2e00da48e6c9ceb75c198ac692d2715fcbb5bee74c87d" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error", - "serde", - "serde_json", - "walkdir", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "itoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" - -[[package]] -name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "mdman" -version = "0.1.0" -dependencies = [ - "anyhow", - "handlebars", - "pretty_assertions", - "pulldown-cmark", - "same-file", - "serde_json", - "url", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "output_vt100" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -dependencies = [ - "winapi", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" -dependencies = [ - "maplit", - "pest", - "sha-1", -] - -[[package]] -name = "pretty_assertions" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" -dependencies = [ - "ctor", - "diff", - "output_vt100", - "yansi", -] - -[[package]] -name = "proc-macro2" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "pulldown-cmark" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" -dependencies = [ - "bitflags", - "memchr", - "unicase", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "serde" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" - -[[package]] -name = "serde_json" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer", - "digest", - "fake-simd", - "opaque-debug", -] - -[[package]] -name = "syn" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cdb98bcb1f9d81d07b536179c269ea15999b5d14ea958196413869445bb5250" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "tinyvec" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "walkdir" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" diff --git a/crates/mdman/Cargo.toml b/crates/mdman/Cargo.toml index 92cdf2eb634c..def3cad9d563 100644 --- a/crates/mdman/Cargo.toml +++ b/crates/mdman/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "mdman" -version = "0.1.0" +version = "0.0.0" edition = "2021" license = "MIT OR Apache-2.0" description = "Creates a man page page from markdown." +publish = false [dependencies] anyhow = "1.0.31" diff --git a/crates/mdman/build-man.sh b/crates/mdman/build-man.sh deleted file mode 100755 index 9286b17c2f1c..000000000000 --- a/crates/mdman/build-man.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -cargo run -- -t md -o doc/out doc/*.md -cargo run -- -t txt -o doc/out doc/*.md -cargo run -- -t man -o doc/out doc/*.md diff --git a/crates/mdman/doc/mdman.md b/crates/mdman/doc/mdman.md index 2025c13dc3df..bfa394648caf 100644 --- a/crates/mdman/doc/mdman.md +++ b/crates/mdman/doc/mdman.md @@ -28,7 +28,7 @@ man page: and `{{/options}}` tags. This tells the processor where the options start and end. - Each option must be expressed with a `{{#option}}` block. The parameters to - the the block are a sequence of strings indicating the option. For example, + the block are a sequence of strings indicating the option. For example, ```{{#option "`-p` _spec_..." "`--package` _spec_..."}}``` is an option that has two different forms. The text within the string is processed as markdown. It is recommended to use formatting similar to this example. diff --git a/crates/mdman/doc/out/mdman.1 b/crates/mdman/doc/out/mdman.1 index 0718d6ddb3cb..b114715aef20 100644 --- a/crates/mdman/doc/out/mdman.1 +++ b/crates/mdman/doc/out/mdman.1 @@ -6,7 +6,7 @@ .SH "NAME" mdman \- Converts markdown to a man page .SH "SYNOPSIS" -\fBmdman\fR [\fIoptions\fR] \fB\-t\fR \fItype\fR \fB\-o\fR \fIoutdir\fR \fIsources...\fR +\fBmdman\fR [\fIoptions\fR] \fB\-t\fR \fItype\fR \fB\-o\fR \fIoutdir\fR \fIsources\[u2026]\fR .SH "DESCRIPTION" Converts a markdown file to a man page. .sp @@ -29,7 +29,7 @@ and end. .sp .RS 4 \h'-04'\(bu\h'+02'Each option must be expressed with a \fB{{#option}}\fR block. The parameters to -the the block are a sequence of strings indicating the option. For example, +the block are a sequence of strings indicating the option. For example, \fB{{#option "`\-p` _spec_..." "`\-\-package` _spec_..."}}\fR is an option that has two different forms. The text within the string is processed as markdown. It is recommended to use formatting similar to this example. @@ -83,7 +83,7 @@ Outputs with the \fB\&.md\fR extension. .RE .sp .RS 4 -\h'-04'\(bu\h'+02'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn't +\h'-04'\(bu\h'+02'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn\[cq]t available. Outputs with the \fB\&.txt\fR extension. .RE .RE @@ -107,7 +107,7 @@ matching \fB\-\-man\fR entry, then a relative link to a file named \fIname\fR\fB be used. .RE .sp -\fIsources...\fR +\fIsources\[u2026]\fR .RS 4 The source input filename, may be specified multiple times. .RE diff --git a/crates/mdman/doc/out/mdman.md b/crates/mdman/doc/out/mdman.md index d0dd34511362..9d2fe932684d 100644 --- a/crates/mdman/doc/out/mdman.md +++ b/crates/mdman/doc/out/mdman.md @@ -27,7 +27,7 @@ man page: and `{{/options}}` tags. This tells the processor where the options start and end. - Each option must be expressed with a `{{#option}}` block. The parameters to - the the block are a sequence of strings indicating the option. For example, + the block are a sequence of strings indicating the option. For example, ```{{#option "`-p` _spec_..." "`--package` _spec_..."}}``` is an option that has two different forms. The text within the string is processed as markdown. It is recommended to use formatting similar to this example. @@ -61,7 +61,7 @@ man page: .1) matching the man page section.
  • md β€” A markdown file, after all handlebars processing has been finished. Outputs with the .md extension.
  • -
  • txt β€” A text file, rendered for situations where a man page viewer isn't +
  • txt β€” A text file, rendered for situations where a man page viewer isn’t available. Outputs with the .txt extension.
  • @@ -82,7 +82,7 @@ matching --man entry, then a relative link to a file named name be used. -
    sources...
    +
    sources…
    The source input filename, may be specified multiple times.
    diff --git a/crates/mdman/doc/out/mdman.txt b/crates/mdman/doc/out/mdman.txt index 83fa7de90342..6c8dcd65d198 100644 --- a/crates/mdman/doc/out/mdman.txt +++ b/crates/mdman/doc/out/mdman.txt @@ -4,7 +4,7 @@ NAME mdman - Converts markdown to a man page SYNOPSIS - mdman [options] -t type -o outdir sources... + mdman [options] -t type -o outdir sources… DESCRIPTION Converts a markdown file to a man page. @@ -25,7 +25,7 @@ DESCRIPTION the options start and end. o Each option must be expressed with a {{#option}} block. The - parameters to the the block are a sequence of strings indicating the + parameters to the block are a sequence of strings indicating the option. For example, {{#option "`-p` _spec_..." "`--package` _spec_..."}} is an option that has two different forms. The text within the string is processed as markdown. It is recommended to use @@ -65,7 +65,7 @@ OPTIONS finished. Outputs with the .md extension. o txt β€” A text file, rendered for situations where a man page - viewer isn't available. Outputs with the .txt extension. + viewer isn’t available. Outputs with the .txt extension. -o outdir Specifies the directory where to save the output. @@ -81,7 +81,7 @@ OPTIONS does not have a matching --man entry, then a relative link to a file named name.md will be used. - sources... + sources… The source input filename, may be specified multiple times. EXAMPLES diff --git a/crates/resolver-tests/Cargo.toml b/crates/resolver-tests/Cargo.toml index e4aab4325f7a..3de0e945ac3f 100644 --- a/crates/resolver-tests/Cargo.toml +++ b/crates/resolver-tests/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "resolver-tests" -version = "0.1.0" +version = "0.0.0" edition = "2018" +publish = false [dependencies] cargo = { path = "../.." } diff --git a/crates/resolver-tests/src/lib.rs b/crates/resolver-tests/src/lib.rs index 3ffb6c5d2c63..01d9b5e6d69d 100644 --- a/crates/resolver-tests/src/lib.rs +++ b/crates/resolver-tests/src/lib.rs @@ -184,6 +184,7 @@ pub fn resolve_with_config_raw( deps, &BTreeMap::new(), None::<&String>, + None::<&String>, ) .unwrap(); let opts = ResolveOpts::everything(); @@ -585,6 +586,7 @@ pub fn pkg_dep(name: T, dep: Vec) -> Summary { dep, &BTreeMap::new(), link, + None::<&String>, ) .unwrap() } @@ -613,6 +615,7 @@ pub fn pkg_loc(name: &str, loc: &str) -> Summary { Vec::new(), &BTreeMap::new(), link, + None::<&String>, ) .unwrap() } @@ -627,6 +630,7 @@ pub fn remove_dep(sum: &Summary, ind: usize) -> Summary { deps, &BTreeMap::new(), sum.links().map(|a| a.as_str()), + None::<&String>, ) .unwrap() } diff --git a/src/doc/semver-check/Cargo.toml b/crates/semver-check/Cargo.toml similarity index 85% rename from src/doc/semver-check/Cargo.toml rename to crates/semver-check/Cargo.toml index bdfd8d7d7c1b..e40b499ee065 100644 --- a/src/doc/semver-check/Cargo.toml +++ b/crates/semver-check/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "semver-check" -version = "0.1.0" +version = "0.0.0" authors = ["Eric Huss"] edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/doc/semver-check/src/main.rs b/crates/semver-check/src/main.rs similarity index 99% rename from src/doc/semver-check/src/main.rs rename to crates/semver-check/src/main.rs index 51aacbe11057..f1630f519f47 100644 --- a/src/doc/semver-check/src/main.rs +++ b/crates/semver-check/src/main.rs @@ -25,7 +25,7 @@ const SEPARATOR: &str = "/////////////////////////////////////////////////////// fn doit() -> Result<(), Box> { let filename = std::env::args() .nth(1) - .unwrap_or_else(|| "../src/reference/semver.md".to_string()); + .unwrap_or_else(|| "src/doc/src/reference/semver.md".to_string()); let contents = fs::read_to_string(filename)?; let mut lines = contents.lines().enumerate(); diff --git a/crates/xtask-build-man/Cargo.toml b/crates/xtask-build-man/Cargo.toml new file mode 100644 index 000000000000..6d02aa2c33a6 --- /dev/null +++ b/crates/xtask-build-man/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "xtask-build-man" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies] diff --git a/crates/xtask-build-man/src/main.rs b/crates/xtask-build-man/src/main.rs new file mode 100644 index 000000000000..6680c3783cca --- /dev/null +++ b/crates/xtask-build-man/src/main.rs @@ -0,0 +1,108 @@ +//! ```text +//! NAME +//! build-man +//! +//! SYNOPSIS +//! build-man +//! +//! DESCRIPTION +//! Build the man pages for packages `mdman` and `cargo`. +//! For more, read their doc comments. +//! ``` + +use std::fs; +use std::io; +use std::path::PathBuf; +use std::process; +use std::process::Command; + +fn main() -> io::Result<()> { + build_mdman()?; + build_cargo()?; + Ok(()) +} + +/// Builds the man pages for `mdman`. +fn build_mdman() -> io::Result<()> { + cwd_to_workspace_root()?; + + let src_paths = &["crates/mdman/doc/mdman.md".into()]; + let dst_path = "crates/mdman/doc/out"; + let outs = [("md", dst_path), ("txt", dst_path), ("man", dst_path)]; + + build_man("mdman", src_paths, &outs, &[]) +} + +/// Builds the man pages for Cargo. +/// +/// The source for the man pages are located in src/doc/man/ in markdown format. +/// These also are handlebars templates, see crates/mdman/README.md for details. +/// +/// The generated man pages are placed in the src/etc/man/ directory. The pages +/// are also expanded into markdown (after being expanded by handlebars) and +/// saved in the src/doc/src/commands/ directory. These are included in the +/// Cargo book, which is converted to HTML by mdbook. +fn build_cargo() -> io::Result<()> { + // Find all `src/doc/man/cargo-*.md` + let src_paths = { + let mut src_paths = Vec::new(); + for entry in fs::read_dir("src/doc/man")? { + let entry = entry?; + let file_name = entry.file_name(); + let file_name = file_name.to_str().unwrap(); + if file_name.starts_with("cargo-") && file_name.ends_with(".md") { + src_paths.push(entry.path()); + } + } + src_paths + }; + let outs = [ + ("md", "src/doc/src/commands"), + ("txt", "src/doc/man/generated_txt"), + ("man", "src/etc/man"), + ]; + let args = [ + "--url", + "https://doc.rust-lang.org/cargo/commands/", + "--man", + "rustc:1=https://doc.rust-lang.org/rustc/index.html", + "--man", + "rustdoc:1=https://doc.rust-lang.org/rustdoc/index.html", + ]; + build_man("cargo", &src_paths[..], &outs, &args) +} + +/// Change to workspace root. +/// +/// Assumed this xtask is located in `[WORKSPACE]/crates/xtask-build-man`. +fn cwd_to_workspace_root() -> io::Result<()> { + let pkg_root = std::env!("CARGO_MANIFEST_DIR"); + let ws_root = format!("{pkg_root}/../.."); + std::env::set_current_dir(ws_root) +} + +/// Builds the man pages. +fn build_man( + pkg_name: &str, + src_paths: &[PathBuf], + outs: &[(&str, &str)], + extra_args: &[&str], +) -> io::Result<()> { + for (format, dst_path) in outs { + eprintln!("Start converting `{format}` for package `{pkg_name}`..."); + let mut cmd = Command::new(std::env!("CARGO")); + cmd.args(["run", "--package", "mdman", "--"]) + .args(["-t", format, "-o", dst_path]) + .args(src_paths) + .args(extra_args); + + let status = cmd.status()?; + if !status.success() { + eprintln!("failed to build the man pages for package `{pkg_name}`"); + eprintln!("failed command: `{cmd:?}`"); + process::exit(status.code().unwrap_or(1)); + } + } + + Ok(()) +} diff --git a/crates/xtask-stale-label/Cargo.toml b/crates/xtask-stale-label/Cargo.toml new file mode 100644 index 000000000000..64eb35600983 --- /dev/null +++ b/crates/xtask-stale-label/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "xtask-stale-label" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies] +toml_edit = "0.19" diff --git a/crates/xtask-stale-label/src/main.rs b/crates/xtask-stale-label/src/main.rs new file mode 100644 index 000000000000..37675979cfaf --- /dev/null +++ b/crates/xtask-stale-label/src/main.rs @@ -0,0 +1,91 @@ +//! ```text +//! NAME +//! stale-label +//! +//! SYNOPSIS +//! stale-label +//! +//! DESCRIPTION +//! Detect stale paths in autolabel definitions in triagebot.toml. +//! Probably autofix them in the future. +//! ``` + +use std::fmt::Write as _; +use std::path::PathBuf; +use std::process; +use toml_edit::Document; + +fn main() { + let pkg_root = std::env!("CARGO_MANIFEST_DIR"); + let ws_root = PathBuf::from(format!("{pkg_root}/../..")); + let path = { + let path = ws_root.join("triagebot.toml"); + path.canonicalize().unwrap_or(path) + }; + + eprintln!("Checking file {path:?}\n"); + + let mut failed = 0; + let mut passed = 0; + + let toml = std::fs::read_to_string(path).expect("read from file"); + let doc = toml.parse::().expect("a toml"); + let autolabel = doc["autolabel"].as_table().expect("a toml table"); + + for (label, value) in autolabel.iter() { + let Some(trigger_files) = value.get("trigger_files") else { + continue + }; + let trigger_files = trigger_files.as_array().expect("an array"); + let missing_files: Vec<_> = trigger_files + .iter() + // Hey TOML content is strict UTF-8. + .map(|v| v.as_str().unwrap()) + .filter(|f| { + // triagebot checks with `starts_with` only. + // See https://github.com/rust-lang/triagebot/blob/0e4b48ca86ffede9cc70fb1611e658e4d013bce2/src/handlers/autolabel.rs#L45 + let path = ws_root.join(f); + if path.exists() { + return false; + } + let Some(mut read_dir) = path.parent().and_then(|p| p.read_dir().ok()) else { + return true; + }; + !read_dir.any(|e| { + e.unwrap() + .path() + .strip_prefix(&ws_root) + .unwrap() + .to_str() + .unwrap() + .starts_with(f) + }) + }) + .collect(); + + failed += missing_files.len(); + passed += trigger_files.len() - missing_files.len(); + + if missing_files.is_empty() { + continue; + } + + let mut msg = String::new(); + writeln!( + &mut msg, + "missing files defined in `autolabel.{label}.trigger_files`:" + ) + .unwrap(); + for f in missing_files.iter() { + writeln!(&mut msg, "\t {f}").unwrap(); + } + eprintln!("{msg}"); + } + + let result = if failed == 0 { "ok" } else { "FAILED" }; + eprintln!("test result: {result}. {passed} passed; {failed} failed;"); + + if failed > 0 { + process::exit(1); + } +} diff --git a/crates/xtask-unpublished/Cargo.toml b/crates/xtask-unpublished/Cargo.toml new file mode 100644 index 000000000000..a7a85323f815 --- /dev/null +++ b/crates/xtask-unpublished/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "xtask-unpublished" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies] +anyhow = "1.0.47" +cargo = { path = "../.." } +clap = "4.2.0" +env_logger = "0.10.0" +log = "0.4.17" diff --git a/crates/xtask-unpublished/src/main.rs b/crates/xtask-unpublished/src/main.rs new file mode 100644 index 000000000000..1942a3621cfb --- /dev/null +++ b/crates/xtask-unpublished/src/main.rs @@ -0,0 +1,15 @@ +mod xtask; + +fn main() { + env_logger::init_from_env("CARGO_LOG"); + let cli = xtask::cli(); + let matches = cli.get_matches(); + + let mut config = cargo::util::config::Config::default().unwrap_or_else(|e| { + let mut eval = cargo::core::shell::Shell::new(); + cargo::exit_with_error(e.into(), &mut eval) + }); + if let Err(e) = xtask::exec(&matches, &mut config) { + cargo::exit_with_error(e, &mut config.shell()) + } +} diff --git a/crates/xtask-unpublished/src/xtask.rs b/crates/xtask-unpublished/src/xtask.rs new file mode 100644 index 000000000000..095b483b7f1b --- /dev/null +++ b/crates/xtask-unpublished/src/xtask.rs @@ -0,0 +1,157 @@ +use cargo::core::registry::PackageRegistry; +use cargo::core::QueryKind; +use cargo::core::Registry; +use cargo::core::SourceId; +use cargo::util::command_prelude::*; + +pub fn cli() -> clap::Command { + clap::Command::new("xtask-unpublished") + .arg( + opt( + "verbose", + "Use verbose output (-vv very verbose/build.rs output)", + ) + .short('v') + .action(ArgAction::Count) + .global(true), + ) + .arg_quiet() + .arg( + opt("color", "Coloring: auto, always, never") + .value_name("WHEN") + .global(true), + ) + .arg(flag("frozen", "Require Cargo.lock and cache are up to date").global(true)) + .arg(flag("locked", "Require Cargo.lock is up to date").global(true)) + .arg(flag("offline", "Run without accessing the network").global(true)) + .arg(multi_opt("config", "KEY=VALUE", "Override a configuration value").global(true)) + .arg( + Arg::new("unstable-features") + .help("Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details") + .short('Z') + .value_name("FLAG") + .action(ArgAction::Append) + .global(true), + ) +} + +pub fn exec(args: &clap::ArgMatches, config: &mut cargo::util::Config) -> cargo::CliResult { + config_configure(config, args)?; + + unpublished(args, config)?; + + Ok(()) +} + +fn config_configure(config: &mut Config, args: &ArgMatches) -> CliResult { + let verbose = args.verbose(); + // quiet is unusual because it is redefined in some subcommands in order + // to provide custom help text. + let quiet = args.flag("quiet"); + let color = args.get_one::("color").map(String::as_str); + let frozen = args.flag("frozen"); + let locked = args.flag("locked"); + let offline = args.flag("offline"); + let mut unstable_flags = vec![]; + if let Some(values) = args.get_many::("unstable-features") { + unstable_flags.extend(values.cloned()); + } + let mut config_args = vec![]; + if let Some(values) = args.get_many::("config") { + config_args.extend(values.cloned()); + } + config.configure( + verbose, + quiet, + color, + frozen, + locked, + offline, + &None, + &unstable_flags, + &config_args, + )?; + Ok(()) +} + +fn unpublished(args: &clap::ArgMatches, config: &mut cargo::util::Config) -> cargo::CliResult { + let ws = args.workspace(config)?; + let mut results = Vec::new(); + { + let mut registry = PackageRegistry::new(config)?; + let _lock = config.acquire_package_cache_lock()?; + registry.lock_patches(); + let source_id = SourceId::crates_io(config)?; + + for member in ws.members() { + let name = member.name(); + let current = member.version(); + if member.publish() == &Some(vec![]) { + log::trace!("skipping {name}, `publish = false`"); + continue; + } + + let version_req = format!("<={current}"); + let query = cargo::core::dependency::Dependency::parse( + name, + Some(&version_req), + source_id.clone(), + )?; + let possibilities = loop { + // Exact to avoid returning all for path/git + match registry.query_vec(&query, QueryKind::Exact) { + std::task::Poll::Ready(res) => { + break res?; + } + std::task::Poll::Pending => registry.block_until_ready()?, + } + }; + if let Some(last) = possibilities.iter().map(|s| s.version()).max() { + if last != current { + results.push(( + name.to_string(), + Some(last.to_string()), + current.to_string(), + )); + } else { + log::trace!("{name} {current} is published"); + } + } else { + results.push((name.to_string(), None, current.to_string())); + } + } + } + + if !results.is_empty() { + results.insert( + 0, + ( + "name".to_owned(), + Some("published".to_owned()), + "current".to_owned(), + ), + ); + results.insert( + 1, + ( + "====".to_owned(), + Some("=========".to_owned()), + "=======".to_owned(), + ), + ); + } + for (name, last, current) in results { + if let Some(last) = last { + println!("{name} {last} {current}"); + } else { + println!("{name} - {current}"); + } + } + + Ok(()) +} + +#[test] +fn verify_cli() { + cli().debug_assert(); +} diff --git a/crates/credential/README.md b/credential/README.md similarity index 100% rename from crates/credential/README.md rename to credential/README.md diff --git a/crates/credential/cargo-credential-1password/Cargo.toml b/credential/cargo-credential-1password/Cargo.toml similarity index 100% rename from crates/credential/cargo-credential-1password/Cargo.toml rename to credential/cargo-credential-1password/Cargo.toml diff --git a/crates/credential/cargo-credential-1password/src/main.rs b/credential/cargo-credential-1password/src/main.rs similarity index 100% rename from crates/credential/cargo-credential-1password/src/main.rs rename to credential/cargo-credential-1password/src/main.rs diff --git a/crates/credential/cargo-credential-gnome-secret/Cargo.toml b/credential/cargo-credential-gnome-secret/Cargo.toml similarity index 100% rename from crates/credential/cargo-credential-gnome-secret/Cargo.toml rename to credential/cargo-credential-gnome-secret/Cargo.toml diff --git a/crates/credential/cargo-credential-gnome-secret/build.rs b/credential/cargo-credential-gnome-secret/build.rs similarity index 100% rename from crates/credential/cargo-credential-gnome-secret/build.rs rename to credential/cargo-credential-gnome-secret/build.rs diff --git a/crates/credential/cargo-credential-gnome-secret/src/main.rs b/credential/cargo-credential-gnome-secret/src/main.rs similarity index 100% rename from crates/credential/cargo-credential-gnome-secret/src/main.rs rename to credential/cargo-credential-gnome-secret/src/main.rs diff --git a/crates/credential/cargo-credential-macos-keychain/Cargo.toml b/credential/cargo-credential-macos-keychain/Cargo.toml similarity index 87% rename from crates/credential/cargo-credential-macos-keychain/Cargo.toml rename to credential/cargo-credential-macos-keychain/Cargo.toml index c2c22a425aed..428e291002e6 100644 --- a/crates/credential/cargo-credential-macos-keychain/Cargo.toml +++ b/credential/cargo-credential-macos-keychain/Cargo.toml @@ -8,4 +8,6 @@ description = "A Cargo credential process that stores tokens in a macOS keychain [dependencies] cargo-credential = { version = "0.2.0", path = "../cargo-credential" } + +[target.'cfg(target_os = "macos")'.dependencies] security-framework = "2.0.0" diff --git a/credential/cargo-credential-macos-keychain/src/main.rs b/credential/cargo-credential-macos-keychain/src/main.rs new file mode 100644 index 000000000000..4d6ea96d05bd --- /dev/null +++ b/credential/cargo-credential-macos-keychain/src/main.rs @@ -0,0 +1,58 @@ +//! Cargo registry macos keychain credential process. + +#[cfg(target_os = "macos")] +mod macos { + use cargo_credential::{Credential, Error}; + use security_framework::os::macos::keychain::SecKeychain; + + pub(crate) struct MacKeychain; + + /// The account name is not used. + const ACCOUNT: &'static str = ""; + + fn registry(registry_name: &str) -> String { + format!("cargo-registry:{}", registry_name) + } + + impl Credential for MacKeychain { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, index_url: &str) -> Result { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(index_url); + let (pass, _item) = keychain.find_generic_password(&service_name, ACCOUNT)?; + String::from_utf8(pass.as_ref().to_vec()) + .map_err(|_| "failed to convert token to UTF8".into()) + } + + fn store(&self, index_url: &str, token: &str, name: Option<&str>) -> Result<(), Error> { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(name.unwrap_or(index_url)); + if let Ok((_pass, mut item)) = keychain.find_generic_password(&service_name, ACCOUNT) { + item.set_password(token.as_bytes())?; + } else { + keychain.add_generic_password(&service_name, ACCOUNT, token.as_bytes())?; + } + Ok(()) + } + + fn erase(&self, index_url: &str) -> Result<(), Error> { + let keychain = SecKeychain::default().unwrap(); + let service_name = registry(index_url); + let (_pass, item) = keychain.find_generic_password(&service_name, ACCOUNT)?; + item.delete(); + Ok(()) + } + } +} + +#[cfg(not(target_os = "macos"))] +use cargo_credential::UnsupportedCredential as MacKeychain; +#[cfg(target_os = "macos")] +use macos::MacKeychain; + +fn main() { + cargo_credential::main(MacKeychain); +} diff --git a/crates/credential/cargo-credential-wincred/Cargo.toml b/credential/cargo-credential-wincred/Cargo.toml similarity index 71% rename from crates/credential/cargo-credential-wincred/Cargo.toml rename to credential/cargo-credential-wincred/Cargo.toml index 83c38e80dbbb..813253466900 100644 --- a/crates/credential/cargo-credential-wincred/Cargo.toml +++ b/credential/cargo-credential-wincred/Cargo.toml @@ -8,4 +8,10 @@ description = "A Cargo credential process that stores tokens with Windows Creden [dependencies] cargo-credential = { version = "0.2.0", path = "../cargo-credential" } -windows-sys = { version = "0.45", features = ["Win32_Foundation", "Win32_Security_Credentials"] } + +[target.'cfg(windows)'.dependencies.windows-sys] +version = "0.48" +features = [ + "Win32_Foundation", + "Win32_Security_Credentials" +] diff --git a/credential/cargo-credential-wincred/src/main.rs b/credential/cargo-credential-wincred/src/main.rs new file mode 100644 index 000000000000..4377172e8f74 --- /dev/null +++ b/credential/cargo-credential-wincred/src/main.rs @@ -0,0 +1,122 @@ +//! Cargo registry windows credential process. + +#[cfg(windows)] +mod win { + use cargo_credential::{Credential, Error}; + use std::ffi::OsStr; + use std::os::windows::ffi::OsStrExt; + + use windows_sys::core::PWSTR; + use windows_sys::Win32::Foundation::ERROR_NOT_FOUND; + use windows_sys::Win32::Foundation::FILETIME; + use windows_sys::Win32::Foundation::TRUE; + use windows_sys::Win32::Security::Credentials::CredDeleteW; + use windows_sys::Win32::Security::Credentials::CredReadW; + use windows_sys::Win32::Security::Credentials::CredWriteW; + use windows_sys::Win32::Security::Credentials::CREDENTIALW; + use windows_sys::Win32::Security::Credentials::CRED_PERSIST_LOCAL_MACHINE; + use windows_sys::Win32::Security::Credentials::CRED_TYPE_GENERIC; + + pub(crate) struct WindowsCredential; + + /// Converts a string to a nul-terminated wide UTF-16 byte sequence. + fn wstr(s: &str) -> Vec { + let mut wide: Vec = OsStr::new(s).encode_wide().collect(); + if wide.iter().any(|b| *b == 0) { + panic!("nul byte in wide string"); + } + wide.push(0); + wide + } + + fn target_name(registry_name: &str) -> Vec { + wstr(&format!("cargo-registry:{}", registry_name)) + } + + impl Credential for WindowsCredential { + fn name(&self) -> &'static str { + env!("CARGO_PKG_NAME") + } + + fn get(&self, index_url: &str) -> Result { + let target_name = target_name(index_url); + let p_credential: *mut CREDENTIALW = std::ptr::null_mut() as *mut _; + unsafe { + if CredReadW( + target_name.as_ptr(), + CRED_TYPE_GENERIC, + 0, + p_credential as *mut _ as *mut _, + ) != TRUE + { + return Err(format!( + "failed to fetch token: {}", + std::io::Error::last_os_error() + ) + .into()); + } + let bytes = std::slice::from_raw_parts( + (*p_credential).CredentialBlob, + (*p_credential).CredentialBlobSize as usize, + ); + String::from_utf8(bytes.to_vec()) + .map_err(|_| "failed to convert token to UTF8".into()) + } + } + + fn store(&self, index_url: &str, token: &str, name: Option<&str>) -> Result<(), Error> { + let token = token.as_bytes(); + let target_name = target_name(index_url); + let comment = match name { + Some(name) => wstr(&format!("Cargo registry token for {}", name)), + None => wstr("Cargo registry token"), + }; + let mut credential = CREDENTIALW { + Flags: 0, + Type: CRED_TYPE_GENERIC, + TargetName: target_name.as_ptr() as PWSTR, + Comment: comment.as_ptr() as PWSTR, + LastWritten: FILETIME { + dwLowDateTime: 0, + dwHighDateTime: 0, + }, + CredentialBlobSize: token.len() as u32, + CredentialBlob: token.as_ptr() as *mut u8, + Persist: CRED_PERSIST_LOCAL_MACHINE, + AttributeCount: 0, + Attributes: std::ptr::null_mut(), + TargetAlias: std::ptr::null_mut(), + UserName: std::ptr::null_mut(), + }; + let result = unsafe { CredWriteW(&mut credential, 0) }; + if result != TRUE { + let err = std::io::Error::last_os_error(); + return Err(format!("failed to store token: {}", err).into()); + } + Ok(()) + } + + fn erase(&self, index_url: &str) -> Result<(), Error> { + let target_name = target_name(index_url); + let result = unsafe { CredDeleteW(target_name.as_ptr(), CRED_TYPE_GENERIC, 0) }; + if result != TRUE { + let err = std::io::Error::last_os_error(); + if err.raw_os_error() == Some(ERROR_NOT_FOUND as i32) { + eprintln!("not currently logged in to `{}`", index_url); + return Ok(()); + } + return Err(format!("failed to remove token: {}", err).into()); + } + Ok(()) + } + } +} + +#[cfg(not(windows))] +use cargo_credential::UnsupportedCredential as WindowsCredential; +#[cfg(windows)] +use win::WindowsCredential; + +fn main() { + cargo_credential::main(WindowsCredential); +} diff --git a/crates/credential/cargo-credential/Cargo.toml b/credential/cargo-credential/Cargo.toml similarity index 100% rename from crates/credential/cargo-credential/Cargo.toml rename to credential/cargo-credential/Cargo.toml diff --git a/crates/credential/cargo-credential/README.md b/credential/cargo-credential/README.md similarity index 93% rename from crates/credential/cargo-credential/README.md rename to credential/cargo-credential/README.md index 1f75e598a3f1..53dc8e6b7d6d 100644 --- a/crates/credential/cargo-credential/README.md +++ b/credential/cargo-credential/README.md @@ -8,7 +8,7 @@ Documentation about credential processes may be found at https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process Example implementations may be found at -https://github.com/rust-lang/cargo/tree/master/crates/credential +https://github.com/rust-lang/cargo/tree/master/credential ## Usage diff --git a/crates/credential/cargo-credential/src/lib.rs b/credential/cargo-credential/src/lib.rs similarity index 85% rename from crates/credential/cargo-credential/src/lib.rs rename to credential/cargo-credential/src/lib.rs index 3baf42d77dbd..c751722423e8 100644 --- a/crates/credential/cargo-credential/src/lib.rs +++ b/credential/cargo-credential/src/lib.rs @@ -34,6 +34,26 @@ pub trait Credential { fn erase(&self, index_url: &str) -> Result<(), Error>; } +pub struct UnsupportedCredential; + +impl Credential for UnsupportedCredential { + fn name(&self) -> &'static str { + "unsupported" + } + + fn get(&self, _index_url: &str) -> Result { + Err("unsupported".into()) + } + + fn store(&self, _index_url: &str, _token: &str, _name: Option<&str>) -> Result<(), Error> { + Err("unsupported".into()) + } + + fn erase(&self, _index_url: &str) -> Result<(), Error> { + Err("unsupported".into()) + } +} + /// Runs the credential interaction by processing the command-line and /// environment variables. pub fn main(credential: impl Credential) { diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index bf8bb1578778..e6e41c5226fb 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -7,6 +7,7 @@ //! * [`RustcTargetData::info`] to get a [`TargetInfo`] for an in-depth query. //! * [`TargetInfo::rustc_outputs`] to get a list of supported file types. +use crate::core::compiler::apply_env_config; use crate::core::compiler::{ BuildOutput, CompileKind, CompileMode, CompileTarget, Context, CrateType, }; @@ -38,7 +39,7 @@ pub struct TargetInfo { /// /// The key is the crate type name (like `cdylib`) and the value is /// `Some((prefix, suffix))`, for example `libcargo.so` would be - /// `Some(("lib", ".so")). The value is `None` if the crate type is not + /// `Some(("lib", ".so"))`. The value is `None` if the crate type is not /// supported. crate_types: RefCell>>, /// `cfg` information extracted from `rustc --print=cfg`. @@ -175,6 +176,7 @@ impl TargetInfo { // // Search `--print` to see what we query so far. let mut process = rustc.workspace_process(); + apply_env_config(config, &mut process)?; process .arg("-") .arg("--crate-name") diff --git a/src/cargo/core/compiler/compilation.rs b/src/cargo/core/compiler/compilation.rs index 29642f13d79c..b263119b0392 100644 --- a/src/cargo/core/compiler/compilation.rs +++ b/src/cargo/core/compiler/compilation.rs @@ -7,7 +7,8 @@ use std::path::PathBuf; use cargo_platform::CfgExpr; use cargo_util::{paths, ProcessBuilder}; -use super::BuildContext; +use crate::core::compiler::apply_env_config; +use crate::core::compiler::BuildContext; use crate::core::compiler::{CompileKind, Metadata, Unit}; use crate::core::Package; use crate::util::{config, CargoResult, Config}; @@ -349,17 +350,7 @@ impl<'cfg> Compilation<'cfg> { ) .cwd(pkg.root()); - // Apply any environment variables from the config - for (key, value) in self.config.env_config()?.iter() { - // never override a value that has already been set by cargo - if cmd.get_envs().contains_key(key) { - continue; - } - - if value.is_force() || self.config.get_env_os(key).is_none() { - cmd.env(key, value.resolve(self.config)); - } - } + apply_env_config(self.config, &mut cmd)?; Ok(cmd) } diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 7b43fd27d999..0af59049c246 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -92,6 +92,7 @@ use crate::core::{Feature, PackageId, Target, Verbosity}; use crate::util::errors::{CargoResult, VerboseError}; use crate::util::interning::InternedString; use crate::util::machine_message::{self, Message}; +use crate::util::toml::TomlDebugInfo; use crate::util::{add_path_args, internal, iter_join_onto, profile}; use cargo_util::{paths, ProcessBuilder, ProcessError}; use rustfix::diagnostics::Applicability; @@ -603,9 +604,20 @@ fn link_targets(cx: &mut Context<'_, '_>, unit: &Unit, fresh: bool) -> CargoResu } if json_messages { + let debuginfo = profile.debuginfo.to_option().map(|d| match d { + TomlDebugInfo::None => machine_message::ArtifactDebuginfo::Int(0), + TomlDebugInfo::Limited => machine_message::ArtifactDebuginfo::Int(1), + TomlDebugInfo::Full => machine_message::ArtifactDebuginfo::Int(2), + TomlDebugInfo::LineDirectivesOnly => { + machine_message::ArtifactDebuginfo::Named("line-directives-only") + } + TomlDebugInfo::LineTablesOnly => { + machine_message::ArtifactDebuginfo::Named("line-tables-only") + } + }); let art_profile = machine_message::ArtifactProfile { opt_level: profile.opt_level.as_str(), - debuginfo: profile.debuginfo.to_option(), + debuginfo, debug_assertions: profile.debug_assertions, overflow_checks: profile.overflow_checks, test: unit_mode.is_any_test(), @@ -1793,3 +1805,18 @@ fn descriptive_pkg_name(name: &str, target: &Target, mode: &CompileMode) -> Stri }; format!("`{name}` ({desc_name}{mode})") } + +/// Applies environment variables from config `[env]` to [`ProcessBuilder`]. +fn apply_env_config(config: &crate::Config, cmd: &mut ProcessBuilder) -> CargoResult<()> { + for (key, value) in config.env_config()?.iter() { + // never override a value that has already been set by cargo + if cmd.get_envs().contains_key(key) { + continue; + } + + if value.is_force() || config.get_env_os(key).is_none() { + cmd.env(key, value.resolve(config)); + } + } + Ok(()) +} diff --git a/src/cargo/core/compiler/unit_dependencies.rs b/src/cargo/core/compiler/unit_dependencies.rs index 68fc1e5196d8..3bf8b0c77a1a 100644 --- a/src/cargo/core/compiler/unit_dependencies.rs +++ b/src/cargo/core/compiler/unit_dependencies.rs @@ -149,7 +149,7 @@ pub fn build_unit_dependencies<'a, 'cfg>( /// Compute all the dependencies for the standard library. fn calc_deps_of_std( - mut state: &mut State<'_, '_>, + state: &mut State<'_, '_>, std_roots: &HashMap>, ) -> CargoResult> { if std_roots.is_empty() { diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 7f16e79cfa6f..1f6773da9318 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -733,6 +733,7 @@ unstable_cli_options!( unstable_options: bool = ("Allow the usage of unstable options"), skip_rustdoc_fingerprint: bool = (HIDDEN), rustdoc_scrape_examples: bool = ("Allows Rustdoc to scrape code examples from reverse-dependencies"), + msrv_policy: bool = ("Enable rust-version aware policy within cargo"), ); const STABILIZED_COMPILE_PROGRESS: &str = "The progress bar is now always \ @@ -1095,6 +1096,7 @@ impl CliUnstable { "timings" => stabilized_warn(k, "1.60", STABILIZED_TIMINGS), "codegen-backend" => self.codegen_backend = parse_empty(k, v)?, "profile-rustflags" => self.profile_rustflags = parse_empty(k, v)?, + "msrv-policy" => self.msrv_policy = parse_empty(k, v)?, _ => bail!("unknown `-Z` flag specified: {}", k), } diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index 182882dad75d..9f77b1301fba 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -110,6 +110,7 @@ pub struct ManifestMetadata { pub documentation: Option, // URL pub badges: BTreeMap>, pub links: Option, + pub rust_version: Option, } #[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] diff --git a/src/cargo/core/profiles.rs b/src/cargo/core/profiles.rs index 51d19e32e627..afaf3fb4fe4e 100644 --- a/src/cargo/core/profiles.rs +++ b/src/cargo/core/profiles.rs @@ -26,7 +26,9 @@ use crate::core::dependency::Artifact; use crate::core::resolver::features::FeaturesFor; use crate::core::{PackageId, PackageIdSpec, Resolve, Shell, Target, Workspace}; use crate::util::interning::InternedString; -use crate::util::toml::{ProfilePackageSpec, StringOrBool, TomlProfile, TomlProfiles, U32OrBool}; +use crate::util::toml::{ + ProfilePackageSpec, StringOrBool, TomlDebugInfo, TomlProfile, TomlProfiles, +}; use crate::util::{closest_msg, config, CargoResult, Config}; use anyhow::{bail, Context as _}; use std::collections::{BTreeMap, HashMap, HashSet}; @@ -276,15 +278,13 @@ impl Profiles { // platform which has a stable `-Csplit-debuginfo` option for rustc, // and it's typically much faster than running `dsymutil` on all builds // in incremental cases. - if let Some(debug) = profile.debuginfo.to_option() { - if profile.split_debuginfo.is_none() && debug > 0 { - let target = match &kind { - CompileKind::Host => self.rustc_host.as_str(), - CompileKind::Target(target) => target.short_name(), - }; - if target.contains("-apple-") { - profile.split_debuginfo = Some(InternedString::new("unpacked")); - } + if profile.debuginfo.is_turned_on() && profile.split_debuginfo.is_none() { + let target = match &kind { + CompileKind::Host => self.rustc_host.as_str(), + CompileKind::Target(target) => target.short_name(), + }; + if target.contains("-apple-") { + profile.split_debuginfo = Some(InternedString::new("unpacked")); } } @@ -528,11 +528,8 @@ fn merge_profile(profile: &mut Profile, toml: &TomlProfile) { if toml.codegen_units.is_some() { profile.codegen_units = toml.codegen_units; } - match toml.debug { - Some(U32OrBool::U32(debug)) => profile.debuginfo = DebugInfo::Explicit(debug), - Some(U32OrBool::Bool(true)) => profile.debuginfo = DebugInfo::Explicit(2), - Some(U32OrBool::Bool(false)) => profile.debuginfo = DebugInfo::None, - None => {} + if let Some(debuginfo) = toml.debug { + profile.debuginfo = DebugInfo::Explicit(debuginfo); } if let Some(debug_assertions) = toml.debug_assertions { profile.debug_assertions = debug_assertions; @@ -683,7 +680,7 @@ impl Profile { Profile { name: InternedString::new("dev"), root: ProfileRoot::Debug, - debuginfo: DebugInfo::Explicit(2), + debuginfo: DebugInfo::Explicit(TomlDebugInfo::Full), debug_assertions: true, overflow_checks: true, incremental: true, @@ -704,7 +701,7 @@ impl Profile { /// Compares all fields except `name`, which doesn't affect compilation. /// This is necessary for `Unit` deduplication for things like "test" and /// "dev" which are essentially the same. - fn comparable(&self) -> impl Hash + Eq { + fn comparable(&self) -> impl Hash + Eq + '_ { ( self.opt_level, self.lto, @@ -715,9 +712,8 @@ impl Profile { self.debug_assertions, self.overflow_checks, self.rpath, - self.incremental, - self.panic, - self.strip, + (self.incremental, self.panic, self.strip), + &self.rustflags, ) } } @@ -743,7 +739,7 @@ pub enum DebugInfo { /// No debuginfo level was set. None, /// A debuginfo level that is explicitly set, by a profile or a user. - Explicit(u32), + Explicit(TomlDebugInfo), /// For internal purposes: a deferred debuginfo level that can be optimized /// away, but has this value otherwise. /// @@ -753,22 +749,22 @@ pub enum DebugInfo { /// faster to build (see [DebugInfo::weaken]). /// /// In all other situations, this level value will be the one to use. - Deferred(u32), + Deferred(TomlDebugInfo), } impl DebugInfo { /// The main way to interact with this debuginfo level, turning it into an Option. - pub fn to_option(&self) -> Option { + pub fn to_option(self) -> Option { match self { DebugInfo::None => None, - DebugInfo::Explicit(v) | DebugInfo::Deferred(v) => Some(*v), + DebugInfo::Explicit(v) | DebugInfo::Deferred(v) => Some(v), } } - /// Returns true if the debuginfo level is high enough (at least 1). Helper + /// Returns true if any debuginfo will be generated. Helper /// for a common operation on the usual `Option` representation. pub(crate) fn is_turned_on(&self) -> bool { - self.to_option().unwrap_or(0) != 0 + !matches!(self.to_option(), None | Some(TomlDebugInfo::None)) } pub(crate) fn is_deferred(&self) -> bool { diff --git a/src/cargo/core/resolver/version_prefs.rs b/src/cargo/core/resolver/version_prefs.rs index 73cce5db87ab..002f11ff809e 100644 --- a/src/cargo/core/resolver/version_prefs.rs +++ b/src/cargo/core/resolver/version_prefs.rs @@ -100,7 +100,15 @@ mod test { let pkg_id = pkgid(name, version); let config = Config::default().unwrap(); let features = BTreeMap::new(); - Summary::new(&config, pkg_id, Vec::new(), &features, None::<&String>).unwrap() + Summary::new( + &config, + pkg_id, + Vec::new(), + &features, + None::<&String>, + None::<&String>, + ) + .unwrap() } fn describe(summaries: &Vec) -> String { diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index fdae617c4f8e..f74bde257d6c 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -563,13 +563,13 @@ mod imp { use windows_sys::core::PCSTR; use windows_sys::Win32::Foundation::CloseHandle; use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE; + use windows_sys::Win32::Foundation::{GENERIC_READ, GENERIC_WRITE}; use windows_sys::Win32::Storage::FileSystem::{ CreateFileA, FILE_SHARE_READ, FILE_SHARE_WRITE, OPEN_EXISTING, }; use windows_sys::Win32::System::Console::{ GetConsoleScreenBufferInfo, GetStdHandle, CONSOLE_SCREEN_BUFFER_INFO, STD_ERROR_HANDLE, }; - use windows_sys::Win32::System::SystemServices::{GENERIC_READ, GENERIC_WRITE}; pub(super) use super::{default_err_erase_line as err_erase_line, TtyWidth}; diff --git a/src/cargo/core/summary.rs b/src/cargo/core/summary.rs index 8a7238e4a566..2535c44829d8 100644 --- a/src/cargo/core/summary.rs +++ b/src/cargo/core/summary.rs @@ -25,6 +25,7 @@ struct Inner { features: Rc, checksum: Option, links: Option, + rust_version: Option, } impl Summary { @@ -34,6 +35,7 @@ impl Summary { dependencies: Vec, features: &BTreeMap>, links: Option>, + rust_version: Option>, ) -> CargoResult { // ****CAUTION**** If you change anything here that may raise a new // error, be sure to coordinate that change with either the index @@ -55,6 +57,7 @@ impl Summary { features: Rc::new(feature_map), checksum: None, links: links.map(|l| l.into()), + rust_version: rust_version.map(|l| l.into()), }), }) } @@ -85,6 +88,10 @@ impl Summary { self.inner.links } + pub fn rust_version(&self) -> Option { + self.inner.rust_version + } + pub fn override_id(mut self, id: PackageId) -> Summary { Rc::make_mut(&mut self.inner).package_id = id; self diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index f4c671fd3baa..31d03ad259ce 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -37,7 +37,7 @@ //! - [`core::compiler`]: //! This is the code responsible for running `rustc` and `rustdoc`. //! - [`core::compiler::build_context`]: -//! The [`BuildContext`]['core::compiler::BuildContext] is the result of the "front end" of the +//! The [`BuildContext`][core::compiler::BuildContext] is the result of the "front end" of the //! build process. This contains the graph of work to perform and any settings necessary for //! `rustc`. After this is built, the next stage of building is handled in //! [`Context`][core::compiler::Context]. @@ -86,7 +86,7 @@ //! - [`cargo-test-macro`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-test-macro) //! ([nightly docs](https://doc.rust-lang.org/nightly/nightly-rustc/cargo_test_macro/index.html)): //! This is the `#[cargo_test]` proc-macro used by the test suite to define tests. -//! - [`credential`](https://github.com/rust-lang/cargo/tree/master/crates/credential) +//! - [`credential`](https://github.com/rust-lang/cargo/tree/master/credential) //! This subdirectory contains several packages for implementing the //! experimental //! [credential-process](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process) diff --git a/src/cargo/ops/cargo_install.rs b/src/cargo/ops/cargo_install.rs index 53c3e72f79af..5f843e8c731e 100644 --- a/src/cargo/ops/cargo_install.rs +++ b/src/cargo/ops/cargo_install.rs @@ -4,7 +4,9 @@ use std::sync::Arc; use std::{env, fs}; use crate::core::compiler::{CompileKind, DefaultExecutor, Executor, UnitOutput}; -use crate::core::{Dependency, Edition, Package, PackageId, Source, SourceId, Target, Workspace}; +use crate::core::{ + Dependency, Edition, Package, PackageId, PackageIdSpec, Source, SourceId, Target, Workspace, +}; use crate::ops::{common_for_install_and_uninstall::*, FilterRule}; use crate::ops::{CompileFilter, Packages}; use crate::sources::{GitSource, PathSource, SourceConfigMap}; @@ -168,14 +170,8 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> { } }; - // When we build this package, we want to build the *specified* package only, - // and avoid building e.g. workspace default-members instead. Do so by constructing - // specialized compile options specific to the identified package. - // See test `path_install_workspace_root_despite_default_members`. - let mut opts = original_opts.clone(); - opts.spec = Packages::Packages(vec![pkg.name().to_string()]); - - let (ws, rustc, target) = make_ws_rustc_target(config, &opts, &source_id, pkg.clone())?; + let (ws, rustc, target) = + make_ws_rustc_target(config, &original_opts, &source_id, pkg.clone())?; // If we're installing in --locked mode and there's no `Cargo.lock` published // ie. the bin was published before https://github.com/rust-lang/cargo/pull/7026 if config.locked() && !ws.root().join("Cargo.lock").exists() { @@ -192,6 +188,17 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> { ws.current()?.clone() }; + // When we build this package, we want to build the *specified* package only, + // and avoid building e.g. workspace default-members instead. Do so by constructing + // specialized compile options specific to the identified package. + // See test `path_install_workspace_root_despite_default_members`. + let mut opts = original_opts.clone(); + // For cargo install tracking, we retain the source git url in `pkg`, but for the build spec + // we need to unconditionally use `ws.current()` to correctly address the path where we + // locally cloned that repo. + let pkgidspec = PackageIdSpec::from_package_id(ws.current()?.package_id()); + opts.spec = Packages::Packages(vec![pkgidspec.to_string()]); + if from_cwd { if pkg.manifest().edition() == Edition::Edition2015 { config.shell().warn( diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index 35b213361a27..b78d02928822 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -281,7 +281,7 @@ fn build_ar_list( if let Some(license_file) = &pkg.manifest().metadata().license_file { let license_path = Path::new(license_file); let abs_file_path = paths::normalize_path(&pkg.root().join(license_path)); - if abs_file_path.exists() { + if abs_file_path.is_file() { check_for_file_and_add( "license-file", license_path, @@ -291,26 +291,16 @@ fn build_ar_list( ws, )?; } else { - let rel_msg = if license_path.is_absolute() { - "".to_string() - } else { - format!(" (relative to `{}`)", pkg.root().display()) - }; - ws.config().shell().warn(&format!( - "license-file `{}` does not appear to exist{}.\n\ - Please update the license-file setting in the manifest at `{}`\n\ - This may become a hard error in the future.", - license_path.display(), - rel_msg, - pkg.manifest_path().display() - ))?; + warn_on_nonexistent_file(&pkg, &license_path, "license-file", &ws)?; } } if let Some(readme) = &pkg.manifest().metadata().readme { let readme_path = Path::new(readme); let abs_file_path = paths::normalize_path(&pkg.root().join(readme_path)); - if abs_file_path.exists() { + if abs_file_path.is_file() { check_for_file_and_add("readme", readme_path, abs_file_path, pkg, &mut result, ws)?; + } else { + warn_on_nonexistent_file(&pkg, &readme_path, "readme", &ws)?; } } result.sort_unstable_by(|a, b| a.rel_path.cmp(&b.rel_path)); @@ -369,6 +359,27 @@ fn check_for_file_and_add( Ok(()) } +fn warn_on_nonexistent_file( + pkg: &Package, + path: &Path, + manifest_key_name: &'static str, + ws: &Workspace<'_>, +) -> CargoResult<()> { + let rel_msg = if path.is_absolute() { + "".to_string() + } else { + format!(" (relative to `{}`)", pkg.root().display()) + }; + ws.config().shell().warn(&format!( + "{manifest_key_name} `{}` does not appear to exist{}.\n\ + Please update the {manifest_key_name} setting in the manifest at `{}`\n\ + This may become a hard error in the future.", + path.display(), + rel_msg, + pkg.manifest_path().display() + )) +} + /// Construct `Cargo.lock` for the package to be published. fn build_lock(ws: &Workspace<'_>, orig_pkg: &Package) -> CargoResult { let config = ws.config(); diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index e04f7ba2cffd..cc15d47f56a6 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -345,6 +345,7 @@ fn transmit( ref categories, ref badges, ref links, + ref rust_version, } = *manifest.metadata(); let readme_content = readme .as_ref() @@ -398,6 +399,7 @@ fn transmit( license_file: license_file.clone(), badges: badges.clone(), links: links.clone(), + rust_version: rust_version.clone(), }, tarball, ) diff --git a/src/cargo/ops/tree/graph.rs b/src/cargo/ops/tree/graph.rs index 20a9ca0b6574..d01d07f1a1a3 100644 --- a/src/cargo/ops/tree/graph.rs +++ b/src/cargo/ops/tree/graph.rs @@ -362,6 +362,10 @@ fn add_pkg( if !opts.edge_kinds.contains(&EdgeKind::Dep(dep.kind())) { return false; } + // Filter out proc-macrcos if requested. + if opts.no_proc_macro && graph.package_for_id(dep_id).proc_macro() { + return false; + } if dep.is_optional() { // If the new feature resolver does not enable this // optional dep, then don't use it. diff --git a/src/cargo/ops/tree/mod.rs b/src/cargo/ops/tree/mod.rs index 02459f78f43b..f397b95af6fe 100644 --- a/src/cargo/ops/tree/mod.rs +++ b/src/cargo/ops/tree/mod.rs @@ -267,7 +267,6 @@ fn print( opts.prefix, opts.no_dedupe, opts.max_display_depth, - opts.no_proc_macro, &mut visited_deps, &mut levels_continue, &mut print_stack, @@ -288,7 +287,6 @@ fn print_node<'a>( prefix: Prefix, no_dedupe: bool, max_display_depth: u32, - no_proc_macro: bool, visited_deps: &mut HashSet, levels_continue: &mut Vec, print_stack: &mut Vec, @@ -348,7 +346,6 @@ fn print_node<'a>( prefix, no_dedupe, max_display_depth, - no_proc_macro, visited_deps, levels_continue, print_stack, @@ -369,7 +366,6 @@ fn print_dependencies<'a>( prefix: Prefix, no_dedupe: bool, max_display_depth: u32, - no_proc_macro: bool, visited_deps: &mut HashSet, levels_continue: &mut Vec, print_stack: &mut Vec, @@ -405,19 +401,6 @@ fn print_dependencies<'a>( let mut it = deps .iter() - .filter(|dep| { - // Filter out proc-macro dependencies. - if no_proc_macro { - match graph.node(**dep) { - &Node::Package { package_id, .. } => { - !graph.package_for_id(package_id).proc_macro() - } - _ => true, - } - } else { - true - } - }) .filter(|dep| { // Filter out packages to prune. match graph.node(**dep) { @@ -441,7 +424,6 @@ fn print_dependencies<'a>( prefix, no_dedupe, max_display_depth, - no_proc_macro, visited_deps, levels_continue, print_stack, diff --git a/src/cargo/sources/registry/index.rs b/src/cargo/sources/registry/index.rs index a215114347c2..09b55c470cd6 100644 --- a/src/cargo/sources/registry/index.rs +++ b/src/cargo/sources/registry/index.rs @@ -814,6 +814,7 @@ impl IndexSummary { features2, yanked, links, + rust_version, v, } = serde_json::from_slice(line)?; let v = v.unwrap_or(1); @@ -828,7 +829,7 @@ impl IndexSummary { features.entry(name).or_default().extend(values); } } - let mut summary = Summary::new(config, pkgid, deps, &features, links)?; + let mut summary = Summary::new(config, pkgid, deps, &features, links, rust_version)?; summary.set_checksum(cksum); Ok(IndexSummary { summary, diff --git a/src/cargo/sources/registry/mod.rs b/src/cargo/sources/registry/mod.rs index aa3f5dc5ff4f..b505fa9d72cf 100644 --- a/src/cargo/sources/registry/mod.rs +++ b/src/cargo/sources/registry/mod.rs @@ -241,7 +241,7 @@ pub struct RegistryConfig { /// crate's sha256 checksum. /// /// For backwards compatibility, if the string does not contain any - /// markers (`{crate}`, `{version}`, `{prefix}`, or ``{lowerprefix}`), it + /// markers (`{crate}`, `{version}`, `{prefix}`, or `{lowerprefix}`), it /// will be extended with `/{crate}/{version}/download` to /// support registries like crates.io which were created before the /// templating setup was created. @@ -287,6 +287,13 @@ pub struct RegistryPackage<'a> { /// Added early 2018 (see ), /// can be `None` if published before then. links: Option, + /// Required version of rust + /// + /// Corresponds to `package.rust-version`. + /// + /// Added in 2023 (see ), + /// can be `None` if published before then or if not set in the manifest. + rust_version: Option, /// The schema version for this entry. /// /// If this is None, it defaults to version 1. Entries with unknown @@ -945,7 +952,7 @@ impl<'cfg> Source for RegistrySource<'cfg> { } /// Get the maximum upack size that Cargo permits -/// based on a given `size of your compressed file. +/// based on a given `size` of your compressed file. /// /// Returns the larger one between `size * max compression ratio` /// and a fixed max unpacked size. diff --git a/src/cargo/util/machine_message.rs b/src/cargo/util/machine_message.rs index baef5167b367..f1602ae57c3f 100644 --- a/src/cargo/util/machine_message.rs +++ b/src/cargo/util/machine_message.rs @@ -55,12 +55,20 @@ impl<'a> Message for Artifact<'a> { #[derive(Serialize)] pub struct ArtifactProfile { pub opt_level: &'static str, - pub debuginfo: Option, + pub debuginfo: Option, pub debug_assertions: bool, pub overflow_checks: bool, pub test: bool, } +/// Internally this is an enum with different variants, but keep using 0/1/2 as integers for compatibility. +#[derive(Serialize)] +#[serde(untagged)] +pub enum ArtifactDebuginfo { + Int(u32), + Named(&'static str), +} + #[derive(Serialize)] pub struct BuildScript<'a> { pub package_id: PackageId, diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 9e7c6f63e20a..3b2bba09cfc0 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -1,5 +1,5 @@ use std::collections::{BTreeMap, BTreeSet, HashMap}; -use std::fmt; +use std::fmt::{self, Display, Write}; use std::marker::PhantomData; use std::path::{Path, PathBuf}; use std::rc::Rc; @@ -12,8 +12,8 @@ use itertools::Itertools; use lazycell::LazyCell; use log::{debug, trace}; use semver::{self, VersionReq}; -use serde::de; use serde::de::IntoDeserializer as _; +use serde::de::{self, Unexpected}; use serde::ser; use serde::{Deserialize, Serialize}; use url::Url; @@ -442,11 +442,100 @@ impl ser::Serialize for TomlOptLevel { } } -#[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] -#[serde(untagged, expecting = "expected a boolean or an integer")] -pub enum U32OrBool { - U32(u32), - Bool(bool), +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)] +pub enum TomlDebugInfo { + None, + LineDirectivesOnly, + LineTablesOnly, + Limited, + Full, +} + +impl ser::Serialize for TomlDebugInfo { + fn serialize(&self, serializer: S) -> Result + where + S: ser::Serializer, + { + match self { + Self::None => 0.serialize(serializer), + Self::LineDirectivesOnly => "line-directives-only".serialize(serializer), + Self::LineTablesOnly => "line-tables-only".serialize(serializer), + Self::Limited => 1.serialize(serializer), + Self::Full => 2.serialize(serializer), + } + } +} + +impl<'de> de::Deserialize<'de> for TomlDebugInfo { + fn deserialize(d: D) -> Result + where + D: de::Deserializer<'de>, + { + struct Visitor; + + impl<'de> de::Visitor<'de> for Visitor { + type Value = TomlDebugInfo; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str( + "a boolean, 0, 1, 2, \"line-tables-only\", or \"line-directives-only\"", + ) + } + + fn visit_i64(self, value: i64) -> Result + where + E: de::Error, + { + let debuginfo = match value { + 0 => TomlDebugInfo::None, + 1 => TomlDebugInfo::Limited, + 2 => TomlDebugInfo::Full, + _ => return Err(de::Error::invalid_value(Unexpected::Signed(value), &self)), + }; + Ok(debuginfo) + } + + fn visit_bool(self, v: bool) -> Result + where + E: de::Error, + { + Ok(if v { + TomlDebugInfo::Full + } else { + TomlDebugInfo::None + }) + } + + fn visit_str(self, value: &str) -> Result + where + E: de::Error, + { + let debuginfo = match value { + "none" => TomlDebugInfo::None, + "limited" => TomlDebugInfo::Limited, + "full" => TomlDebugInfo::Full, + "line-directives-only" => TomlDebugInfo::LineDirectivesOnly, + "line-tables-only" => TomlDebugInfo::LineTablesOnly, + _ => return Err(de::Error::invalid_value(Unexpected::Str(value), &self)), + }; + Ok(debuginfo) + } + } + + d.deserialize_any(Visitor) + } +} + +impl Display for TomlDebugInfo { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TomlDebugInfo::None => f.write_char('0'), + TomlDebugInfo::Limited => f.write_char('1'), + TomlDebugInfo::Full => f.write_char('2'), + TomlDebugInfo::LineDirectivesOnly => f.write_str("line-directives-only"), + TomlDebugInfo::LineTablesOnly => f.write_str("line-tables-only"), + } + } } #[derive(Deserialize, Serialize, Clone, Debug, Default, Eq, PartialEq)] @@ -456,7 +545,7 @@ pub struct TomlProfile { pub lto: Option, pub codegen_backend: Option, pub codegen_units: Option, - pub debug: Option, + pub debug: Option, pub split_debuginfo: Option, pub debug_assertions: Option, pub rpath: Option, @@ -2278,6 +2367,7 @@ impl TomlManifest { deps, me.features.as_ref().unwrap_or(&empty_features), package.links.as_deref(), + rust_version.as_deref().map(InternedString::new), )?; let metadata = ManifestMetadata { @@ -2344,6 +2434,11 @@ impl TomlManifest { .transpose()? .unwrap_or_default(), links: package.links.clone(), + rust_version: package + .rust_version + .clone() + .map(|mw| mw.resolve("rust-version", || inherit()?.rust_version())) + .transpose()?, }; package.description = metadata .description @@ -2908,8 +3003,8 @@ impl DetailedTomlDependency

    { if self.version.is_none() && self.path.is_none() && self.git.is_none() { let msg = format!( "dependency ({}) specified without \ - providing a local path, Git repository, or \ - version to use. This will be considered an \ + providing a local path, Git repository, version, or \ + workspace dependency to use. This will be considered an \ error in future versions", name_in_toml ); diff --git a/src/cargo/util/toml_mut/dependency.rs b/src/cargo/util/toml_mut/dependency.rs index d8a2f2750aac..1b24833c1eea 100644 --- a/src/cargo/util/toml_mut/dependency.rs +++ b/src/cargo/util/toml_mut/dependency.rs @@ -225,62 +225,72 @@ impl Dependency { (key.to_owned(), None) }; - let source: Source = - if let Some(git) = table.get("git") { - let mut src = GitSource::new( - git.as_str() - .ok_or_else(|| invalid_type(key, "git", git.type_name(), "string"))?, - ); - if let Some(value) = table.get("branch") { - src = src.set_branch(value.as_str().ok_or_else(|| { + let source: Source = if let Some(git) = table.get("git") { + let mut src = GitSource::new( + git.as_str() + .ok_or_else(|| invalid_type(key, "git", git.type_name(), "string"))?, + ); + if let Some(value) = table.get("branch") { + src = + src.set_branch(value.as_str().ok_or_else(|| { invalid_type(key, "branch", value.type_name(), "string") })?); - } - if let Some(value) = table.get("tag") { - src = src.set_tag(value.as_str().ok_or_else(|| { + } + if let Some(value) = table.get("tag") { + src = + src.set_tag(value.as_str().ok_or_else(|| { invalid_type(key, "tag", value.type_name(), "string") })?); - } - if let Some(value) = table.get("rev") { - src = src.set_rev(value.as_str().ok_or_else(|| { + } + if let Some(value) = table.get("rev") { + src = + src.set_rev(value.as_str().ok_or_else(|| { invalid_type(key, "rev", value.type_name(), "string") })?); - } - if let Some(value) = table.get("version") { - src = src.set_version(value.as_str().ok_or_else(|| { - invalid_type(key, "version", value.type_name(), "string") - })?); - } - src.into() - } else if let Some(path) = table.get("path") { - let path = crate_root + } + if let Some(value) = table.get("version") { + src = src.set_version(value.as_str().ok_or_else(|| { + invalid_type(key, "version", value.type_name(), "string") + })?); + } + src.into() + } else if let Some(path) = table.get("path") { + let path = + crate_root .join(path.as_str().ok_or_else(|| { invalid_type(key, "path", path.type_name(), "string") })?); - let mut src = PathSource::new(path); - if let Some(value) = table.get("version") { - src = src.set_version(value.as_str().ok_or_else(|| { - invalid_type(key, "version", value.type_name(), "string") - })?); - } - src.into() - } else if let Some(version) = table.get("version") { - let src = RegistrySource::new(version.as_str().ok_or_else(|| { + let mut src = PathSource::new(path); + if let Some(value) = table.get("version") { + src = src.set_version(value.as_str().ok_or_else(|| { + invalid_type(key, "version", value.type_name(), "string") + })?); + } + src.into() + } else if let Some(version) = table.get("version") { + let src = + RegistrySource::new(version.as_str().ok_or_else(|| { invalid_type(key, "version", version.type_name(), "string") })?); - src.into() - } else if let Some(workspace) = table.get("workspace") { - let workspace_bool = workspace.as_bool().ok_or_else(|| { - invalid_type(key, "workspace", workspace.type_name(), "bool") - })?; - if !workspace_bool { - anyhow::bail!("`{key}.workspace = false` is unsupported") - } - let src = WorkspaceSource::new(); - src.into() - } else { - anyhow::bail!("Unrecognized dependency source for `{key}`"); - }; + src.into() + } else if let Some(workspace) = table.get("workspace") { + let workspace_bool = workspace + .as_bool() + .ok_or_else(|| invalid_type(key, "workspace", workspace.type_name(), "bool"))?; + if !workspace_bool { + anyhow::bail!("`{key}.workspace = false` is unsupported") + } + let src = WorkspaceSource::new(); + src.into() + } else { + let mut msg = format!("unrecognized dependency source for `{key}`"); + if table.is_empty() { + msg.push_str( + ", expected a local path, Git repository, version, or workspace dependency to be specified", + ); + } + anyhow::bail!(msg); + }; let registry = if let Some(value) = table.get("registry") { Some( value diff --git a/src/doc/README.md b/src/doc/README.md index 79181b7f6992..88c3302873bd 100644 --- a/src/doc/README.md +++ b/src/doc/README.md @@ -50,11 +50,7 @@ directory) to three different formats: 3. Plain text (needed for embedded man pages on platforms without man such as Windows), saved in [`src/doc/man/generated_txt/`](man/generated_txt). -To rebuild the man pages, run the script `build-man.sh` in the `src/doc` directory. - -```console -$ ./build-man.sh -``` +To rebuild the man pages, run `cargo build-man` inside the workspace. ### SemVer chapter tests diff --git a/src/doc/build-man.sh b/src/doc/build-man.sh deleted file mode 100755 index 7b1330b58f7b..000000000000 --- a/src/doc/build-man.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# This script builds the Cargo man pages. -# -# The source for the man pages are located in src/doc/man/ in markdown format. -# These also are handlebars templates, see crates/mdman/README.md for details. -# -# The generated man pages are placed in the src/etc/man/ directory. The pages -# are also expanded into markdown (after being expanded by handlebars) and -# saved in the src/doc/src/commands/ directory. These are included in the -# Cargo book, which is converted to HTML by mdbook. - -set -e - -cd "$(dirname "${BASH_SOURCE[0]}")" - -OPTIONS="--url https://doc.rust-lang.org/cargo/commands/ \ - --man rustc:1=https://doc.rust-lang.org/rustc/index.html \ - --man rustdoc:1=https://doc.rust-lang.org/rustdoc/index.html" - -cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ - -t md -o src/commands man/cargo*.md \ - $OPTIONS - -cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ - -t txt -o man/generated_txt man/cargo*.md \ - $OPTIONS - -cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ - -t man -o ../etc/man man/cargo*.md \ - $OPTIONS diff --git a/src/doc/contrib/src/implementation/console.md b/src/doc/contrib/src/implementation/console.md index a73d232e0ce4..99d31b951ae1 100644 --- a/src/doc/contrib/src/implementation/console.md +++ b/src/doc/contrib/src/implementation/console.md @@ -19,7 +19,7 @@ the [`JobQueue`] as it processes each message. [`Shell`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/shell.rs [`Config`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/util/config/mod.rs [`drop_print`]: https://github.com/rust-lang/cargo/blob/e4b65bdc80f2a293447f2f6a808fa7c84bf9a357/src/cargo/util/config/mod.rs#L1820-L1848 -[`JobQueue`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/job_queue.rs +[`JobQueue`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/job_queue/mod.rs ## Errors diff --git a/src/doc/contrib/src/implementation/filesystem.md b/src/doc/contrib/src/implementation/filesystem.md index 0f70c5833f02..3c1b2dbd5d5c 100644 --- a/src/doc/contrib/src/implementation/filesystem.md +++ b/src/doc/contrib/src/implementation/filesystem.md @@ -17,5 +17,5 @@ its best to handle them. Some examples of issues to deal with: fractional part of the time stamp. * Symlinks are not always supported, particularly on Windows. -[`fingerprint`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs +[`fingerprint`]: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint/mod.rs [`fs::canonicalize`]: https://doc.rust-lang.org/std/fs/fn.canonicalize.html diff --git a/src/doc/contrib/src/index.md b/src/doc/contrib/src/index.md index 5ab169ea799e..848b0efaa465 100644 --- a/src/doc/contrib/src/index.md +++ b/src/doc/contrib/src/index.md @@ -5,8 +5,8 @@ overview of how to contribute to Cargo, how to dive into the code, and how the testing infrastructure works. There are many ways to contribute, such as [helping other users], [filing -issues], [improving the documentation], [fixing bugs], and working on [small] -and [large features]. +issues], [improving the documentation], [triaging issues], [fixing bugs], and +working on [small] and [large features]. If you have a general question about Cargo or its internals, feel free to ask on [Zulip]. @@ -24,6 +24,7 @@ Please also read the [Rust Code of Conduct]. [rustup]: https://rust-lang.github.io/rustup/ [git]: https://git-scm.com/ [improving the documentation]: https://github.com/rust-lang/cargo/tree/master/src/doc -[fixing bugs]: process/index.md#working-on-small-bugs +[fixing bugs]: process/index.md#working-on-issues [small]: process/index.md#working-on-small-features [large features]: process/index.md#working-on-large-features +[triaging issues]: issues.md#triaging-issues diff --git a/src/doc/contrib/src/issues.md b/src/doc/contrib/src/issues.md index 8fc69544c618..b82492d27858 100644 --- a/src/doc/contrib/src/issues.md +++ b/src/doc/contrib/src/issues.md @@ -57,53 +57,184 @@ necessary. ## Issue labels [Issue labels] are very helpful to identify the types of issues and which -category they are related to. The Cargo team typically manages assigning -labels. The labels use a naming convention with short prefixes and colors to -indicate the kind of label: +category they are related to. -* Yellow, **A**-prefixed labels state which **area** of the project an issue - relates to. +Anyone can apply most labels by posting comments with a form such as: -* Light purple, **C**-prefixed labels represent the **category** of an issue. - In particular, **[C-feature-request]** marks *proposals* for new features. If - an issue is **C-feature-request**, but is not **[Feature accepted]** or - **[I-nominated]**, then it was not thoroughly discussed, and might need some - additional design or perhaps should be implemented as an external subcommand - first. Ping @rust-lang/cargo if you want to send a PR for such issue. +```text +@rustbot label: +A-doctests, -A-dependency-resolution +``` -* Dark purple, **Command**-prefixed labels mean the issue has to do with a - specific cargo command. +This example will add the [`A-doctests`] label and remove the +[`A-dependency-resolution`] label. -* Green, **E**-prefixed labels indicate the level of **experience** or - **effort** necessary to fix the issue. **[E-mentor]** issues also - have some instructions on how to get started. Generally, all of the - **E**-prefixed labels are issues that are ready for someone to contribute - to! +[Issue labels]: https://github.com/rust-lang/cargo/labels +[`A-doctests`]: https://github.com/rust-lang/cargo/labels/A-doctests +[`A-dependency-resolution`]: https://github.com/rust-lang/cargo/labels/A-dependency-resolution + +The labels use a naming convention with short prefixes and colors to indicate +the kind of label: + + + +| Labels | Color | Description | +|--------|-------|-------------| +| [A-] |  Yellow | The **area** of the project an issue relates to. | +| [beta-] |  Dark Blue | Tracks changes which need to be [backported to beta][beta-backport] | +| [C-] |  Light Purple | The **category** of an issue. | +| [Command-] |  Dark Purple | The `cargo` command it is related to. | +| [E-] |  Green | The **experience** level necessary to fix an issue. | +| [I-] |  Red | The **importance** of the issue. | +| [O-] |  Purple Grey | The **operating system** or platform that the issue is specific to. | +| [P-] |  Orange | The issue **priority**. | +| [regression-] |  Pink | Tracks regressions from a stable release. | +| [relnotes] |  Light Orange | Marks issues or PRs that should be highlighted in the [Rust release notes] of the next release. | +| [S-] | Varies | Tracks the **status** of issues and pull requests (see [Issue status labels](#issue-status-labels)) | +| [Z-] |  Dark Blue | Unstable, [nightly features]. | + + +[A-]: https://github.com/rust-lang/cargo/labels?q=A +[beta-]: https://github.com/rust-lang/cargo/labels?q=beta +[beta-backport]: https://forge.rust-lang.org/release/backporting.html#beta-backporting-in-rust-langcargo +[C-]: https://github.com/rust-lang/cargo/labels?q=C +[Command-]: https://github.com/rust-lang/cargo/labels?q=Command +[E-]: https://github.com/rust-lang/cargo/labels?q=E +[I-]: https://github.com/rust-lang/cargo/labels?q=I +[nightly features]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html +[O-]: https://github.com/rust-lang/cargo/labels?q=O +[P-]: https://github.com/rust-lang/cargo/labels?q=P +[regression-]: https://github.com/rust-lang/cargo/labels?q=regression +[relnotes]: https://github.com/rust-lang/cargo/issues?q=label%3Arelnotes +[Rust release notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md +[S-]: https://github.com/rust-lang/cargo/labels?q=S +[Z-]: https://github.com/rust-lang/cargo/labels?q=nightly -* Red, **I**-prefixed labels indicate the **importance** of the issue. The - **[I-nominated]** label indicates that an issue has been nominated for - prioritizing at the next triage meeting. +### Issue status labels -* Purple gray, **O**-prefixed labels are the **operating system** or platform - that this issue is specific to. +The `S-` prefixed *status* labels are the primary mechanism we use to track +what is happening with an issue and what it is waiting on. The following is a +list of the status labels and what they mean. This is listed roughly in the +order that an issue might go through, though issues will often jump to +different steps, or in rare cases have multiple statuses. -* Orange, **P**-prefixed labels indicate a bug's **priority**. +* **[S-triage]** --- New issues get this label automatically assigned to them + to indicate that nobody has yet looked at them, and they need someone to + assign other labels and decide what the next step is. -* **S**-prefixed labels are "status" labels, typically used for PRs, but can - also indicate an issue is **[S-blocked]**. +* **[S-needs-info]** --- Needs more info, such as a reproduction or more + background for a feature request. -* The light orange **[relnotes]** label marks issues that should be highlighted - in the [Rust release notes] of the next release. + Anyone is welcome to help with providing additional info to help reproduce + or provide more detail on use cases and such. But usually this is a request + to the initial author. -* Dark blue, **Z**-prefixed labels are for unstable, [nightly features]. + When adding this label, there should also usually be a comment that goes + along with it stating the information requested. + +* **[S-needs-team-input]** --- Needs input from team on whether/how to + proceed. + + Here it is essentially blocked waiting for a team member to move it to the + next stage. + +* **[S-needs-design]** --- Needs someone to work further on the design for the + feature or fix. + + Anyone is welcome to help at this stage, but it should be clear that it is + not yet accepted. It is expected that people should contribute comments and + ideas to the issue which furthers the process of fleshing out what is + needed, or alternate ideas. This may also require reaching out to the wider + community via forums and such. + +* **[S-needs-rfc]** --- Needs an [RFC] before this can make more progress. + + Anyone is welcome to help at this stage, but it should be clear that it is + not yet accepted. However, this should only be tagged for changes that are + somewhat likely to be accepted. + +* **[S-needs-mentor]** --- Needs a Cargo team member to commit to helping and + reviewing. + + This is for something that is accepted, such as after an RFC or a team + discussion, or an obvious issue that just needs fixing, but no team member + is available to help or review. + +* **[S-accepted]** --- Issue or feature is accepted, and has a team member + available to help mentor or review. + +* **[S-waiting-on-feedback]** --- An implemented feature is waiting on + community feedback for bugs or design concerns. + + This is typically used on a [tracking issue] after it has been implemented + to indicate what it is waiting on. + + +[S-triage]: https://github.com/rust-lang/cargo/labels/S-triage +[S-needs-info]: https://github.com/rust-lang/cargo/labels/S-needs-info +[S-needs-team-input]: https://github.com/rust-lang/cargo/labels/S-needs-team-input +[S-needs-design]: https://github.com/rust-lang/cargo/labels/S-needs-design +[S-needs-rfc]: https://github.com/rust-lang/cargo/labels/S-needs-rfc +[S-needs-mentor]: https://github.com/rust-lang/cargo/labels/S-needs-mentor +[S-accepted]: https://github.com/rust-lang/cargo/labels/S-accepted +[S-waiting-on-feedback]: https://github.com/rust-lang/cargo/labels/S-waiting-on-feedback +[RFC]: https://github.com/rust-lang/rfcs/ +[tracking issue]: https://github.com/rust-lang/cargo/labels/C-tracking-issue + +## Triaging issues + +Triaging issues involves processing issues to assign appropriate labels, make +sure the issue has sufficient information, and to decide the next steps. +When new issues are filed, they should automatically get the [S-triage] label +assuming the author uses one of the templates. This helps identify which +issues have not yet been triaged. + +There are several things to consider when triaging an issue: + +* Is this a duplicate? Search the issue tracker (including closed issues) to + see if there is something similar or identical to what is reported. If it is + obviously a duplicate, write a comment that it is a duplicate of the other + issue, and close the issue. If it isn't obvious that it is a duplicate, + leave a comment asking the author if the other issue covers what they reported. + +* For a bug, check if the report contains enough information to reproduce it. + If you can't reproduce it, solicit more information from the author to + better understand the issue. + Change the label from [S-triage] to [S-needs-info] if this is the case. + +* Add labels that describe what the issue is related to. + + * Add the appropriate [A-], [Command-], [O-], and [Z-] prefixed labels. + * If this is a regression from stable, add one of the [regression-] + prefixed labels (depending on if it is a regression in an already + released stable release, or it is in nightly). -[Issue labels]: https://github.com/rust-lang/cargo/labels -[E-easy]: https://github.com/rust-lang/cargo/labels/E-easy -[E-mentor]: https://github.com/rust-lang/cargo/labels/E-mentor -[I-nominated]: https://github.com/rust-lang/cargo/labels/I-nominated -[C-feature-request]: https://github.com/rust-lang/cargo/labels/C-feature-request -[Feature accepted]: https://github.com/rust-lang/cargo/labels/Feature%20accepted -[S-blocked]: https://github.com/rust-lang/cargo/labels/S-blocked -[Rust release notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md -[nightly features]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html -[relnotes]: https://github.com/rust-lang/cargo/issues?q=label%3Arelnotes +* Assuming the issue looks valid, remove the [S-triage] label and move it onto + a new status: + + * [S-needs-rfc] --- This is a large feature request that will require a + public design process. + * [S-needs-design] --- The resolution of the issue or small feature request + will need more work to come up with the appropriate design. + * [S-needs-team-input] --- The next steps are not clear, and the Cargo team + needs to discuss whether or not to proceed and what needs to be done to + address the issue. + * [S-needs-mentor] --- This is something the Cargo team wants to address, + but does not currently have the capacity to help with reviewing. + * [S-accepted] --- This is something that clearly needs to be addressed, and + a Cargo team member has volunteered to help review. + +Anyone is welcome to help with the triaging process. You can help with +reproducing issues, checking for duplicates, gathering more information from +the reporter, assigning labels using [`@rustbot` comments](#issue-labels), and +creating a test using [Cargo's testsuite] ([example][cargotest-example]). + +[Cargo's testsuite]: tests/writing.md +[cargotest-example]: https://github.com/rust-lang/cargo/issues/11628#issuecomment-1411088951 diff --git a/src/doc/contrib/src/process/index.md b/src/doc/contrib/src/process/index.md index 348c49ba9442..af019659b90f 100644 --- a/src/doc/contrib/src/process/index.md +++ b/src/doc/contrib/src/process/index.md @@ -38,44 +38,40 @@ The [RFC Project Board] is used for tracking [RFCs]. [RFC Project Board]: https://github.com/rust-lang/cargo/projects/2 [RFCs]: https://github.com/rust-lang/rfcs/ -## Working on small bugs +## Working on issues -Issues labeled with the [E-help-wanted], [E-easy], or [E-mentor] [labels] are -typically issues that the Cargo team wants to see addressed, and are -relatively easy to get started with. If you are interested in one of those, -and it has not already been assigned to someone, leave a comment. See [Issue +Issues labeled with the [S-accepted] [label] are typically issues that the +Cargo team wants to see addressed. If you are interested in one of those, and +it has not already been assigned to someone, leave a comment. See [Issue assignment](#issue-assignment) below for assigning yourself. -If there is a specific issue that you are interested in, but it doesn't have -one of the `E-` labels, leave a comment on the issue. If a Cargo team member -has the time to help out, they will respond to help with the next steps. +When possible, the Cargo team will try to also include [E-easy], [E-medium], +or [E-hard] labels to try to give an estimate of the difficulty involved with +the issue. -[E-help-wanted]: https://github.com/rust-lang/cargo/labels/E-help-wanted -[E-easy]: https://github.com/rust-lang/cargo/labels/E-easy -[E-mentor]: https://github.com/rust-lang/cargo/labels/E-mentor -[labels]: ../issues.md#issue-labels - -## Working on large bugs - -Some issues may be difficult to fix. They may require significant code -changes, or major design decisions. The [E-medium] and [E-hard] [labels] can -be used to tag such issues. These will typically involve some discussion with -the Cargo team on how to tackle it. +If there is a specific issue that you are interested in, but it is not marked +as [S-accepted], leave a comment on the issue. If a Cargo team member has the +time to help out, they will respond to help with the next steps. +[E-easy]: https://github.com/rust-lang/cargo/labels/E-easy [E-medium]: https://github.com/rust-lang/cargo/labels/E-medium [E-hard]: https://github.com/rust-lang/cargo/labels/E-hard +[S-accepted]: https://github.com/rust-lang/cargo/labels/S-accepted +[label]: ../issues.md#issue-labels ## Working on small features Small feature requests are typically managed on the [issue tracker][issue-feature-request]. Features that the Cargo team have approved -will have the [Feature accepted] label or the [E-mentor] label. If there is a -feature request that you are interested in, feel free to leave a comment -expressing your interest. If a Cargo team member has the time to help out, -they will respond to help with the next steps. Keep in mind that the Cargo -team has limited time, and may not be able to help with every feature request. -Most of them require some design work, which can be difficult. Check out the -[design principles chapter] for some guidance. +will have the [S-accepted] label. + +If there is a feature request that you are interested in, but it is not marked +as [S-accepted], feel free to leave a comment expressing your interest. If a +Cargo team member has the time to help out, they will respond to help with the +next steps. Keep in mind that the Cargo team has limited time, and may not be +able to help with every feature request. Most of them require some design +work, which can be difficult. Check out the [design principles chapter] for +some guidance. ## Working on large features @@ -114,11 +110,11 @@ The Cargo project uses several bots: ## Issue assignment -Normally, if you plan to work on an issue that has been marked with one of the -`E-` tags or [Feature accepted], it is sufficient just to leave a comment that -you are working on it. We also have a bot that allows you to formally "claim" -an issue by entering the text `@rustbot claim` in a comment. See the -[Assignment] docs on how this works. +Normally, if you plan to work on an issue that has been marked with the +[S-accepted] label, it is sufficient just to leave a comment that you are +working on it. We also have a bot that allows you to formally claim an issue +by entering the text `@rustbot claim` in a comment. See the [Assignment] docs +on how this works. [Assignment]: https://github.com/rust-lang/triagebot/wiki/Assignment diff --git a/src/doc/contrib/src/process/unstable.md b/src/doc/contrib/src/process/unstable.md index d59b9aa34292..9b05efc2e1e0 100644 --- a/src/doc/contrib/src/process/unstable.md +++ b/src/doc/contrib/src/process/unstable.md @@ -33,10 +33,30 @@ typically created when a PR is close to being merged, or soon after it is merged. Use the [tracking issue template] when creating a tracking issue. Larger features should also get a new label in the issue tracker so that when -issues are filed, they can be easily tied together. +issues are filed, they can be easily tied together. Typically this would be +one of the `Z-` prefixed labels for nightly features. + +When opening a tracking issue, be sure to also add an `S-` status label to +indicate what needs to happen for it to move forward: + +* [S-needs-mentor] --- The feature isn't yet implemented, and needs a Cargo + team member to commit to helping guide and review the implementation. +* [S-accepted] --- The feature isn't yet implemented, and has a Cargo team + member willing to help review the implementation. +* [S-waiting-on-feedback] --- After the feature has been implemented, this + label indicates that it is waiting on community feedback for bugs or design + concerns. + +Tracking issues may have multiple status labels if necessary, for example if +something is only partially implemented, it may have both +[S-waiting-on-feedback] (for what is implemented) and [S-needs-mentor] or +[S-accepted] to finish the rest of the work. [tracking issue]: https://github.com/rust-lang/cargo/labels/C-tracking-issue [tracking issue template]: https://github.com/rust-lang/cargo/issues/new?labels=C-tracking-issue&template=tracking_issue.md +[S-needs-mentor]: https://github.com/rust-lang/cargo/labels/S-needs-mentor +[S-accepted]: https://github.com/rust-lang/cargo/labels/S-accepted +[S-waiting-on-feedback]: https://github.com/rust-lang/cargo/labels/S-waiting-on-feedback ## Pre-Stabilization diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md index 80785891b5b7..18771c3d21e4 100644 --- a/src/doc/man/cargo-bench.md +++ b/src/doc/man/cargo-bench.md @@ -86,11 +86,17 @@ following targets of the selected packages: The default behavior can be changed by setting the `bench` flag for the target in the manifest settings. Setting examples to `bench = true` will build and -run the example as a benchmark. Setting targets to `bench = false` will stop -them from being benchmarked by default. Target selection options that take a -target by name ignore the `bench` flag and will always benchmark the given +run the example as a benchmark, replacing the example's `main` function with +the libtest harness. + +Setting targets to `bench = false` will stop them from being bencharmked by +default. Target selection options that take a target by name (such as +`--example foo`) ignore the `bench` flag and will always benchmark the given target. +See [Configuring a target](../reference/cargo-targets.html#configuring-a-target) +for more information on per-target settings. + {{> options-targets-bin-auto-built }} {{> options-targets }} diff --git a/src/doc/man/cargo-install.md b/src/doc/man/cargo-install.md index 31c3d6048306..385ed27c268b 100644 --- a/src/doc/man/cargo-install.md +++ b/src/doc/man/cargo-install.md @@ -173,7 +173,7 @@ Directory to install packages into. {{> options-target-dir }} {{#option "`--debug`" }} -Build with the `dev` profile instead the `release` profile. +Build with the `dev` profile instead of the `release` profile. See also the `--profile` option for choosing a specific profile by name. {{/option}} diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md index 3dce146e60df..49792d6bec22 100644 --- a/src/doc/man/cargo-test.md +++ b/src/doc/man/cargo-test.md @@ -89,13 +89,20 @@ following targets of the selected packages: The default behavior can be changed by setting the `test` flag for the target in the manifest settings. Setting examples to `test = true` will build and run -the example as a test. Setting targets to `test = false` will stop them from -being tested by default. Target selection options that take a target by name +the example as a test, replacing the example's `main` function with the +libtest harness. If you don't want the `main` function replaced, also include +`harness = false`, in which case the example will be built and executed as-is. + +Setting targets to `test = false` will stop them from being tested by default. +Target selection options that take a target by name (such as `--example foo`) ignore the `test` flag and will always test the given target. Doc tests for libraries may be disabled by setting `doctest = false` for the library in the manifest. +See [Configuring a target](../reference/cargo-targets.html#configuring-a-target) +for more information on per-target settings. + {{> options-targets-bin-auto-built }} {{> options-targets }} diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index 1ca72d577af2..9108d6165b30 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -120,10 +120,17 @@ OPTIONS The default behavior can be changed by setting the bench flag for the target in the manifest settings. Setting examples to bench = true will - build and run the example as a benchmark. Setting targets to bench = - false will stop them from being benchmarked by default. Target selection - options that take a target by name ignore the bench flag and will always - benchmark the given target. + build and run the example as a benchmark, replacing the example’s main + function with the libtest harness. + + Setting targets to bench = false will stop them from being bencharmked + by default. Target selection options that take a target by name (such as + --example foo) ignore the bench flag and will always benchmark the given + target. + + See Configuring a target + + for more information on per-target settings. Binary targets are automatically built if there is an integration test or benchmark being selected to benchmark. This allows an integration diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt index a29cdcd46ec7..7aefd34921e5 100644 --- a/src/doc/man/generated_txt/cargo-install.txt +++ b/src/doc/man/generated_txt/cargo-install.txt @@ -207,8 +207,8 @@ OPTIONS workspace of the local crate unless --target-dir is specified. --debug - Build with the dev profile instead the release profile. See also the - --profile option for choosing a specific profile by name. + Build with the dev profile instead of the release profile. See also + the --profile option for choosing a specific profile by name. --profile name Install with the given profile. See the the reference diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index 3f4ed6072358..9e26f8aaeb99 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -128,14 +128,23 @@ OPTIONS The default behavior can be changed by setting the test flag for the target in the manifest settings. Setting examples to test = true will - build and run the example as a test. Setting targets to test = false - will stop them from being tested by default. Target selection options - that take a target by name ignore the test flag and will always test the - given target. + build and run the example as a test, replacing the example’s main + function with the libtest harness. If you don’t want the main function + replaced, also include harness = false, in which case the example will + be built and executed as-is. + + Setting targets to test = false will stop them from being tested by + default. Target selection options that take a target by name (such as + --example foo) ignore the test flag and will always test the given + target. Doc tests for libraries may be disabled by setting doctest = false for the library in the manifest. + See Configuring a target + + for more information on per-target settings. + Binary targets are automatically built if there is an integration test or benchmark being selected to test. This allows an integration test to execute the binary to exercise and test its behavior. The diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index e7e9b36fb8ff..df0101be5cf3 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -143,11 +143,17 @@ following targets of the selected packages: The default behavior can be changed by setting the `bench` flag for the target in the manifest settings. Setting examples to `bench = true` will build and -run the example as a benchmark. Setting targets to `bench = false` will stop -them from being benchmarked by default. Target selection options that take a -target by name ignore the `bench` flag and will always benchmark the given +run the example as a benchmark, replacing the example's `main` function with +the libtest harness. + +Setting targets to `bench = false` will stop them from being bencharmked by +default. Target selection options that take a target by name (such as +`--example foo`) ignore the `bench` flag and will always benchmark the given target. +See [Configuring a target](../reference/cargo-targets.html#configuring-a-target) +for more information on per-target settings. + Binary targets are automatically built if there is an integration test or benchmark being selected to benchmark. This allows an integration test to execute the binary to exercise and test its behavior. diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md index 99697c156c37..5d413010c45b 100644 --- a/src/doc/src/commands/cargo-install.md +++ b/src/doc/src/commands/cargo-install.md @@ -238,7 +238,7 @@ is specified.

    --debug
    -
    Build with the dev profile instead the release profile. +
    Build with the dev profile instead of the release profile. See also the --profile option for choosing a specific profile by name.
    diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index 2967d7381e92..24fcc70ffa75 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -146,13 +146,20 @@ following targets of the selected packages: The default behavior can be changed by setting the `test` flag for the target in the manifest settings. Setting examples to `test = true` will build and run -the example as a test. Setting targets to `test = false` will stop them from -being tested by default. Target selection options that take a target by name +the example as a test, replacing the example's `main` function with the +libtest harness. If you don't want the `main` function replaced, also include +`harness = false`, in which case the example will be built and executed as-is. + +Setting targets to `test = false` will stop them from being tested by default. +Target selection options that take a target by name (such as `--example foo`) ignore the `test` flag and will always test the given target. Doc tests for libraries may be disabled by setting `doctest = false` for the library in the manifest. +See [Configuring a target](../reference/cargo-targets.html#configuring-a-target) +for more information on per-target settings. + Binary targets are automatically built if there is an integration test or benchmark being selected to test. This allows an integration test to execute the binary to exercise and test its behavior. diff --git a/src/doc/src/reference/profiles.md b/src/doc/src/reference/profiles.md index 56c8538f80b1..124203d55f92 100644 --- a/src/doc/src/reference/profiles.md +++ b/src/doc/src/reference/profiles.md @@ -67,14 +67,20 @@ amount of debug information included in the compiled binary. The valid options are: -* `0` or `false`: no debug info at all -* `1`: line tables only -* `2` or `true`: full debug info +* `0`, `false`, or `"none"`: no debug info at all, default for [`release`](#release) +* `"line-directives-only"`: line info directives only. For the nvptx* targets this enables [profiling]. For other use cases, `line-tables-only` is the better, more compatible choice. +* `"line-tables-only"`: line tables only. Generates the minimal amount of debug info for backtraces with filename/line number info, but not anything else, i.e. no variable or function parameter info. +* `1` or `"limited"`: debug info without type or variable-level information. Generates more detailed module-level info than `line-tables-only`. +* `2`, `true`, or `"full"`: full debug info, default for [`dev`](#dev) + +For more information on what each option does see `rustc`'s docs on [debuginfo]. You may wish to also configure the [`split-debuginfo`](#split-debuginfo) option depending on your needs as well. [`-C debuginfo` flag]: ../../rustc/codegen-options/index.html#debuginfo +[debuginfo]: ../../rustc/codegen-options/index.html#debuginfo +[profiling]: https://reviews.llvm.org/D46061 #### split-debuginfo diff --git a/src/doc/src/reference/publishing.md b/src/doc/src/reference/publishing.md index 98d572c346f5..564dfb34e5b0 100644 --- a/src/doc/src/reference/publishing.md +++ b/src/doc/src/reference/publishing.md @@ -12,10 +12,10 @@ limit to the number of versions which can be published, however. First things first, you’ll need an account on [crates.io] to acquire an API token. To do so, [visit the home page][crates.io] and log in via a GitHub -account (required for now). You will also need to verify your email address on the -[Account Settings](https://crates.io/me) page. Once that is done create an API token, -make sure you copy it. Once you leave the page you will not be able to see it -again. +account (required for now). You will also need to provide and verify your email +address on the [Account Settings](https://crates.io/settings/profile) page. Once +that is done [create an API token](https://crates.io/settings/tokens), make sure +you copy it. Once you leave the page you will not be able to see it again. Then run the [`cargo login`] command. diff --git a/src/doc/src/reference/registry-index.md b/src/doc/src/reference/registry-index.md index 38e3dd5fe6ad..9e5be3e5bf65 100644 --- a/src/doc/src/reference/registry-index.md +++ b/src/doc/src/reference/registry-index.md @@ -199,6 +199,9 @@ explaining the format of the entry. "features2": { "serde": ["dep:serde", "chrono?/serde"] } + // The minimal supported Rust version (optional) + // This must be a valid version requirement without an operator (e.g. no `=`) + "rust_version": "1.60" } ``` @@ -221,6 +224,8 @@ The JSON objects should not be modified after they are added except for the > * The publish API includes several other fields, such as `description` and `readme`, which don't appear in the index. > These are intended to make it easier for a registry to obtain the metadata about the crate to display on a website without needing to extract and parse the `.crate` file. > This additional information is typically added to a database on the registry server. +> * Although `rust_version` is included here, [crates.io] will ignore this field +> and instead read it from the `Cargo.toml` contained in the `.crate` file. > > For [`cargo metadata`], the differences are: > diff --git a/src/doc/src/reference/registry-web-api.md b/src/doc/src/reference/registry-web-api.md index 147ababd54ec..8260028c0208 100644 --- a/src/doc/src/reference/registry-web-api.md +++ b/src/doc/src/reference/registry-web-api.md @@ -161,7 +161,10 @@ considered as an exhaustive list of restrictions [crates.io] imposes. }, // The `links` string value from the package's manifest, or null if not // specified. This field is optional and defaults to null. - "links": null + "links": null, + // The minimal supported Rust version (optional) + // This must be a valid version requirement without an operator (e.g. no `=`) + "rust_version": null } ``` @@ -305,6 +308,8 @@ A successful response includes the JSON object: { // Indicates the remove succeeded, always true. "ok": true + // A string to be displayed to the user. Currently ignored by cargo. + "msg": "owners successfully removed", } ``` diff --git a/src/doc/src/reference/semver.md b/src/doc/src/reference/semver.md index c8d7167fc451..fccbd02f97ef 100644 --- a/src/doc/src/reference/semver.md +++ b/src/doc/src/reference/semver.md @@ -90,6 +90,7 @@ considered incompatible. * [Major: generalizing a function to use generics with type mismatch](#fn-generalize-mismatch) * Attributes * [Major: switching from `no_std` support to requiring `std`](#attr-no-std-to-std) + * [Major: adding `non_exhaustive` to an existing enum, variant, or struct with no private fields](#attr-adding-non-exhaustive) * Tooling and environment compatibility * [Possibly-breaking: changing the minimum version of Rust required](#env-new-rust) * [Possibly-breaking: changing the platform and environment requirements](#env-change-requirements) @@ -870,7 +871,7 @@ fn main() { It is safe to change a generic type to a more generic one. For example, the following adds a generic parameter that defaults to the original type, which is safe because all existing users will be using the same type for both -fields, the the defaulted parameter does not need to be specified. +fields, the defaulted parameter does not need to be specified. ```rust,ignore // MINOR CHANGE @@ -944,7 +945,7 @@ pub fn foo() {} use updated_crate::foo; fn main() { - foo::(); // Error: this function takes 2 generic arguments but 1 generic argument was supplied + foo::(); // Error: function takes 2 generic arguments but 1 generic argument was supplied } ``` @@ -1115,6 +1116,89 @@ Mitigation strategies: optionally enables `std` support, and when the feature is off, the library can be used in a `no_std` environment. + +### Major: adding `non_exhaustive` to an existing enum, variant, or struct with no private fields + +Making items [`#[non_exhaustive]`][non_exhaustive] changes how they may +be used outside the crate where they are defined: + +- Non-exhaustive structs and enum variants cannot be constructed + using [struct literal] syntax, including [functional update syntax]. +- Pattern matching on non-exhaustive structs requires `..` and + matching on enums does not count towards exhaustiveness. +- Casting enum variants to their discriminant with `as` is not allowed. + +Structs with private fields cannot be constructed using [struct literal] syntax +regardless of whether [`#[non_exhaustive]`][non_exhaustive] is used. +Adding [`#[non_exhaustive]`][non_exhaustive] to such a struct is not +a breaking change. + +```rust,ignore +// MAJOR CHANGE + +/////////////////////////////////////////////////////////// +// Before +pub struct Foo { + pub bar: usize, +} + +pub enum Bar { + X, + Y(usize), + Z { a: usize }, +} + +pub enum Quux { + Var, +} + +/////////////////////////////////////////////////////////// +// After +#[non_exhaustive] +pub struct Foo { + pub bar: usize, +} + +pub enum Bar { + #[non_exhaustive] + X, + + #[non_exhaustive] + Y(usize), + + #[non_exhaustive] + Z { a: usize }, +} + +#[non_exhaustive] +pub enum Quux { + Var, +} + +/////////////////////////////////////////////////////////// +// Example usage that will break. +use updated_crate::{Bar, Foo, Quux}; + +fn main() { + let foo = Foo { bar: 0 }; // Error: cannot create non-exhaustive struct using struct expression + + let bar_x = Bar::X; // Error: unit variant `X` is private + let bar_y = Bar::Y(0); // Error: tuple variant `Y` is private + let bar_z = Bar::Z { a: 0 }; // Error: cannot create non-exhaustive variant using struct expression + + let q = Quux::Var; + match q { + Quux::Var => 0, + // Error: non-exhaustive patterns: `_` not covered + }; +} +``` + +Mitigation strategies: +* Mark structs, enums, and enum variants as + [`#[non_exhaustive]`][non_exhaustive] when first introducing them, + rather than adding [`#[non_exhaustive]`][non_exhaustive] later on. + ## Tooling and environment compatibility @@ -1393,6 +1477,7 @@ document what your commitments are. [Default]: ../../std/default/trait.Default.html [deprecated]: ../../reference/attributes/diagnostics.html#the-deprecated-attribute [disambiguation syntax]: ../../reference/expressions/call-expr.html#disambiguating-function-calls +[functional update syntax]: ../../reference/expressions/struct-expr.html#functional-update-syntax [inherent implementations]: ../../reference/items/implementations.html#inherent-implementations [items]: ../../reference/items.html [non_exhaustive]: ../../reference/attributes/type_system.html#the-non_exhaustive-attribute diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index accd45d8ee87..1ec0e18fa2f2 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -69,6 +69,7 @@ Each new feature described below should explain how to use it. * [minimal-versions](#minimal-versions) --- Forces the resolver to use the lowest compatible version instead of the highest. * [direct-minimal-versions](#direct-minimal-versions) β€” Forces the resolver to use the lowest compatible version instead of the highest. * [public-dependency](#public-dependency) --- Allows dependencies to be classified as either public or private. + * [msrv-policy](#msrv-policy) --- MSRV-aware resolver and version selection * Output behavior * [out-dir](#out-dir) --- Adds a directory where artifacts are copied to. * [Different binary name](#different-binary-name) --- Assign a name to the built binary that is separate from the crate name. @@ -300,6 +301,14 @@ my_dep = { version = "1.2.3", public = true } private_dep = "2.0.0" # Will be 'private' by default ``` +### msrv-policy +- [#9930](https://github.com/rust-lang/cargo/issues/9930) (MSRV-aware resolver) +- [#10653](https://github.com/rust-lang/cargo/issues/10653) (MSRV-aware cargo-add) +- [#10903](https://github.com/rust-lang/cargo/issues/10903) (MSRV-aware cargo-install) + +The `msrv-policy` feature enables experiments in MSRV-aware policy for cargo in +preparation for an upcoming RFC. + ### build-std * Tracking Repository: @@ -1251,7 +1260,7 @@ codegen-backend = "cranelift" * Tracking Issue: [#11813](https://github.com/rust-lang/cargo/issues/11813) -With the 'gitoxide' unstable feature, all or the the specified git operations will be performed by +With the 'gitoxide' unstable feature, all or the specified git operations will be performed by the `gitoxide` crate instead of `git2`. While `-Zgitoxide` enables all currently implemented features, one can individually select git operations diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1 index b95902c4ecfb..44ff593fdd80 100644 --- a/src/etc/man/cargo-bench.1 +++ b/src/etc/man/cargo-bench.1 @@ -145,11 +145,17 @@ available) .sp The default behavior can be changed by setting the \fBbench\fR flag for the target in the manifest settings. Setting examples to \fBbench = true\fR will build and -run the example as a benchmark. Setting targets to \fBbench = false\fR will stop -them from being benchmarked by default. Target selection options that take a -target by name ignore the \fBbench\fR flag and will always benchmark the given +run the example as a benchmark, replacing the example\[cq]s \fBmain\fR function with +the libtest harness. +.sp +Setting targets to \fBbench = false\fR will stop them from being bencharmked by +default. Target selection options that take a target by name (such as +\fB\-\-example foo\fR) ignore the \fBbench\fR flag and will always benchmark the given target. .sp +See \fIConfiguring a target\fR +for more information on per\-target settings. +.sp Binary targets are automatically built if there is an integration test or benchmark being selected to benchmark. This allows an integration test to execute the binary to exercise and test its behavior. diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1 index d0e5c5181674..a9eb6266b898 100644 --- a/src/etc/man/cargo-install.1 +++ b/src/etc/man/cargo-install.1 @@ -263,7 +263,7 @@ is specified. .sp \fB\-\-debug\fR .RS 4 -Build with the \fBdev\fR profile instead the \fBrelease\fR profile. +Build with the \fBdev\fR profile instead of the \fBrelease\fR profile. See also the \fB\-\-profile\fR option for choosing a specific profile by name. .RE .sp diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index 85260b067b09..1ee2f76727fd 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -149,13 +149,20 @@ available) .sp The default behavior can be changed by setting the \fBtest\fR flag for the target in the manifest settings. Setting examples to \fBtest = true\fR will build and run -the example as a test. Setting targets to \fBtest = false\fR will stop them from -being tested by default. Target selection options that take a target by name +the example as a test, replacing the example\[cq]s \fBmain\fR function with the +libtest harness. If you don\[cq]t want the \fBmain\fR function replaced, also include +\fBharness = false\fR, in which case the example will be built and executed as\-is. +.sp +Setting targets to \fBtest = false\fR will stop them from being tested by default. +Target selection options that take a target by name (such as \fB\-\-example foo\fR) ignore the \fBtest\fR flag and will always test the given target. .sp Doc tests for libraries may be disabled by setting \fBdoctest = false\fR for the library in the manifest. .sp +See \fIConfiguring a target\fR +for more information on per\-target settings. +.sp Binary targets are automatically built if there is an integration test or benchmark being selected to test. This allows an integration test to execute the binary to exercise and test its behavior. diff --git a/tests/testsuite/alt_registry.rs b/tests/testsuite/alt_registry.rs index 97da909b83cc..e9dd0071e069 100644 --- a/tests/testsuite/alt_registry.rs +++ b/tests/testsuite/alt_registry.rs @@ -366,6 +366,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "repository": null, "homepage": null, "documentation": null, + "rust_version": null, "vers": "0.0.1" }"#, "foo-0.0.1.crate", @@ -515,6 +516,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "repository": null, "homepage": null, "documentation": null, + "rust_version": null, "vers": "0.0.1" }"#, "foo-0.0.1.crate", @@ -607,6 +609,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "repository": null, "homepage": null, "documentation": null, + "rust_version": null, "vers": "0.0.1" }"#, "foo-0.0.1.crate", diff --git a/tests/testsuite/artifact_dep.rs b/tests/testsuite/artifact_dep.rs index ec6bb7103a2a..08e413bf5119 100644 --- a/tests/testsuite/artifact_dep.rs +++ b/tests/testsuite/artifact_dep.rs @@ -1956,6 +1956,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": "foo", + "rust_version": null, "vers": "0.1.0" } "#, diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index ca51b101e39d..4434ea90da17 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -780,8 +780,8 @@ fn empty_dependencies() { p.cargo("check") .with_stderr_contains( "\ -warning: dependency (bar) specified without providing a local path, Git repository, or version \ -to use. This will be considered an error in future versions +warning: dependency (bar) specified without providing a local path, Git repository, version, \ +or workspace dependency to use. This will be considered an error in future versions ", ) .run(); @@ -1313,6 +1313,38 @@ fn bad_debuginfo() { .file("src/lib.rs", "") .build(); + p.cargo("check") + .with_status(101) + .with_stderr( + "\ +error: failed to parse manifest [..] + +Caused by: + invalid value: string \"a\", expected a boolean, 0, 1, 2, \"line-tables-only\", or \"line-directives-only\" + in `profile.dev.debug` +", + ) + .run(); +} + +#[cargo_test] +fn bad_debuginfo2() { + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.0.0" + authors = [] + + [profile.dev] + debug = 3.6 + "#, + ) + .file("src/lib.rs", "") + .build(); + p.cargo("check") .with_status(101) .with_stderr( @@ -1320,7 +1352,7 @@ fn bad_debuginfo() { error: failed to parse manifest at `[..]` Caused by: - expected a boolean or an integer + invalid type: floating point `3.6`, expected a boolean, 0, 1, 2, \"line-tables-only\", or \"line-directives-only\" in `profile.dev.debug` ", ) diff --git a/tests/testsuite/cargo_add/empty_dep_table/in/Cargo.toml b/tests/testsuite/cargo_add/empty_dep_table/in/Cargo.toml new file mode 100644 index 000000000000..cac16bb94721 --- /dev/null +++ b/tests/testsuite/cargo_add/empty_dep_table/in/Cargo.toml @@ -0,0 +1,8 @@ +[workspace] + +[package] +name = "cargo-list-test-fixture" +version = "0.0.0" + +[dependencies] +your-face = { } diff --git a/tests/testsuite/cargo_add/empty_dep_table/in/src/lib.rs b/tests/testsuite/cargo_add/empty_dep_table/in/src/lib.rs new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/tests/testsuite/cargo_add/empty_dep_table/in/src/lib.rs @@ -0,0 +1 @@ + diff --git a/tests/testsuite/cargo_add/empty_dep_table/mod.rs b/tests/testsuite/cargo_add/empty_dep_table/mod.rs new file mode 100644 index 000000000000..f6c507188ade --- /dev/null +++ b/tests/testsuite/cargo_add/empty_dep_table/mod.rs @@ -0,0 +1,25 @@ +use cargo_test_support::compare::assert_ui; +use cargo_test_support::prelude::*; +use cargo_test_support::Project; + +use crate::cargo_add::init_registry; +use cargo_test_support::curr_dir; + +#[cargo_test] +fn case() { + init_registry(); + let project = Project::from_template(curr_dir!().join("in")); + let project_root = project.root(); + let cwd = &project_root; + + snapbox::cmd::Command::cargo_ui() + .arg("add") + .arg_line("your-face --features eyes") + .current_dir(cwd) + .assert() + .code(101) + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); + + assert_ui().subset_matches(curr_dir!().join("out"), &project_root); +} diff --git a/tests/testsuite/cargo_add/empty_dep_table/out/Cargo.toml b/tests/testsuite/cargo_add/empty_dep_table/out/Cargo.toml new file mode 100644 index 000000000000..cac16bb94721 --- /dev/null +++ b/tests/testsuite/cargo_add/empty_dep_table/out/Cargo.toml @@ -0,0 +1,8 @@ +[workspace] + +[package] +name = "cargo-list-test-fixture" +version = "0.0.0" + +[dependencies] +your-face = { } diff --git a/tests/testsuite/cargo_add/empty_dep_table/stderr.log b/tests/testsuite/cargo_add/empty_dep_table/stderr.log new file mode 100644 index 000000000000..3acd7b944ec1 --- /dev/null +++ b/tests/testsuite/cargo_add/empty_dep_table/stderr.log @@ -0,0 +1 @@ +error: unrecognized dependency source for `your-face`, expected a local path, Git repository, version, or workspace dependency to be specified diff --git a/tests/testsuite/cargo_add/empty_dep_table/stdout.log b/tests/testsuite/cargo_add/empty_dep_table/stdout.log new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/testsuite/cargo_add/mod.rs b/tests/testsuite/cargo_add/mod.rs index ca58474d2196..26a11dd8a493 100644 --- a/tests/testsuite/cargo_add/mod.rs +++ b/tests/testsuite/cargo_add/mod.rs @@ -15,6 +15,7 @@ mod dev; mod dev_build_conflict; mod dev_prefer_existing_version; mod dry_run; +mod empty_dep_table; mod features; mod features_empty; mod features_multiple_occurrences; diff --git a/tests/testsuite/cargo_env_config.rs b/tests/testsuite/cargo_env_config.rs index d80c38d0e4bd..0b787bebd3c5 100644 --- a/tests/testsuite/cargo_env_config.rs +++ b/tests/testsuite/cargo_env_config.rs @@ -1,5 +1,6 @@ //! Tests for `[env]` config. +use cargo_test_support::basic_manifest; use cargo_test_support::{basic_bin_manifest, project}; #[cargo_test] @@ -179,3 +180,60 @@ fn env_no_override() { .with_stdout_contains("CARGO_PKG_NAME:unchanged") .run(); } + +#[cargo_test] +fn env_applied_to_target_info_discovery_rustc() { + let wrapper = project() + .at("wrapper") + .file("Cargo.toml", &basic_manifest("wrapper", "1.0.0")) + .file( + "src/main.rs", + r#" + fn main() { + let mut args = std::env::args().skip(1); + let env_test = std::env::var("ENV_TEST").unwrap(); + eprintln!("WRAPPER ENV_TEST:{env_test}"); + let status = std::process::Command::new(&args.next().unwrap()) + .args(args).status().unwrap(); + std::process::exit(status.code().unwrap_or(1)); + } + "#, + ) + .build(); + wrapper.cargo("build").run(); + let wrapper = &wrapper.bin("wrapper"); + + let p = project() + .file("Cargo.toml", &basic_bin_manifest("foo")) + .file( + "src/main.rs", + r#" + fn main() { + eprintln!( "MAIN ENV_TEST:{}", std::env!("ENV_TEST") ); + } + "#, + ) + .file( + ".cargo/config", + r#" + [env] + ENV_TEST = "from-config" + "#, + ) + .build(); + + p.cargo("run") + .env("RUSTC_WORKSPACE_WRAPPER", wrapper) + .with_stderr_contains("WRAPPER ENV_TEST:from-config") + .with_stderr_contains("MAIN ENV_TEST:from-config") + .run(); + + // Ensure wrapper also maintains the same overridden priority for envs. + p.cargo("clean").run(); + p.cargo("run") + .env("ENV_TEST", "from-env") + .env("RUSTC_WORKSPACE_WRAPPER", wrapper) + .with_stderr_contains("WRAPPER ENV_TEST:from-env") + .with_stderr_contains("MAIN ENV_TEST:from-env") + .run(); +} diff --git a/tests/testsuite/config.rs b/tests/testsuite/config.rs index 92e1f42643c7..b0f9d167b856 100644 --- a/tests/testsuite/config.rs +++ b/tests/testsuite/config.rs @@ -3,7 +3,7 @@ use cargo::core::{PackageIdSpec, Shell}; use cargo::util::config::{self, Config, Definition, SslVersionConfig, StringList}; use cargo::util::interning::InternedString; -use cargo::util::toml::{self as cargo_toml, VecStringOrBool as VSOB}; +use cargo::util::toml::{self as cargo_toml, TomlDebugInfo, VecStringOrBool as VSOB}; use cargo::CargoResult; use cargo_test_support::compare; use cargo_test_support::{panic_error, paths, project, symlink_supported, t}; @@ -401,7 +401,7 @@ lto = false opt_level: Some(cargo_toml::TomlOptLevel("s".to_string())), lto: Some(cargo_toml::StringOrBool::Bool(true)), codegen_units: Some(5), - debug: Some(cargo_toml::U32OrBool::Bool(true)), + debug: Some(cargo_toml::TomlDebugInfo::Full), debug_assertions: Some(true), rpath: Some(true), panic: Some("abort".to_string()), @@ -444,7 +444,7 @@ fn profile_env_var_prefix() { .build(); let p: cargo_toml::TomlProfile = config.get("profile.dev").unwrap(); assert_eq!(p.debug_assertions, None); - assert_eq!(p.debug, Some(cargo_toml::U32OrBool::U32(1))); + assert_eq!(p.debug, Some(cargo_toml::TomlDebugInfo::Limited)); let config = ConfigBuilder::new() .env("CARGO_PROFILE_DEV_DEBUG_ASSERTIONS", "false") @@ -452,7 +452,7 @@ fn profile_env_var_prefix() { .build(); let p: cargo_toml::TomlProfile = config.get("profile.dev").unwrap(); assert_eq!(p.debug_assertions, Some(false)); - assert_eq!(p.debug, Some(cargo_toml::U32OrBool::U32(1))); + assert_eq!(p.debug, Some(cargo_toml::TomlDebugInfo::Limited)); } #[cargo_test] @@ -1511,7 +1511,7 @@ fn all_profile_options() { lto: Some(cargo_toml::StringOrBool::String("thin".to_string())), codegen_backend: Some(InternedString::new("example")), codegen_units: Some(123), - debug: Some(cargo_toml::U32OrBool::U32(1)), + debug: Some(cargo_toml::TomlDebugInfo::Limited), split_debuginfo: Some("packed".to_string()), debug_assertions: Some(true), rpath: Some(true), @@ -1594,3 +1594,60 @@ known-hosts = [ Definition::Environment("CARGO_NET_SSH_KNOWN_HOSTS".to_string()) ); } + +#[cargo_test] +fn debuginfo_parsing() { + let config = ConfigBuilder::new().build(); + let p: cargo_toml::TomlProfile = config.get("profile.dev").unwrap(); + assert_eq!(p.debug, None); + + let env_test_cases = [ + (TomlDebugInfo::None, ["false", "0", "none"].as_slice()), + (TomlDebugInfo::LineDirectivesOnly, &["line-directives-only"]), + (TomlDebugInfo::LineTablesOnly, &["line-tables-only"]), + (TomlDebugInfo::Limited, &["1", "limited"]), + (TomlDebugInfo::Full, &["true", "2", "full"]), + ]; + for (expected, config_strs) in env_test_cases { + for &val in config_strs { + let config = ConfigBuilder::new() + .env("CARGO_PROFILE_DEV_DEBUG", val) + .build(); + let debug: TomlDebugInfo = config.get("profile.dev.debug").unwrap(); + assert_eq!(debug, expected, "failed to parse {val}"); + } + } + + let toml_test_cases = [ + (TomlDebugInfo::None, ["false", "0", "\"none\""].as_slice()), + ( + TomlDebugInfo::LineDirectivesOnly, + &["\"line-directives-only\""], + ), + (TomlDebugInfo::LineTablesOnly, &["\"line-tables-only\""]), + (TomlDebugInfo::Limited, &["1", "\"limited\""]), + (TomlDebugInfo::Full, &["true", "2", "\"full\""]), + ]; + for (expected, config_strs) in toml_test_cases { + for &val in config_strs { + let config = ConfigBuilder::new() + .config_arg(format!("profile.dev.debug={val}")) + .build(); + let debug: TomlDebugInfo = config.get("profile.dev.debug").unwrap(); + assert_eq!(debug, expected, "failed to parse {val}"); + } + } + + let toml_err_cases = ["\"\"", "\"unrecognized\"", "3"]; + for err_val in toml_err_cases { + let config = ConfigBuilder::new() + .config_arg(format!("profile.dev.debug={err_val}")) + .build(); + let err = config + .get::("profile.dev.debug") + .unwrap_err(); + assert!(err + .to_string() + .ends_with("could not load config key `profile.dev.debug`")); + } +} diff --git a/tests/testsuite/features_namespaced.rs b/tests/testsuite/features_namespaced.rs index 8ec2fc2e35df..d090235d5aba 100644 --- a/tests/testsuite/features_namespaced.rs +++ b/tests/testsuite/features_namespaced.rs @@ -942,6 +942,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.1.0" } "#, @@ -1057,6 +1058,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.1.0" } "#, diff --git a/tests/testsuite/inheritable_workspace_fields.rs b/tests/testsuite/inheritable_workspace_fields.rs index 92c96b985a50..cc261a47f476 100644 --- a/tests/testsuite/inheritable_workspace_fields.rs +++ b/tests/testsuite/inheritable_workspace_fields.rs @@ -201,6 +201,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": null, "readme_file": null, "repository": "https://github.com/example/example", + "rust_version": "1.60", "vers": "1.2.3" } "#, @@ -376,6 +377,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.2.0" } "#, @@ -503,6 +505,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.2.0" } "#, @@ -734,6 +737,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": "README.md", "readme_file": "../README.md", "repository": "https://github.com/example/example", + "rust_version": "1.60", "vers": "1.2.3" } "#, @@ -917,6 +921,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.2.0" } "#, @@ -1269,7 +1274,9 @@ fn error_workspace_dependency_looked_for_workspace_itself() { .with_stderr( "\ [WARNING] [CWD]/Cargo.toml: unused manifest key: workspace.dependencies.dep.workspace -[WARNING] [CWD]/Cargo.toml: dependency (dep) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions +[WARNING] [CWD]/Cargo.toml: dependency (dep) specified without providing a local path, Git repository, version, \ +or workspace dependency to use. \ +This will be considered an error in future versions [UPDATING] `dummy-registry` index [ERROR] no matching package named `dep` found location searched: registry `crates-io` @@ -1589,7 +1596,9 @@ fn cannot_inherit_in_patch() { .with_stderr( "\ [WARNING] [CWD]/Cargo.toml: unused manifest key: patch.crates-io.bar.workspace -[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions +[WARNING] [CWD]/Cargo.toml: dependency (bar) specified without providing a local path, Git repository, version, \ +or workspace dependency to use. \ +This will be considered an error in future versions [UPDATING] `dummy-registry` index [ERROR] failed to resolve patches for `https://github.com/rust-lang/crates.io-index` diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index dd9844f170b1..9b881dfdc68b 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -1415,6 +1415,46 @@ fn path_install_workspace_root_despite_default_members() { .run(); } +#[cargo_test] +fn git_install_workspace_root_despite_default_members() { + let p = git::repo(&paths::root().join("foo")) + .file( + "Cargo.toml", + r#" + [package] + name = "ws-root" + version = "0.1.0" + authors = [] + + [workspace] + members = ["ws-member"] + default-members = ["ws-member"] + "#, + ) + .file("src/main.rs", "fn main() {}") + .file( + "ws-member/Cargo.toml", + r#" + [package] + name = "ws-member" + version = "0.1.0" + authors = [] + "#, + ) + .file("ws-member/src/main.rs", "fn main() {}") + .build(); + + cargo_process("install --git") + .arg(p.url().to_string()) + .arg("ws-root") + .with_stderr_contains( + "[INSTALLED] package `ws-root v0.1.0 ([..])` (executable `ws-root[EXE]`)", + ) + // Particularly avoid "Installed package `ws-root v0.1.0 ([..]])` (executable `ws-member`)": + .with_stderr_does_not_contain("ws-member") + .run(); +} + #[cargo_test] fn dev_dependencies_no_check() { Package::new("foo", "1.0.0").publish(); @@ -2287,3 +2327,84 @@ fn sparse_install() { "#, ); } + +#[cargo_test] +fn self_referential() { + // Some packages build-dep on prior versions of themselves. + Package::new("foo", "0.0.1") + .file("src/lib.rs", "fn hello() {}") + .file("src/main.rs", "fn main() {}") + .file("build.rs", "fn main() {}") + .publish(); + Package::new("foo", "0.0.2") + .file("src/lib.rs", "fn hello() {}") + .file("src/main.rs", "fn main() {}") + .file("build.rs", "fn main() {}") + .build_dep("foo", "0.0.1") + .publish(); + + cargo_process("install foo") + .with_stderr( + "\ +[UPDATING] `[..]` index +[DOWNLOADING] crates ... +[DOWNLOADED] foo v0.0.2 (registry [..]) +[INSTALLING] foo v0.0.2 +[DOWNLOADING] crates ... +[DOWNLOADED] foo v0.0.1 (registry [..]) +[COMPILING] foo v0.0.1 +[COMPILING] foo v0.0.2 +[FINISHED] release [optimized] target(s) in [..] +[INSTALLING] [CWD]/home/.cargo/bin/foo[EXE] +[INSTALLED] package `foo v0.0.2` (executable `foo[EXE]`) +[WARNING] be sure to add `[..]` to your PATH to be able to run the installed binaries +", + ) + .run(); + assert_has_installed_exe(cargo_home(), "foo"); +} + +#[cargo_test] +fn ambiguous_registry_vs_local_package() { + // Correctly install 'foo' from a local package, even if that package also + // depends on a registry dependency named 'foo'. + Package::new("foo", "0.0.1") + .file("src/lib.rs", "fn hello() {}") + .publish(); + + let p = project() + .file("src/main.rs", "fn main() {}") + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.1.0" + authors = [] + edition = "2021" + + [dependencies] + foo = "0.0.1" + "#, + ) + .build(); + + cargo_process("install --path") + .arg(p.root()) + .with_stderr( + "\ +[INSTALLING] foo v0.1.0 ([..]) +[UPDATING] `[..]` index +[DOWNLOADING] crates ... +[DOWNLOADED] foo v0.0.1 (registry [..]) +[COMPILING] foo v0.0.1 +[COMPILING] foo v0.1.0 ([..]) +[FINISHED] release [optimized] target(s) in [..] +[INSTALLING] [CWD]/home/.cargo/bin/foo[EXE] +[INSTALLED] package `foo v0.1.0 ([..])` (executable `foo[EXE]`) +[WARNING] be sure to add `[..]` to your PATH to be able to run the installed binaries +", + ) + .run(); + assert_has_installed_exe(cargo_home(), "foo"); +} diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index 14bac6618bdd..0505f8363004 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -1774,6 +1774,142 @@ fn exclude_dot_files_and_directories_by_default() { ); } +#[cargo_test] +fn empty_readme_path() { + // Warn but don't fail if `readme` is empty. + // Issue #11522. + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "1.0.0" + readme = "" + license = "MIT" + description = "foo" + homepage = "foo" + "#, + ) + .file("src/lib.rs", "") + .build(); + + p.cargo("package --no-verify") + .with_stderr( + "\ +[WARNING] readme `` does not appear to exist (relative to `[..]/foo`). +Please update the readme setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. +[PACKAGING] foo v1.0.0 ([..]/foo) +[PACKAGED] [..] files, [..] ([..] compressed) +", + ) + .run(); +} + +#[cargo_test] +fn invalid_readme_path() { + // Warn but don't fail if `readme` path is invalid. + // Issue #11522. + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "1.0.0" + readme = "DOES-NOT-EXIST" + license = "MIT" + description = "foo" + homepage = "foo" + "#, + ) + .file("src/lib.rs", "") + .build(); + + p.cargo("package --no-verify") + .with_stderr( + "\ +[WARNING] readme `DOES-NOT-EXIST` does not appear to exist (relative to `[..]/foo`). +Please update the readme setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. +[PACKAGING] foo v1.0.0 ([..]/foo) +[PACKAGED] [..] files, [..] ([..] compressed) +", + ) + .run(); +} + +#[cargo_test] +fn readme_or_license_file_is_dir() { + // Test warning when `readme` or `license-file` is a directory, not a file. + // Issue #11522. + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "1.0.0" + readme = "./src" + license-file = "./src" + description = "foo" + homepage = "foo" + "#, + ) + .file("src/lib.rs", "") + .build(); + + p.cargo("package --no-verify") + .with_stderr( + "\ +[WARNING] license-file `./src` does not appear to exist (relative to `[..]/foo`). +Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. +[WARNING] readme `./src` does not appear to exist (relative to `[..]/foo`). +Please update the readme setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. +[PACKAGING] foo v1.0.0 ([..]/foo) +[PACKAGED] [..] files, [..] ([..] compressed) +", + ) + .run(); +} + +#[cargo_test] +fn empty_license_file_path() { + // Warn but don't fail if license-file is empty. + // Issue #11522. + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "1.0.0" + license-file = "" + description = "foo" + homepage = "foo" + "#, + ) + .file("src/lib.rs", "") + .build(); + + p.cargo("package --no-verify") + .with_stderr( + "\ +[WARNING] manifest has no license or license-file. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. +[WARNING] license-file `` does not appear to exist (relative to `[..]/foo`). +Please update the license-file setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. +[PACKAGING] foo v1.0.0 ([..]/foo) +[PACKAGED] [..] files, [..] ([..] compressed) +", + ) + .run(); +} + #[cargo_test] fn invalid_license_file_path() { // Test warning when license-file points to a non-existent file. diff --git a/tests/testsuite/profile_config.rs b/tests/testsuite/profile_config.rs index c59ed7a97f59..cf9807964e26 100644 --- a/tests/testsuite/profile_config.rs +++ b/tests/testsuite/profile_config.rs @@ -1,5 +1,6 @@ //! Tests for profiles defined in config files. +use cargo::util::toml::TomlDebugInfo; use cargo_test_support::paths::CargoPathExt; use cargo_test_support::registry::Package; use cargo_test_support::{basic_lib_manifest, paths, project}; @@ -436,7 +437,7 @@ fn named_config_profile() { assert_eq!(p.name, "foo"); assert_eq!(p.codegen_units, Some(2)); // "foo" from config assert_eq!(p.opt_level, "1"); // "middle" from manifest - assert_eq!(p.debuginfo.to_option(), Some(1)); // "bar" from config + assert_eq!(p.debuginfo.to_option(), Some(TomlDebugInfo::Limited)); // "bar" from config assert_eq!(p.debug_assertions, true); // "dev" built-in (ignore build-override) assert_eq!(p.overflow_checks, true); // "dev" built-in (ignore package override) @@ -445,7 +446,7 @@ fn named_config_profile() { assert_eq!(bo.name, "foo"); assert_eq!(bo.codegen_units, Some(6)); // "foo" build override from config assert_eq!(bo.opt_level, "0"); // default to zero - assert_eq!(bo.debuginfo.to_option(), Some(1)); // SAME as normal + assert_eq!(bo.debuginfo.to_option(), Some(TomlDebugInfo::Limited)); // SAME as normal assert_eq!(bo.debug_assertions, false); // "foo" build override from manifest assert_eq!(bo.overflow_checks, true); // SAME as normal @@ -454,7 +455,7 @@ fn named_config_profile() { assert_eq!(po.name, "foo"); assert_eq!(po.codegen_units, Some(7)); // "foo" package override from config assert_eq!(po.opt_level, "1"); // SAME as normal - assert_eq!(po.debuginfo.to_option(), Some(1)); // SAME as normal + assert_eq!(po.debuginfo.to_option(), Some(TomlDebugInfo::Limited)); // SAME as normal assert_eq!(po.debug_assertions, true); // SAME as normal assert_eq!(po.overflow_checks, false); // "middle" package override from manifest } diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index 00a79fe7362b..45b7c7da5aba 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -25,6 +25,7 @@ const CLEAN_FOO_JSON: &str = r#" "readme": null, "readme_file": null, "repository": "foo", + "rust_version": null, "vers": "0.0.1" } "#; @@ -49,6 +50,7 @@ fn validate_upload_foo() { "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.0.1" } "#, @@ -77,6 +79,7 @@ fn validate_upload_li() { "readme": null, "readme_file": null, "repository": null, + "rust_version": "1.69", "vers": "0.0.1" } "#, @@ -1270,6 +1273,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.0.1" } "#, @@ -1469,6 +1473,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.1.0" } "#, @@ -1581,6 +1586,7 @@ You may press ctrl-c [..] "readme": null, "readme_file": null, "repository": "foo", + "rust_version": null, "vers": "0.1.0" } "#, @@ -1756,6 +1762,9 @@ fn publish_with_missing_readme() { .with_stderr(&format!( "\ [UPDATING] [..] +[WARNING] readme `foo.md` does not appear to exist (relative to `[..]/foo`). +Please update the readme setting in the manifest at `[..]/foo/Cargo.toml` +This may become a hard error in the future. [PACKAGING] foo v0.1.0 [..] [PACKAGED] [..] files, [..] ([..] compressed) [UPLOADING] foo v0.1.0 [..] @@ -2046,6 +2055,7 @@ fn in_package_workspace() { [package] name = "li" version = "0.0.1" + rust-version = "1.69" description = "li" license = "MIT" "#, @@ -2148,6 +2158,7 @@ fn in_package_workspace_with_members_with_features_old() { [package] name = "li" version = "0.0.1" + rust-version = "1.69" description = "li" license = "MIT" "#, @@ -2243,6 +2254,7 @@ fn in_virtual_workspace_with_p() { [package] name = "li" version = "0.0.1" + rust-version = "1.69" description = "li" license = "MIT" "#, diff --git a/tests/testsuite/tree.rs b/tests/testsuite/tree.rs index c3c1ca6d3091..e2e74c4f954c 100644 --- a/tests/testsuite/tree.rs +++ b/tests/testsuite/tree.rs @@ -1085,6 +1085,59 @@ fn duplicates_with_target() { p.cargo("tree -d --target=all").with_stdout("").run(); } +#[cargo_test] +fn duplicates_with_proc_macro() { + Package::new("dupe-dep", "1.0.0").publish(); + Package::new("dupe-dep", "2.0.0").publish(); + Package::new("proc", "1.0.0") + .proc_macro(true) + .dep("dupe-dep", "1.0") + .publish(); + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.1.0" + + [dependencies] + proc = "1.0" + dupe-dep = "2.0" + "#, + ) + .file("src/lib.rs", "") + .build(); + + p.cargo("tree") + .with_stdout( + "\ +foo v0.1.0 ([..]/foo) +β”œβ”€β”€ dupe-dep v2.0.0 +└── proc v1.0.0 (proc-macro) + └── dupe-dep v1.0.0 +", + ) + .run(); + + p.cargo("tree --duplicates") + .with_stdout( + "\ +dupe-dep v1.0.0 +└── proc v1.0.0 (proc-macro) + └── foo v0.1.0 ([..]/foo) + +dupe-dep v2.0.0 +└── foo v0.1.0 ([..]/foo) +", + ) + .run(); + + p.cargo("tree --duplicates --edges no-proc-macro") + .with_stdout("") + .run(); +} + #[cargo_test] fn charset() { let p = make_simple_proj(); @@ -1540,8 +1593,6 @@ somedep v1.0.0 "\ somedep v1.0.0 └── foo v0.1.0 ([..]/foo) - -somedep v1.0.0 ", ) .run(); diff --git a/tests/testsuite/weak_dep_features.rs b/tests/testsuite/weak_dep_features.rs index ee91114df5f7..6f7c035476af 100644 --- a/tests/testsuite/weak_dep_features.rs +++ b/tests/testsuite/weak_dep_features.rs @@ -601,6 +601,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "readme": null, "readme_file": null, "repository": null, + "rust_version": null, "vers": "0.1.0" } "#, diff --git a/triagebot.toml b/triagebot.toml index 192859537af2..00a98e008060 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -9,7 +9,6 @@ allow-unauthenticated = [ "S-*", "Z-*", "beta-nominated", - "needs-mcve", "regression-*", "relnotes", ] @@ -104,7 +103,10 @@ trigger_files = ["src/cargo/sources/directory.rs"] trigger_files = ["src/doc/"] [autolabel."A-environment-variables"] -trigger_files = ["crates/home/"] +trigger_files = [ + "crates/home/", + "src/cargo/util/config/environment.rs", +] [autolabel."A-errors"] trigger_files = ["src/cargo/util/diagnostic_server.rs"] @@ -121,6 +123,19 @@ trigger_files = ["src/cargo/core/compiler/future_incompat.rs"] [autolabel."A-git"] trigger_files = ["src/cargo/sources/git/"] +[autolabel."A-infrastructure"] +trigger_files = [ + ".cargo/", + ".github/", + "build.rs", + "ci/", + "clippy.toml", + "crates/xtask-", + "deny.toml", + "publish.py", + "triagebot.toml", +] + [autolabel."A-interacts-with-crates.io"] trigger_files = ["crates/crates-io/", "src/cargo/ops/registry.rs"] @@ -150,7 +165,7 @@ trigger_files = [ ] [autolabel."A-networking"] -trigger_files = ["src/cargo/util/network.rs"] +trigger_files = ["src/cargo/util/network/"] [autolabel."A-overrides"] trigger_files = ["src/cargo/sources/replaced.rs"] @@ -165,13 +180,13 @@ trigger_files = ["src/cargo/core/compiler/fingerprint/"] trigger_files = ["src/cargo/sources/registry/", "src/cargo/core/registry.rs"] [autolabel."A-registry-authentication"] -trigger_files = ["src/cargo/util/auth.rs", "crates/credential/"] +trigger_files = ["src/cargo/util/auth.rs", "credential/"] [autolabel."A-semver"] trigger_files = [ + "crates/semver-check", "src/cargo/util/semver_ext.rs", "src/cargo/util/to_semver.rs", - "src/doc/semver-check/", ] [autolabel."A-source-replacement"]