diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef9d6b1..e2e43af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,11 +29,17 @@ jobs: - name: Build documentation (docs.rs / nightly) run: cargo +nightly rbmt --lock-file existing docsrs - - name: Run tests with stable + - name: Run tests with stable (existing lock) run: cargo rbmt --lock-file existing test stable - - name: Run tests with nightly + - name: Run tests with nightly (existing lock) run: cargo +nightly rbmt --lock-file existing test nightly - - name: Run tests with MSRV + - name: Run tests with MSRV (existing lock) run: cargo +1.74.0 rbmt --lock-file existing test msrv + + - name: Run tests with stable (recent dependencies) + run: cargo rbmt --lock-file recent test stable + + - name: Run tests with stable (minimal dependencies) + run: cargo rbmt --lock-file minimal test stable diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock new file mode 100644 index 0000000..2d56c0b --- /dev/null +++ b/Cargo-minimal.lock @@ -0,0 +1,414 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anstream" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "cargo-rbmt" +version = "0.1.0" +dependencies = [ + "clap", + "public-api", + "serde", + "serde_json", + "toml", + "xshell", +] + +[[package]] +name = "clap" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + +[[package]] +name = "hashbag" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f494b2060b2a8f5e63379e1e487258e014cee1b1725a735816c0107a2e9d93" + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f3e61cf687687b30c9e6ddf0fc36cf15f035e66d491e6da968fa49ffa9a378" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "proc-macro2" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "public-api" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92f0a3ef1a7c5a2cf381b0b689c68089127d457be055fefb1291a7fa1b6983cc" +dependencies = [ + "hashbag", + "rustdoc-types", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustdoc-types" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ecde53e08f3f1d7a67fb635914e053b85a024c73b920524acaa5c2d78482a6" +dependencies = [ + "serde", +] + +[[package]] +name = "ryu" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" + +[[package]] +name = "serde" +version = "1.0.179" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5bf42b8d227d4abf38a1ddb08602e229108a517cd4e5bb28f9c7eaafdce5c0" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.179" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741e124f5485c7e60c03b043f79f320bff3527f4bbf12cf3831750dc46a0ec2c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde", +] + +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + +[[package]] +name = "syn" +version = "2.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "toml" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_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.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[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.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[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.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" +dependencies = [ + "memchr", +] + +[[package]] +name = "xshell" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" diff --git a/Cargo-recent.lock b/Cargo-recent.lock new file mode 100644 index 0000000..2d5353b --- /dev/null +++ b/Cargo-recent.lock @@ -0,0 +1,396 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + +[[package]] +name = "cargo-rbmt" +version = "0.1.0" +dependencies = [ + "clap", + "public-api", + "serde", + "serde_json", + "toml", + "xshell", +] + +[[package]] +name = "clap" +version = "4.5.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "hashbag" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7040a10f52cba493ddb09926e15d10a9d8a28043708a405931fe4c6f19fac064" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "public-api" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5644f0a5bad87f0f850822e274c8a1178aea25117ca2562bc8c0d95f9f76251" +dependencies = [ + "hashbag", + "rustdoc-types", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustdoc-types" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b61d5673c3f4b49d35be6a58c49210596f61b8db580bc3b6d9dee5e9dc5458" +dependencies = [ + "serde", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "xshell" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" diff --git a/Cargo.lock b/Cargo.lock index d7ca50d..2d56c0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,96 +4,52 @@ version = 3 [[package]] name = "anstream" -version = "0.6.21" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys 0.60.2", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", - "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys", ] -[[package]] -name = "anyhow" -version = "1.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - [[package]] name = "cargo-rbmt" version = "0.1.0" @@ -106,43 +62,11 @@ dependencies = [ "xshell", ] -[[package]] -name = "cc" -version = "1.2.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" -dependencies = [ - "num-traits", - "serde", -] - [[package]] name = "clap" -version = "4.5.51" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -150,9 +74,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.51" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", @@ -162,9 +86,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", @@ -174,1379 +98,317 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "crates_io_api" -version = "0.11.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200ad30d24892baf2168f2df366939264d02f2fa0be0914f8e2da4bd3407c58c" -dependencies = [ - "chrono", - "futures", - "reqwest", - "serde", - "serde_derive", - "serde_json", - "serde_path_to_error", - "tokio", - "url", -] +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "find-msvc-tools" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" [[package]] -name = "fnv" -version = "1.0.7" +name = "hashbag" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "98f494b2060b2a8f5e63379e1e487258e014cee1b1725a735816c0107a2e9d93" [[package]] -name = "form_urlencoded" -version = "1.2.2" +name = "hashbrown" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] -name = "futures" -version = "0.3.31" +name = "heck" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] -name = "futures-channel" -version = "0.3.31" +name = "indexmap" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ - "futures-core", - "futures-sink", + "equivalent", + "hashbrown", ] [[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" +name = "itoa" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] +checksum = "d2f3e61cf687687b30c9e6ddf0fc36cf15f035e66d491e6da968fa49ffa9a378" [[package]] -name = "futures-io" -version = "0.3.31" +name = "memchr" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] -name = "futures-macro" -version = "0.3.31" +name = "proc-macro2" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ - "proc-macro2", - "quote", - "syn", + "unicode-ident", ] [[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" +name = "public-api" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "92f0a3ef1a7c5a2cf381b0b689c68089127d457be055fefb1291a7fa1b6983cc" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "hashbag", + "rustdoc-types", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "getrandom" -version = "0.2.16" +name = "quote" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", + "proc-macro2", ] [[package]] -name = "getrandom" -version = "0.3.4" +name = "rustdoc-types" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "77ecde53e08f3f1d7a67fb635914e053b85a024c73b920524acaa5c2d78482a6" dependencies = [ - "cfg-if", - "js-sys", - "libc", - "r-efi", - "wasip2", - "wasm-bindgen", + "serde", ] [[package]] -name = "hashbag" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7040a10f52cba493ddb09926e15d10a9d8a28043708a405931fe4c6f19fac064" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "http" -version = "1.3.1" +name = "ryu" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" -dependencies = [ - "bytes", - "fnv", - "itoa", -] +checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" [[package]] -name = "http-body" -version = "1.0.1" +name = "serde" +version = "1.0.179" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "0a5bf42b8d227d4abf38a1ddb08602e229108a517cd4e5bb28f9c7eaafdce5c0" dependencies = [ - "bytes", - "http", + "serde_derive", ] [[package]] -name = "http-body-util" -version = "0.1.3" +name = "serde_derive" +version = "1.0.179" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "741e124f5485c7e60c03b043f79f320bff3527f4bbf12cf3831750dc46a0ec2c" dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "hyper" -version = "1.7.0" +name = "serde_json" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", - "want", + "ryu", + "serde", ] [[package]] -name = "hyper-rustls" -version = "0.27.7" +name = "serde_spanned" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", - "webpki-roots", + "serde", ] [[package]] -name = "hyper-util" -version = "0.1.17" +name = "strsim" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] -name = "idna" -version = "1.1.0" +name = "syn" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "idna_adapter" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf4f5d937a025381f5ab13624b1c5f51414bfe5c9885663226eae8d6d39560" - -[[package]] -name = "indexmap" -version = "2.3.0" +name = "thiserror" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ - "equivalent", - "hashbrown", + "thiserror-impl", ] [[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.9" +name = "thiserror-impl" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ - "memchr", - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.82" +name = "toml" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" dependencies = [ - "once_cell", - "wasm-bindgen", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] -name = "libc" -version = "0.2.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" - -[[package]] -name = "log" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" - -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "mio" -version = "1.1.0" +name = "toml_datetime" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", + "serde", ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "toml_edit" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" dependencies = [ - "autocfg", + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "unicode-ident" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] -name = "ppv-lite86" -version = "0.2.21" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "zerocopy", + "windows-targets", ] [[package]] -name = "proc-macro2" -version = "1.0.103" +name = "windows-targets" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "unicode-ident", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] -name = "public-api" -version = "0.47.1" +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5644f0a5bad87f0f850822e274c8a1178aea25117ca2562bc8c0d95f9f76251" -dependencies = [ - "hashbag", - "rustdoc-types", - "serde", - "serde_json", - "thiserror", -] +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] -name = "quinn" -version = "0.11.9" +name = "windows_aarch64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror", - "tokio", - "tracing", - "web-time", -] +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] -name = "quinn-proto" -version = "0.11.13" +name = "windows_i686_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" -dependencies = [ - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror", - "tinyvec", - "tracing", - "web-time", -] +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] -name = "quinn-udp" -version = "0.5.14" +name = "windows_i686_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.60.2", -] +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] -name = "quote" -version = "1.0.42" +name = "windows_x86_64_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] -name = "r-efi" -version = "5.3.0" +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] -name = "rand" -version = "0.9.2" +name = "windows_x86_64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha", - "rand_core", -] +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] -name = "rand_chacha" -version = "0.9.0" +name = "winnow" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ - "ppv-lite86", - "rand_core", + "memchr", ] [[package]] -name = "rand_core" -version = "0.9.3" +name = "xshell" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.4", -] - -[[package]] -name = "releases" -version = "0.1.0" +checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" dependencies = [ - "anyhow", - "clap", - "crates_io_api", - "semver", - "serde", - "serde_json", - "tokio", - "toml", + "xshell-macros", ] [[package]] -name = "reqwest" -version = "0.12.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "js-sys", - "log", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rustdoc-types" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b61d5673c3f4b49d35be6a58c49210596f61b8db580bc3b6d9dee5e9dc5458" -dependencies = [ - "serde", -] - -[[package]] -name = "rustls" -version = "0.23.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" -dependencies = [ - "web-time", - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "slab" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "2.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "thiserror" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tinyvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" -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 = "tokio" -version = "1.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" -dependencies = [ - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", - "winnow", -] - -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - -[[package]] -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" -dependencies = [ - "bitflags", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winnow" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "xshell" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" -dependencies = [ - "xshell-macros", -] - -[[package]] -name = "xshell-macros" -version = "0.2.7" +name = "xshell-macros" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" - -[[package]] -name = "zerocopy" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" diff --git a/Cargo.toml b/Cargo.toml index d3fc372..0f6d367 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,134 @@ [workspace] members = [ - "releases", "cargo-rbmt", ] resolver = "2" + +[workspace.lints.clippy] +# Exclude lints we don't think are valuable. +needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 +manual_range_contains = "allow" # More readable than clippy's format. +# Exhaustive list of pedantic clippy lints +assigning_clones = "warn" +bool_to_int_with_if = "warn" +borrow_as_ptr = "warn" +case_sensitive_file_extension_comparisons = "warn" +cast_lossless = "warn" +cast_possible_truncation = "allow" # All casts should include a code comment (except test code). +cast_possible_wrap = "allow" # Same as above re code comment. +cast_precision_loss = "warn" +cast_ptr_alignment = "warn" +cast_sign_loss = "allow" # All casts should include a code comment (except in test code). +checked_conversions = "warn" +cloned_instead_of_copied = "warn" +copy_iterator = "warn" +default_trait_access = "warn" +doc_link_with_quotes = "warn" +doc_markdown = "warn" +empty_enum = "warn" +enum_glob_use = "warn" +expl_impl_clone_on_copy = "warn" +explicit_deref_methods = "warn" +explicit_into_iter_loop = "warn" +explicit_iter_loop = "warn" +filter_map_next = "warn" +flat_map_option = "warn" +float_cmp = "allow" # Bitcoin floats are typically limited to 8 decimal places and we want them exact. +fn_params_excessive_bools = "warn" +from_iter_instead_of_collect = "warn" +if_not_else = "warn" +ignored_unit_patterns = "warn" +implicit_clone = "warn" +implicit_hasher = "warn" +inconsistent_struct_constructor = "warn" +index_refutable_slice = "warn" +inefficient_to_string = "warn" +inline_always = "warn" +into_iter_without_iter = "warn" +invalid_upcast_comparisons = "warn" +items_after_statements = "warn" +iter_filter_is_ok = "warn" +iter_filter_is_some = "warn" +iter_not_returning_iterator = "warn" +iter_without_into_iter = "warn" +large_digit_groups = "warn" +large_futures = "warn" +large_stack_arrays = "warn" +large_types_passed_by_value = "warn" +linkedlist = "warn" +macro_use_imports = "warn" +manual_assert = "warn" +manual_instant_elapsed = "warn" +manual_is_power_of_two = "warn" +manual_is_variant_and = "warn" +manual_let_else = "warn" +manual_ok_or = "warn" +manual_string_new = "warn" +many_single_char_names = "warn" +map_unwrap_or = "warn" +match_bool = "allow" # Adds extra indentation and LOC. +match_same_arms = "allow" # Collapses things that are conceptually unrelated to each other. +match_wild_err_arm = "warn" +match_wildcard_for_single_variants = "warn" +maybe_infinite_iter = "warn" +mismatching_type_param_order = "warn" +missing_errors_doc = "warn" +missing_fields_in_debug = "warn" +missing_panics_doc = "warn" +must_use_candidate = "allow" # Useful for audit but many false positives. +mut_mut = "warn" +naive_bytecount = "warn" +needless_bitwise_bool = "warn" +needless_continue = "warn" +needless_for_each = "warn" +needless_pass_by_value = "warn" +needless_raw_string_hashes = "warn" +no_effect_underscore_binding = "warn" +no_mangle_with_rust_abi = "warn" +option_as_ref_cloned = "warn" +option_option = "warn" +ptr_as_ptr = "warn" +ptr_cast_constness = "warn" +pub_underscore_fields = "warn" +range_minus_one = "warn" +range_plus_one = "warn" +redundant_clone = "warn" +redundant_closure_for_method_calls = "warn" +redundant_else = "warn" +ref_as_ptr = "warn" +ref_binding_to_reference = "warn" +ref_option = "warn" +ref_option_ref = "warn" +return_self_not_must_use = "warn" +same_functions_in_if_condition = "warn" +semicolon_if_nothing_returned = "warn" +should_panic_without_expect = "warn" +similar_names = "allow" # Too many (subjectively) false positives. +single_char_pattern = "warn" +single_match_else = "warn" +stable_sort_primitive = "warn" +str_split_at_newline = "warn" +string_add_assign = "warn" +struct_excessive_bools = "warn" +struct_field_names = "allow" # dumb +too_many_lines = "warn" +transmute_ptr_to_ptr = "warn" +trivially_copy_pass_by_ref = "warn" +unchecked_time_subtraction = "warn" +unicode_not_nfc = "warn" +uninlined_format_args = "allow" # This is a subjective style choice. +unnecessary_box_returns = "warn" +unnecessary_join = "warn" +unnecessary_literal_bound = "warn" +unnecessary_wraps = "warn" +unnested_or_patterns = "warn" +unreadable_literal = "warn" +unsafe_derive_deserialize = "warn" +unused_async = "warn" +unused_self = "warn" +use_self = "warn" +used_underscore_binding = "warn" +used_underscore_items = "warn" +verbose_bit_mask = "warn" +wildcard_imports = "warn" +zero_sized_map_values = "warn" diff --git a/README.md b/README.md index d188f8b..857ec19 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # `rust-bitcoin` Maintainer Tools -This repository contains utilities for maintaining projects in the rust-bitcoin ecosystem. +[![CI](https://github.com/nyonson/rust-bitcoin-maintainer-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/nyonson/rust-bitcoin-maintainer-tools/actions/workflows/ci.yml) +[![MSRV](https://img.shields.io/badge/MSRV-1.74.0-blue)](https://github.com/nyonson/rust-bitcoin-maintainer-tools/blob/master/cargo-rbmt/Cargo.toml) +[![CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/) + +This repository contains utilities for maintaining projects in the rust-bitcoin ecosystem. [`ci`](./ci) directory holds the legacy shell scripts for continuous integration. The [`cargo-rbmt`](./cargo-rbmt) package is a rust re-write with new features. diff --git a/cargo-rbmt/Cargo.toml b/cargo-rbmt/Cargo.toml index 67d30f6..0f59e37 100644 --- a/cargo-rbmt/Cargo.toml +++ b/cargo-rbmt/Cargo.toml @@ -11,9 +11,12 @@ name = "cargo-rbmt" path = "src/main.rs" [dependencies] -xshell = "0.2" -clap = { version = "4", features = ["derive"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +xshell = "0.2.7" +clap = { version = "4.5", features = ["derive"] } +serde = { version = "1.0.179", features = ["derive"] } +serde_json = "1.0.104" toml = "0.8" public-api = "0.47" + +[lints] +workspace = true diff --git a/cargo-rbmt/README.md b/cargo-rbmt/README.md index a04a247..ba9bb04 100644 --- a/cargo-rbmt/README.md +++ b/cargo-rbmt/README.md @@ -1,8 +1,4 @@ -# Maintainer Tools - -[![CI](https://github.com/nyonson/rust-bitcoin-maintainer-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/nyonson/rust-bitcoin-maintainer-tools/actions/workflows/ci.yml) -[![MSRV](https://img.shields.io/badge/MSRV-1.74.0-blue)](https://github.com/nyonson/rust-bitcoin-maintainer-tools/blob/master/cargo-rbmt/Cargo.toml) -[![CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/) +# cargo-rbmt Maintainer tools for Rust-based projects in the Bitcoin domain. Built with [xshell](https://github.com/matklad/xshell). diff --git a/cargo-rbmt/justfile b/cargo-rbmt/justfile index 8e2f421..6fe953d 100644 --- a/cargo-rbmt/justfile +++ b/cargo-rbmt/justfile @@ -28,3 +28,9 @@ _default: # Run tests. @test: (_rbmt "test stable") + +# Run tests with MSRV. +@msrv: (_rbmt "test msrv" "1.74.0" "existing") + +# Update Cargo-minimal.lock and Cargo-recent.lock files. +@lock: (_rbmt "lock" "nightly") diff --git a/cargo-rbmt/src/api.rs b/cargo-rbmt/src/api.rs index 6773568..14afc35 100644 --- a/cargo-rbmt/src/api.rs +++ b/cargo-rbmt/src/api.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use std::fs; use std::path::{Path, PathBuf}; + use xshell::Shell; use crate::{environment, quiet_cmd, toolchain}; @@ -31,7 +32,7 @@ enum FeatureConfig { impl FeatureConfig { /// Get the filename for this configuration. - fn filename(&self) -> &'static str { + fn filename(self) -> &'static str { match self { Self::None => "no-features.txt", Self::Alloc => "alloc-only.txt", @@ -40,7 +41,7 @@ impl FeatureConfig { } /// Get a display name for this configuration. - fn display_name(&self) -> &'static str { + fn display_name(self) -> &'static str { match self { Self::None => "no-features", Self::Alloc => "alloc-only", @@ -49,7 +50,7 @@ impl FeatureConfig { } /// Get the cargo arguments for this configuration. - fn cargo_args(&self) -> &'static [&'static str] { + fn cargo_args(self) -> &'static [&'static str] { match self { Self::None => &["--no-default-features"], Self::Alloc => &["--no-default-features", "--features=alloc"], @@ -101,11 +102,7 @@ fn get_package_apis( let workspace_root = sh.current_dir(); let mut apis = HashMap::new(); - for config in [ - FeatureConfig::None, - FeatureConfig::Alloc, - FeatureConfig::All, - ] { + for config in [FeatureConfig::None, FeatureConfig::Alloc, FeatureConfig::All] { // Change to package directory to run rustdoc. // This is necessary because cargo doesn't allow feature flags with -p option. sh.change_dir(package_dir); @@ -116,8 +113,7 @@ fn get_package_apis( cmd = cmd.arg(arg); } cmd = cmd.args(&["--", "-Z", "unstable-options", "--output-format", "json"]); - cmd.env("RUSTDOCFLAGS", RUSTDOCFLAGS_ALLOW_BROKEN_LINKS) - .run()?; + cmd.env("RUSTDOCFLAGS", RUSTDOCFLAGS_ALLOW_BROKEN_LINKS).run()?; // Change back to workspace root and parse JSON. sh.change_dir(&workspace_root); @@ -157,12 +153,10 @@ fn check_apis( } // Check that features are additive (all-features contains everything from no-features). - let no_features = apis - .remove(&FeatureConfig::None) - .ok_or("No-features config not found")?; - let all_features = apis - .remove(&FeatureConfig::All) - .ok_or("All-features config not found")?; + let no_features = + apis.remove(&FeatureConfig::None).ok_or("No-features config not found")?; + let all_features = + apis.remove(&FeatureConfig::All).ok_or("All-features config not found")?; let diff = public_api::diff::PublicApiDiff::between(no_features, all_features); @@ -215,10 +209,7 @@ fn check_semver( package_info: &[(String, PathBuf)], baseline_ref: &str, ) -> Result<(), Box> { - environment::quiet_println(&format!( - "Running semver check against baseline: {}", - baseline_ref - )); + environment::quiet_println(&format!("Running semver check against baseline: {}", baseline_ref)); // Store current branch/commit to restore later. let current_ref = quiet_cmd!(sh, "git rev-parse --abbrev-ref HEAD").read()?; @@ -250,48 +241,30 @@ fn check_semver( // Check for breaking changes in each package. for package_name in package_info.iter().map(|(name, _)| name) { - let mut baseline = match baseline_apis.remove(package_name) { - Some(apis) => apis, - None => { - environment::quiet_println(&format!( - "Warning: Package '{}' not found in baseline - skipping comparison", - package_name - )); - continue; - } + let Some(mut baseline) = baseline_apis.remove(package_name) else { + environment::quiet_println(&format!( + "Warning: Package '{}' not found in baseline - skipping comparison", + package_name + )); + continue; }; - let mut current = match current_apis.remove(package_name) { - Some(apis) => apis, - None => { - environment::quiet_println(&format!( - "Warning: Package '{}' exists in baseline but not in current - possible removal", - package_name - )); - continue; - } + let Some(mut current) = current_apis.remove(package_name) else { + environment::quiet_println(&format!( + "Warning: Package '{}' exists in baseline but not in current - possible removal", + package_name + )); + continue; }; - for config in [ - FeatureConfig::None, - FeatureConfig::Alloc, - FeatureConfig::All, - ] { - let baseline_api = baseline - .remove(&config) - .ok_or("Config not found in baseline")?; - let current_api = current - .remove(&config) - .ok_or("Config not found in current")?; + for config in [FeatureConfig::None, FeatureConfig::Alloc, FeatureConfig::All] { + let baseline_api = baseline.remove(&config).ok_or("Config not found in baseline")?; + let current_api = current.remove(&config).ok_or("Config not found in current")?; let diff = public_api::diff::PublicApiDiff::between(baseline_api, current_api); if !diff.removed.is_empty() || !diff.changed.is_empty() { - eprintln!( - "API changes detected in {} ({})", - package_name, - config.display_name() - ); + eprintln!("API changes detected in {} ({})", package_name, config.display_name()); return Err("Semver compatibility check failed: breaking changes detected".into()); } } diff --git a/cargo-rbmt/src/bench.rs b/cargo-rbmt/src/bench.rs index d9c1bcd..2ea1e9a 100644 --- a/cargo-rbmt/src/bench.rs +++ b/cargo-rbmt/src/bench.rs @@ -1,9 +1,10 @@ //! Benchmark testing tasks. +use xshell::Shell; + use crate::environment::{get_packages, quiet_println}; use crate::quiet_cmd; use crate::toolchain::{check_toolchain, Toolchain}; -use xshell::Shell; /// Run benchmark tests for all crates in the workspace. pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box> { @@ -11,10 +12,7 @@ pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box Result<(), Box Result<(), Box bool { - env::var(LOG_LEVEL_ENV_VAR).is_ok_and(|v| v == "quiet") -} +pub fn is_quiet_mode() -> bool { env::var(LOG_LEVEL_ENV_VAR).is_ok_and(|v| v == "quiet") } /// Helper macro to create commands that respect quiet mode. #[macro_export] @@ -35,7 +34,7 @@ pub fn quiet_println(msg: &str) { } /// Configure shell log level and output verbosity. -/// Sets cargo output verbosity based on LOG_LEVEL_ENV_VAR. +/// Sets cargo output verbosity based on `LOG_LEVEL_ENV_VAR`. pub fn configure_log_level(sh: &Shell) { if is_quiet_mode() { sh.set_var("CARGO_TERM_VERBOSE", "false"); @@ -59,7 +58,7 @@ pub fn change_to_repo_root(sh: &Shell) { } /// Get list of package names and their directories in the workspace using cargo metadata. -/// Returns tuples of (package_name, directory_path) to support various workspace layouts including nested crates. +/// Returns tuples of (`package_name`, `directory_path`) to support various workspace layouts including nested crates. /// /// # Arguments /// @@ -96,15 +95,14 @@ pub fn get_packages( /// Get the cargo target directory from metadata. /// -/// This respects CARGO_TARGET_DIR, .cargo/config.toml, and other cargo +/// This respects `CARGO_TARGET_DIR`, .cargo/config.toml, and other cargo /// target directory configuration. pub fn get_target_dir(sh: &Shell) -> Result> { let metadata = quiet_cmd!(sh, "cargo metadata --no-deps --format-version 1").read()?; let json: serde_json::Value = serde_json::from_str(&metadata)?; - let target_dir = json["target_directory"] - .as_str() - .ok_or("Missing target_directory in cargo metadata")?; + let target_dir = + json["target_directory"].as_str().ok_or("Missing target_directory in cargo metadata")?; Ok(target_dir.to_string()) } diff --git a/cargo-rbmt/src/integration.rs b/cargo-rbmt/src/integration.rs index 10c62e2..a5c2754 100644 --- a/cargo-rbmt/src/integration.rs +++ b/cargo-rbmt/src/integration.rs @@ -1,11 +1,13 @@ //! Integration test tasks for packages with bitcoind-tests or similar test packages. -use crate::environment::{get_packages, quiet_println, CONFIG_FILE_PATH}; -use crate::quiet_cmd; -use serde::Deserialize; use std::path::{Path, PathBuf}; + +use serde::Deserialize; use xshell::{cmd, Shell}; +use crate::environment::{get_packages, quiet_println, CONFIG_FILE_PATH}; +use crate::quiet_cmd; + /// Integration test configuration loaded from rbmt.toml. #[derive(Debug, Deserialize, Default)] #[serde(default)] @@ -35,7 +37,7 @@ impl IntegrationConfig { let config_path = crate_dir.join(CONFIG_FILE_PATH); if !config_path.exists() { - return Ok(IntegrationConfig::default()); + return Ok(Self::default()); } let contents = std::fs::read_to_string(&config_path)?; @@ -44,9 +46,7 @@ impl IntegrationConfig { } /// Get the package name (defaults to "bitcoind-tests"). - fn package_name(&self) -> &str { - self.package.as_deref().unwrap_or("bitcoind-tests") - } + fn package_name(&self) -> &str { self.package.as_deref().unwrap_or("bitcoind-tests") } } /// Run integration tests for all crates with integration test packages. @@ -56,10 +56,7 @@ impl IntegrationConfig { /// * `packages` - Optional filter for specific package names. pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box> { let package_info = get_packages(sh, packages)?; - quiet_println(&format!( - "Looking for integration tests in {} crate(s)", - package_info.len() - )); + quiet_println(&format!("Looking for integration tests in {} crate(s)", package_info.len())); for (_package_name, package_dir) in &package_info { let config = IntegrationConfig::load(Path::new(package_dir))?; @@ -73,10 +70,7 @@ pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box Result<(), Box> { quiet_println("Linting workspace..."); // Run clippy on workspace with all features. - quiet_cmd!( - sh, - "cargo --locked clippy --workspace --all-targets --all-features --keep-going" - ) - .args(&["--", "-D", "warnings"]) - .run()?; + quiet_cmd!(sh, "cargo --locked clippy --workspace --all-targets --all-features --keep-going") + .args(&["--", "-D", "warnings"]) + .run()?; // Run clippy on workspace without features. - quiet_cmd!( - sh, - "cargo --locked clippy --workspace --all-targets --keep-going" - ) - .args(&["--", "-D", "warnings"]) - .run()?; + quiet_cmd!(sh, "cargo --locked clippy --workspace --all-targets --keep-going") + .args(&["--", "-D", "warnings"]) + .run()?; Ok(()) } @@ -96,12 +89,9 @@ fn lint_packages(sh: &Shell, packages: &[String]) -> Result<(), Box Result<(), Box> { let allowed_duplicates = &config.allowed_duplicates; // Run cargo tree to find duplicates. - let output = quiet_cmd!( - sh, - "cargo --locked tree --target=all --all-features --duplicates" - ) - .ignore_status() - .read()?; + let output = quiet_cmd!(sh, "cargo --locked tree --target=all --all-features --duplicates") + .ignore_status() + .read()?; let duplicates: Vec<&str> = output .lines() // Filter out non crate names. - .filter(|line| line.chars().next().is_some_and(|c| c.is_alphanumeric())) + .filter(|line| line.chars().next().is_some_and(char::is_alphanumeric)) // Filter out whitelisted crates. - .filter(|line| { - !allowed_duplicates - .iter() - .any(|allowed| line.contains(allowed)) - }) + .filter(|line| !allowed_duplicates.iter().any(|allowed| line.contains(allowed))) .collect(); if !duplicates.is_empty() { // Show full tree for context. - quiet_cmd!( - sh, - "cargo --locked tree --target=all --all-features --duplicates" - ) - .run()?; + quiet_cmd!(sh, "cargo --locked tree --target=all --all-features --duplicates").run()?; eprintln!("Error: Found duplicate dependencies in workspace!"); for dup in &duplicates { eprintln!(" {}", dup); diff --git a/cargo-rbmt/src/lock.rs b/cargo-rbmt/src/lock.rs index 7b57a34..c75edaa 100644 --- a/cargo-rbmt/src/lock.rs +++ b/cargo-rbmt/src/lock.rs @@ -4,15 +4,19 @@ //! generate and modify lockfiles. Using `--locked` would prevent the dependency //! resolution we need here. +use std::fs; + +use clap::ValueEnum; +use xshell::Shell; + use crate::environment::quiet_println; use crate::quiet_cmd; use crate::toolchain::{check_toolchain, Toolchain}; -use clap::ValueEnum; -use std::fs; -use xshell::Shell; /// The standard Cargo lockfile name. const CARGO_LOCK: &str = "Cargo.lock"; +/// The temporary backup file for Cargo.lock. +const CARGO_LOCK_BACKUP: &str = "Cargo.lock.backup"; /// Represents the different types of managed lock files. #[derive(Debug, Clone, Copy, ValueEnum, Default)] @@ -28,20 +32,20 @@ pub enum LockFile { impl LockFile { /// Get the filename for this lock file type. - pub fn filename(&self) -> &'static str { + pub fn filename(self) -> &'static str { match self { - LockFile::Minimal => "Cargo-minimal.lock", - LockFile::Recent => "Cargo-recent.lock", - LockFile::Existing => CARGO_LOCK, + Self::Minimal => "Cargo-minimal.lock", + Self::Recent => "Cargo-recent.lock", + Self::Existing => CARGO_LOCK, } } /// Derive this lockfile type from dependencies and activate it as Cargo.lock. - pub fn derive(&self, sh: &Shell) -> Result<(), Box> { + pub fn derive(self, sh: &Shell) -> Result<(), Box> { match self { - LockFile::Minimal => derive_minimal_lockfile(sh), - LockFile::Recent => update_recent_lockfile(sh), - LockFile::Existing => { + Self::Minimal => derive_minimal_lockfile(sh), + Self::Recent => update_recent_lockfile(sh), + Self::Existing => { // No-op, use existing Cargo.lock. Ok(()) } @@ -49,16 +53,16 @@ impl LockFile { } /// Restore a previously derived lockfile to Cargo.lock. - pub fn restore(&self, sh: &Shell) -> Result<(), Box> { + pub fn restore(self, sh: &Shell) -> Result<(), Box> { match self { - LockFile::Minimal | LockFile::Recent => { + Self::Minimal | Self::Recent => { fs::copy( sh.current_dir().join(self.filename()), sh.current_dir().join(CARGO_LOCK), )?; Ok(()) } - LockFile::Existing => { + Self::Existing => { // No-op, Cargo.lock is already in place. Ok(()) } @@ -73,13 +77,20 @@ impl LockFile { /// /// This helps catch cases where you've specified a minimum version that's too high, /// or where your code relies on features from newer versions than declared. +/// +/// The original Cargo.lock is preserved and restored after generation in case +/// it is being tracked for publication. pub fn run(sh: &Shell) -> Result<(), Box> { check_toolchain(sh, Toolchain::Nightly)?; let repo_dir = sh.current_dir(); quiet_println(&format!("Updating lock files in: {}", repo_dir.display())); + + backup_existing(sh)?; LockFile::Minimal.derive(sh)?; LockFile::Recent.derive(sh)?; + restore_existing(sh)?; + quiet_println("Lock files updated successfully"); Ok(()) @@ -131,6 +142,7 @@ fn update_recent_lockfile(sh: &Shell) -> Result<(), Box> // Try to restore existing Cargo-recent.lock for conservative updates. // If it doesn't exist cargo check will create a fresh one. + remove_lock_file(sh)?; let _ = LockFile::Recent.restore(sh); quiet_cmd!(sh, "cargo check --all-features").run()?; @@ -156,3 +168,24 @@ fn copy_lock_file(sh: &Shell, target: LockFile) -> Result<(), Box Result<(), Box> { + let source = sh.current_dir().join(CARGO_LOCK); + let backup = sh.current_dir().join(CARGO_LOCK_BACKUP); + if source.exists() { + fs::copy(&source, &backup)?; + } + Ok(()) +} + +/// Restore the existing Cargo.lock file from backup. +fn restore_existing(sh: &Shell) -> Result<(), Box> { + let backup = sh.current_dir().join(CARGO_LOCK_BACKUP); + let dest = sh.current_dir().join(CARGO_LOCK); + if backup.exists() { + fs::copy(&backup, &dest)?; + fs::remove_file(&backup)?; + } + Ok(()) +} diff --git a/cargo-rbmt/src/main.rs b/cargo-rbmt/src/main.rs index 6a51828..0a6b218 100644 --- a/cargo-rbmt/src/main.rs +++ b/cargo-rbmt/src/main.rs @@ -9,13 +9,13 @@ mod prerelease; mod test; mod toolchain; -use clap::{Parser, Subcommand}; use std::process; -use xshell::Shell; +use clap::{Parser, Subcommand}; use environment::{change_to_repo_root, configure_log_level}; use lock::LockFile; use toolchain::Toolchain; +use xshell::Shell; #[derive(Parser)] #[command(name = "cargo-rbmt")] @@ -95,56 +95,46 @@ fn main() { process::exit(1); } } - Commands::Lint => { + Commands::Lint => if let Err(e) = lint::run(&sh, &cli.packages) { eprintln!("Error running lint task: {}", e); process::exit(1); - } - } - Commands::Docs => { + }, + Commands::Docs => if let Err(e) = docs::run(&sh, &cli.packages) { eprintln!("Error building docs: {}", e); process::exit(1); - } - } - Commands::Docsrs => { + }, + Commands::Docsrs => if let Err(e) = docs::run_docsrs(&sh, &cli.packages) { eprintln!("Error building docs.rs docs: {}", e); process::exit(1); - } - } - Commands::Bench => { + }, + Commands::Bench => if let Err(e) = bench::run(&sh, &cli.packages) { eprintln!("Error running bench tests: {}", e); process::exit(1); - } - } - Commands::Test { - toolchain, - no_debug_assertions, - } => { + }, + Commands::Test { toolchain, no_debug_assertions } => { if let Err(e) = test::run(&sh, toolchain, no_debug_assertions, &cli.packages) { eprintln!("Error running tests: {}", e); process::exit(1); } } - Commands::Integration => { + Commands::Integration => if let Err(e) = integration::run(&sh, &cli.packages) { eprintln!("Error running integration tests: {}", e); process::exit(1); - } - } - Commands::Lock => { + }, + Commands::Lock => if let Err(e) = lock::run(&sh) { eprintln!("Error updating lock files: {}", e); process::exit(1); - } - } - Commands::Prerelease => { + }, + Commands::Prerelease => if let Err(e) = prerelease::run(&sh, &cli.packages) { eprintln!("Error running pre-release checks: {}", e); process::exit(1); - } - } + }, } } diff --git a/cargo-rbmt/src/prerelease.rs b/cargo-rbmt/src/prerelease.rs index 173b66a..0a0fea3 100644 --- a/cargo-rbmt/src/prerelease.rs +++ b/cargo-rbmt/src/prerelease.rs @@ -1,15 +1,17 @@ //! Pre-release readiness checks. -use crate::environment::{get_packages, get_target_dir, quiet_println, CONFIG_FILE_PATH}; -use crate::lock::LockFile; -use crate::quiet_cmd; -use crate::toolchain::{check_toolchain, Toolchain}; -use serde::Deserialize; use std::fs; use std::io::{BufRead, BufReader}; use std::path::Path; + +use serde::Deserialize; use xshell::Shell; +use crate::environment::{get_packages, get_target_dir, quiet_println, CONFIG_FILE_PATH}; +use crate::lock::LockFile; +use crate::quiet_cmd; +use crate::toolchain::{check_toolchain, Toolchain}; + /// Pre-release configuration loaded from rbmt.toml. #[derive(Debug, Deserialize, Default)] #[serde(default)] @@ -32,7 +34,7 @@ impl PrereleaseConfig { if !config_path.exists() { // Return default config (skip = false) if file doesn't exist. - return Ok(PrereleaseConfig { skip: false }); + return Ok(Self { skip: false }); } let contents = std::fs::read_to_string(&config_path)?; @@ -44,10 +46,7 @@ impl PrereleaseConfig { /// Run pre-release readiness checks for all packages. pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box> { let package_info = get_packages(sh, packages)?; - quiet_println(&format!( - "Running pre-release checks on {} packages", - package_info.len() - )); + quiet_println(&format!("Running pre-release checks on {} packages", package_info.len())); let mut skipped = Vec::new(); @@ -56,10 +55,7 @@ pub fn run(sh: &Shell, packages: &[String]) -> Result<(), Box Result<(), Box Result<(), Box Result<(), Box> { quiet_println("Greping source for todos and nonos..."); - // Things which should be patched up before release. - const TODOS: &[&str] = &["// TODO", "/* TODO", "// FIXME", "/* FIXME", "\"TBD\""]; - // Things which are banned and can't be released. - const NONOS: &[&str] = &["doc_auto_cfg"]; - // Recursively walk the src/ directory. let mut issues = Vec::new(); let mut dirs_to_visit = vec![sh.current_dir().join("src")]; @@ -170,21 +158,17 @@ fn get_publish_dir(sh: &Shell) -> Result> { let current_dir = sh.current_dir(); let current_manifest = current_dir.join("Cargo.toml"); - let packages = json["packages"] - .as_array() - .ok_or("Missing 'packages' field in cargo metadata")?; + let packages = + json["packages"].as_array().ok_or("Missing 'packages' field in cargo metadata")?; for package in packages { - let manifest_path = package["manifest_path"] - .as_str() - .ok_or("Missing manifest_path in package")?; + let manifest_path = + package["manifest_path"].as_str().ok_or("Missing manifest_path in package")?; if manifest_path == current_manifest.to_str().ok_or("Invalid path")? { let name = package["name"].as_str().ok_or("Missing name in package")?; - let version = package["version"] - .as_str() - .ok_or("Missing version in package")?; + let version = package["version"].as_str().ok_or("Missing version in package")?; return Ok(format!("{}/package/{}-{}", target_dir, name, version)); } diff --git a/cargo-rbmt/src/test.rs b/cargo-rbmt/src/test.rs index c020bdc..09b464c 100644 --- a/cargo-rbmt/src/test.rs +++ b/cargo-rbmt/src/test.rs @@ -1,14 +1,16 @@ //! Test tasks with feature matrix testing. -use crate::environment::{get_packages, quiet_println, CONFIG_FILE_PATH}; -use crate::quiet_cmd; -use crate::toolchain::{check_toolchain, Toolchain}; -use serde::Deserialize; use std::ffi::OsStr; use std::fmt; use std::path::Path; + +use serde::Deserialize; use xshell::Shell; +use crate::environment::{get_packages, quiet_println, CONFIG_FILE_PATH}; +use crate::quiet_cmd; +use crate::toolchain::{check_toolchain, Toolchain}; + /// Conventinal feature flags used across rust-bitcoin crates. #[derive(Debug, Clone, Copy)] enum FeatureFlag { @@ -20,30 +22,24 @@ enum FeatureFlag { impl FeatureFlag { /// Get the feature string for this flag. - fn as_str(&self) -> &'static str { + fn as_str(self) -> &'static str { match self { - FeatureFlag::Std => "std", - FeatureFlag::NoStd => "no-std", + Self::Std => "std", + Self::NoStd => "no-std", } } } impl fmt::Display for FeatureFlag { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.as_str()) - } + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for FeatureFlag { - fn as_ref(&self) -> &str { - self.as_str() - } + fn as_ref(&self) -> &str { self.as_str() } } impl AsRef for FeatureFlag { - fn as_ref(&self) -> &OsStr { - OsStr::new(self.as_str()) - } + fn as_ref(&self) -> &OsStr { OsStr::new(self.as_str()) } } /// Test configuration loaded from rbmt.toml. @@ -119,7 +115,7 @@ impl TestConfig { if !config_path.exists() { // Return empty config if file doesn't exist. - return Ok(TestConfig { + return Ok(Self { examples: Vec::new(), features_with_std: Vec::new(), features_without_std: Vec::new(), @@ -147,11 +143,7 @@ pub fn run( // Configure RUSTFLAGS for debug assertions. let _env = sh.push_env( "RUSTFLAGS", - if no_debug_assertions { - "-C debug-assertions=off" - } else { - "-C debug-assertions=on" - }, + if no_debug_assertions { "-C debug-assertions=off" } else { "-C debug-assertions=on" }, ); for (_package_name, package_dir) in &package_info { @@ -192,10 +184,12 @@ fn do_test(sh: &Shell, config: &TestConfig) -> Result<(), Box { @@ -220,21 +214,22 @@ fn do_feature_matrix(sh: &Shell, config: &TestConfig) -> Result<(), Box>( fn combine_features>(base: Option, additional: &[S]) -> String { match base { Some(flag) => std::iter::once(flag.as_ref()) - .chain(additional.iter().map(|s| s.as_ref())) - .collect::>() - .join(" "), - None => additional - .iter() - .map(|s| s.as_ref()) + .chain(additional.iter().map(std::convert::AsRef::as_ref)) .collect::>() .join(" "), + None => additional.iter().map(std::convert::AsRef::as_ref).collect::>().join(" "), } } @@ -298,14 +289,19 @@ fn loop_features>( for i in 0..features.len() { let feature_combo = combine_features(base, &features[i..=i]); quiet_println(&format!("Testing features: {}", feature_combo)); - quiet_cmd!(sh, "cargo --locked test --no-default-features --features={feature_combo}").run()?; + quiet_cmd!(sh, "cargo --locked test --no-default-features --features={feature_combo}") + .run()?; // Test all pairs with features[i]. for j in (i + 1)..features.len() { let pair = [&features[i], &features[j]]; let feature_combo = combine_features(base, &pair); quiet_println(&format!("Testing features: {}", feature_combo)); - quiet_cmd!(sh, "cargo --locked test --no-default-features --features={feature_combo}").run()?; + quiet_cmd!( + sh, + "cargo --locked test --no-default-features --features={feature_combo}" + ) + .run()?; } } } diff --git a/cargo-rbmt/src/toolchain.rs b/cargo-rbmt/src/toolchain.rs index 808352d..78dc74f 100644 --- a/cargo-rbmt/src/toolchain.rs +++ b/cargo-rbmt/src/toolchain.rs @@ -1,4 +1,5 @@ use std::path::Path; + use xshell::{cmd, Shell}; /// Toolchain requirement for a task. @@ -23,16 +24,14 @@ pub fn check_toolchain(sh: &Shell, required: Toolchain) -> Result<(), Box { + Toolchain::Nightly => if !current.contains("nightly") { return Err(format!("Need a nightly compiler; have {}", current).into()); - } - } - Toolchain::Stable => { + }, + Toolchain::Stable => if current.contains("nightly") || current.contains("beta") { return Err(format!("Need a stable compiler; have {}", current).into()); - } - } + }, Toolchain::Msrv => { let manifest_path = sh.current_dir().join("Cargo.toml"); @@ -67,25 +66,17 @@ fn get_msrv_from_manifest(manifest_path: &Path) -> Result"] -license = "CC0-1.0" -repository = "https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools/" -description = "Tool for checking various release related things." -categories = [] -keywords = [] -readme = "README.md" -edition = "2021" -rust-version = "1.74.0" - -[dependencies] -anyhow = { version = "1.0.82", default-features = false, features = ["std"] } -clap = { version = "4.5.4", default-features = false, features = ["std", "color", "help", "usage", "error-context", "suggestions", "derive", "cargo"] } -crates_io_api = { version = "0.11.0", default-features = false, features = ["rustls"] } -semver = { version = "1.0.22", default-features = false, features = ["std"] } -serde_json = { version = "1.0.116", default-features = false, features = [] } -serde = { version = "1.0.198", features = ["derive"] } -tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros"] } -toml = { version = "0.8.12", default-features = false, features = ["display", "parse"] } diff --git a/releases/README.md b/releases/README.md deleted file mode 100644 index 4bfc999..0000000 --- a/releases/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Releases Tool -============= - -This crate provides a tool for doing various release related checks. diff --git a/releases/releases.json b/releases/releases.json deleted file mode 100644 index 99cef45..0000000 --- a/releases/releases.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "org": "gihub.com/rust-bitcoin", - "latests": [ - { "package": "bitcoincore-rpc", "version": "0.18.0" }, - { "package": "bitcoincore-rpc-json", "version": "0.18.0"}, - { "package": "miniscript", "version": "11.0.0" }, - { "package": "bitcoin", "version": "0.32.0" }, - { "package": "base58ck", "version": "0.1.0" }, - { "package": "bech32", "version": "0.11.0" }, - { "package": "bitcoin_hashes", "version": "0.14.0" }, - { "package": "hex-conservative", "version": "0.2.0" }, - { "package": "hex_lit", "version": "0.1.1" }, - { "package": "bitcoin-internals", "version": "0.3.0" }, - { "package": "bitcoin-io", "version": "0.1.2" }, - { "package": "secp256k1", "version": "0.29.0" }, - { "package": "units", "version": "0.1.0" }, - { "package": "ordered", "version": "0.2.2" }, - { "package": "bitcoinconsensus", "version": "0.106.0+26.0" } - ], - "releases": [ - { "package": "bitcoincore-rpc", "version": "0.18.0", "dependencies": - [ - { "package": "bitcoincore-rpc-json", "version": "0.18.0"}, - { "package": "log", "version": "0.4.5"}, - { "package": "jsonrpc", "version": "0.14.0"}, - { "package": "serde", "version": "1.0.156" }, - { "package": "serde_json", "version": "1.0.96" } - ] - }, - { "package": "bitcoincore-rpc", "version": "0.18.0", "dependencies": - [ - { "package": "serde", "version": "1.0.156" }, - { "package": "serde_json", "version": "1.0.96" }, - { "package": "bitcoin", "version": "0.31.0" } - ] - }, - { "package": "miniscript", "version": "11.0.0", "dependencies": - [ - { "package": "bitcoin", "version": "0.31.0" }, - { "package": "bitcoin-internals", "version": "0.2.0" }, - { "package": "bech32", "version": "0.10.0-beta" }, - { "package": "serde", "version": "1.0.103" } - ] - }, - { "package": "bitcoin", "version": "0.32.0-rc1", "dependencies": - [ - { "package": "base58ck", "version": "0.1.0" }, - { "package": "bech32", "version": "0.11.0" }, - { "package": "bitcoin_hashes", "version": "0.14.0" }, - { "package": "hex-conservative", "version": "0.2.0" }, - { "package": "hex_lit", "version": "0.1.1" }, - { "package": "bitcoin-internals", "version": "0.3.0" }, - { "package": "bitcoin-io", "version": "0.1.1" }, - { "package": "secp256k1", "version": "0.29.0" }, - { "package": "units", "version": "0.1.0" }, - { "package": "base64", "version": "0.21.3" }, - { "package": "ordered", "version": "0.2.0" }, - { "package": "bitcoinconsensus", "version": "0.105.0" }, - { "package": "serde", "version": "1.0.103" } - ] - }, - { "package": "bitcoin", "version": "0.31.2", "dependencies": - [ - { "package": "bitcoin-internals", "version": "0.2.0" }, - { "package": "hex-conservative", "version": "0.1.1" }, - { "package": "bech32", "version": "0.10.0-beta" }, - { "package": "bitcoin_hashes", "version": "0.13.0" }, - { "package": "secp256k1", "version": "0.28.0" }, - { "package": "bitcoinconsensus", "version": "0.20.2-0.5.0" }, - { "package": "hex_lit", "version": "0.1.1" }, - { "package": "base64", "version": "0.21.3" }, - { "package": "core2", "version": "0.3.2" }, - { "package": "serde", "version": "1.0.103" } - ] - }, - { "package": "base58ck", "version": "0.1.0", "dependencies": - [ - { "package": "bitcoin_hashes", "version": "0.14.0" }, - { "package": "bitcoin-internals", "version": "0.3.0" } - ] - }, - { "package": "bitcoin_hashes", "version": "0.13.0", "dependencies": - [ - { "package": "bitcoin-internals", "version": "0.2.0" }, - { "package": "hex-conservative", "version": "0.1.1" }, - { "package": "schemars", "version": "0.8.3" }, - { "package": "serde", "version": "1.0.0" }, - { "package": "core2", "version": "0.3.2" } - ] - }, - { "package": "bitcoin-internals", "version": "0.2.0", "dependencies": - [ - { "package": "serde", "version": "1.0.103" } - ] - }, - { "package": "bech32", "version": "0.10.0-beta", "dependencies": [] }, - { "package": "secp256k1", "version": "0.28.0", "dependencies": - [ - { "package": "secp256k1-sys", "version": "0.9.0" }, - { "package": "bitcoin_hashes", "version": "0.13.0" }, - { "package": "rand", "version": "0.8.0" } - ] - }, - { "package": "secp256k1-sys", "version": "0.9.0", "dependencies": [] }, - { "package": "hex-conservative", "version": "0.1.1", "dependencies": - [ - { "package": "core2", "version": "0.3.2" } - ] - }, - { "package": "bitcoinconsensus", "version": "0.20.2-0.5.0", "dependencies": - [ - { "package": "libc", "version": "0.2.0" } - ] - } - ] -} diff --git a/releases/src/api.rs b/releases/src/api.rs deleted file mode 100644 index 7649861..0000000 --- a/releases/src/api.rs +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 - -//! Interact with the crates.io API. - -pub fn latest_release(package: &str) -> Release { todo!() } diff --git a/releases/src/json.rs b/releases/src/json.rs deleted file mode 100644 index 0740edb..0000000 --- a/releases/src/json.rs +++ /dev/null @@ -1,39 +0,0 @@ -//! Types that represent the JSON schema and provide deserialization. -//! -//! We deserialize to Rust std types then convert to more strictly typed types manually. - -#![allow(dead_code)] // This is just the JSON schemar, all fields exist. - -use serde::Deserialize; - -/// The `releases.json` config file. -#[derive(Debug, Deserialize)] -pub struct Config { - /// The github organisation this config file relates to. - pub org: String, - /// List of the latest releases. - pub latests: Vec, - /// List of all releases we run checks against. - pub releases: Vec, -} - -/// As specific version of a crate. -#[derive(Debug, Deserialize)] -pub struct CrateVersion { - /// The crate's package name on crates.io - pub package: String, - /// The dependencies semantic version number. - pub version: String, -} - -/// A version of one of the crates along with a list of its dependencies (and their versions) - used -/// to make a dependency graph. -#[derive(Debug, Deserialize)] -pub struct CrateNode { - /// The crate's package name on crates.io - pub package: String, - /// The release's semantic version number. - pub version: String, - /// List of this releases dependencies. - pub dependencies: Vec, -} diff --git a/releases/src/lib.rs b/releases/src/lib.rs deleted file mode 100644 index 5e9197a..0000000 --- a/releases/src/lib.rs +++ /dev/null @@ -1,114 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 - -//! Tool to check various release related things. - -// Coding conventions. -#![warn(missing_docs)] - -use std::fmt; - -use anyhow::bail; -use semver::Version; - -pub mod json; - -/// The state of the rust-bitcoin org that this tool aims to run checks on. -#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct Config { - /// List of the latest releases. - pub latests: Vec, - /// The releases we want to check. - pub releases: Vec, -} - -impl Config { - /// Returns the latest release of the given crate. - pub fn latest(&self, package: &str) -> anyhow::Result { - let mut want = None; - for latest in self.latests.iter() { - if latest.package == package { - want = Some(latest.version.clone()); - } - } - if want.is_none() { - bail!("package {} is not listed in latest section of config file", package); - } - - let mut found = Version::parse("0.0.0").expect("valid zero version"); - let mut release = None; - for r in self.releases.iter() { - if r.package == package && r.version > found { - found = r.version.clone(); - release = Some(r); - } - } - match release { - Some(r) => { - if r.version != want.expect("checked above") { - bail!("the latest version in the releases section for {} does not match the verison in the latest section", package); - } - Ok(r.version.clone()) - } - None => bail!("we don't have a release in the config file for {}", package), - } - } -} - -impl TryFrom for Config { - type Error = semver::Error; - - fn try_from(json: json::Config) -> Result { - let latests: Result, _> = json.latests.into_iter().map(TryFrom::try_from).collect(); - let releases: Result, _> = - json.releases.into_iter().map(TryFrom::try_from).collect(); - Ok(Self { latests: latests?, releases: releases? }) - } -} - -/// As specific version of a crate. -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct CrateVersion { - /// The crate's package name on crates.io - pub package: String, - /// The dependencies semantic version number. - pub version: Version, -} - -impl TryFrom for CrateVersion { - type Error = semver::Error; - - fn try_from(json: json::CrateVersion) -> Result { - Ok(Self { package: json.package, version: Version::parse(&json.version)? }) - } -} - -/// A version of one of the crates that lives in the github.com/rust-bitcoin org. -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct CrateNode { - /// The crate this release is for. - pub package: String, - /// The release's semantic version number. - pub version: Version, - /// List of this releases dependencies. - pub dependencies: Vec, -} - -impl fmt::Display for CrateNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{} {}", self.package, self.version) - } -} - -impl TryFrom for CrateNode { - type Error = semver::Error; - - fn try_from(json: json::CrateNode) -> Result { - let mut dependencies = vec![]; - for d in json.dependencies { - let converted = CrateVersion::try_from(d)?; - dependencies.push(converted); - } - - Ok(Self { package: json.package, version: Version::parse(&json.version)?, dependencies }) - } -} diff --git a/releases/src/main.rs b/releases/src/main.rs deleted file mode 100644 index 22f3fbe..0000000 --- a/releases/src/main.rs +++ /dev/null @@ -1,252 +0,0 @@ -use std::path::{Path, PathBuf}; -use std::time::Duration; -use std::{fs, process}; - -use anyhow::Context; -use clap::{arg, command, value_parser, Command}; -use crates_io_api::AsyncClient; -use releases::{json, Config, CrateVersion}; -use semver::Version; -use toml::Table; - -/// A green tick in UTF-8. -const TICK: &str = "\x1b[92m\u{2713}\x1b[0m"; - -/// A red cross in UTF-8. -const CROSS: &str = "\x1b[91m\u{2717}\x1b[0m"; - -/// API rate limit. -const RATE_LIMIT_MILLIS: u64 = 100; - -/// The json file with all the versions in it. -const DEFAULT_CONFIG_FILE: &str = "./releases.json"; - -// (Tobin) I'm not sure what this email address is used for, I guess its as a point of contact for -// API abuse - if that is the case then using an address that will get back to me is ok. -const DEFAULT_USER_AGENT: &str = "releases_bot (releases_bot@tobin.cc)"; - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - // FIXME: I can't get clap to set these with `.default_value`? - let mut config_file = PathBuf::from(DEFAULT_CONFIG_FILE); - let mut user_agent = DEFAULT_USER_AGENT; - - let matches = command!() // requires `cargo` feature - .arg( - arg!( - --user_agent "Set the user agent" - ) - .required(false) - .value_parser(value_parser!(String)), - ) - .arg( - arg!( - -c --config "Sets a custom config file" - ) - .required(false) - .value_parser(value_parser!(PathBuf)), - ) - .arg( - arg!( - -d --debug ... "Turn debugging information on" - ) - .required(false) - .value_parser(value_parser!(u8)), - ) - .subcommand( - Command::new("show-latest-releases") - .about("show latest expected releases from config file"), - ) - .subcommand( - Command::new("check-latest-releases").about( - "check latest releases from config file against latest releases on crates.io", - ), - ) - .subcommand( - Command::new("check-latest-dependencies") - .about( - "check repo uses the latest releases (from crates.io) for all its dependencies", - ) - .arg( - arg!([repository] "Path to the repository to check") - .required(true) - .value_parser(value_parser!(PathBuf)), - ) - .arg( - arg!([crate_name] "Crate name (only required for workspace)") - .required(false) - .value_parser(value_parser!(String)), - ), - ) - .get_matches(); - - // Flags can have multiple occurrences, but we don't currently support verbose debugging output. - let debug = *matches.get_one::("debug").expect("Count's are defaulted"); - if debug > 0 { - println!("Debugging is on"); - } - - if let Some(file) = matches.get_one::("config") { - config_file = file.to_path_buf(); - } - if debug > 0 { - println!("Using config file: {}", config_file.display()); - } - - if let Some(agent) = matches.get_one::("user_agent") { - user_agent = agent; - } - - let config = read_config_file(&config_file)?; - - if matches.subcommand_matches("show-latest-releases").is_some() { - show_releases(&config.latests)?; - process::exit(0); - } - - // Everything else needs the API client. - let cli = AsyncClient::new(user_agent, Duration::from_millis(RATE_LIMIT_MILLIS))?; - - if matches.subcommand_matches("check-latest-releases").is_some() { - check_latest_releases(&cli, &config.latests, debug).await?; - process::exit(0); - } - - if let Some(sub) = matches.subcommand_matches("check-latest-dependencies") { - let repo = sub.get_one::("repository").expect("missing directory argument"); - let crate_name = sub.get_one::("crate_name"); - check_latest_dependencies(&cli, repo, crate_name, debug).await?; - } - - Ok(()) -} - -fn read_config_file(file: &Path) -> anyhow::Result { - let data = fs::read_to_string(file)?; - let json: json::Config = serde_json::from_str(&data)?; - let config = Config::try_from(json)?; - - Ok(config) -} - -/// Prints a list of `releases`. -fn show_releases(releases: &[CrateVersion]) -> anyhow::Result<()> { - println!(); - for release in releases { - println!(" - {:20} {}", release.package, release.version); - } - - Ok(()) -} - -/// Checks the releases in `latests` against the latest releases on crates.io -async fn check_latest_releases( - cli: &AsyncClient, - latests: &[CrateVersion], - _debug: u8, -) -> anyhow::Result<()> { - let mut found_stale = false; - - println!( - "\nChecking release versions in config file against the latest release on crates.io\n" - ); - - for latest in latests { - let released = api_latest(cli, &latest.package).await?; - if latest.version != released { - found_stale = true; - println!( - "Latest crates.io release {} {} does not match the config file latest version {}", - latest.package, released, latest.version - ); - } else { - println!("{} {} \x1b[92m\u{2713}\x1b[0m", latest.package, latest.version); - } - } - - if !found_stale { - println!("\nAll releases on crates.io match those in the config file") - } - Ok(()) -} - -/// Checks if a crate in `crate_dir` is using the latest dependencies released on `crates.io`. -async fn check_latest_dependencies( - cli: &AsyncClient, - repo_dir: &Path, - crate_name: Option<&String>, - _debug: u8, -) -> anyhow::Result<()> { - let mut path = repo_dir.to_path_buf(); - if let Some(name) = crate_name { - path.push(name); - }; - path.push("Cargo.toml"); - - let crate_name = match crate_name { - Some(name) => name, - // next_back is equivalent to last() but more efficient - None => repo_dir.iter().next_back().expect("invalid repository").to_str().unwrap(), - }; - - let data = fs::read_to_string(&path) - .with_context(|| format!("Failed to read manifest from {}", path.display()))?; - - let manifest = data.parse::()?; - - let package_section = manifest["package"].as_table().expect("manifest has package section"); - let crate_version = package_section.get("version").expect("all crates have a version"); - - println!("\nChecking latest dependencies for:"); - println!(" crate: {}", crate_name); - println!(" version: {}", crate_version); - println!(" manifest: {}", path.display()); - println!(); - - let dependencies_section = - manifest["dependencies"].as_table().expect("manifest has dependencies section"); - let mut deps: Vec = dependencies_section.keys().map(Clone::clone).collect(); - deps.sort(); - for key in deps { - let value = dependencies_section.get(&key).expect("we know this key exists"); - let package = match value.as_table() { - Some(t) => match t.get("package") { - Some(v) => v.as_str().unwrap_or(&key), - None => &key, - }, - None => &key, - }; - let version = match value.as_table() { - Some(t) => match t.get("version") { - Some(v) => v.as_str(), - None => None, - }, - None => value.as_str(), - }; - - let latest = api_latest(cli, package).await?; - - // If version is not specified in the manifest cargo uses latest. - match version { - Some(version) => { - let version = Version::parse(version)?; - if latest.major != version.major || latest.minor != version.minor { - println!(" - {:20} {} {} latest: {}", package, CROSS, version, latest); - } else if latest.patch != version.patch { - println!(" - {:20} {} {} latest: {}", package, TICK, version, latest); - } else { - println!(" - {:20} {} {}", package, TICK, latest); - } - } - None => println!(" - {:20} {}", package, latest), - }; - } - - Ok(()) -} - -/// Gets the latest released version of `package` from `crates.io`. -async fn api_latest(cli: &AsyncClient, package: &str) -> anyhow::Result { - let response = cli.get_crate(package).await?; - Ok(Version::parse(&response.crate_data.max_version)?) -} diff --git a/releases/src/toml.rs b/releases/src/toml.rs deleted file mode 100644 index 17d9f2d..0000000 --- a/releases/src/toml.rs +++ /dev/null @@ -1,30 +0,0 @@ -//! Types that represent a Rust crate manifest. -// Chronic NIH syndrome. - -use serde::Deserialize; - -#[derive(Deserialize)] -struct Manifest { - package: Package, - dependencies: Dependencies, -} - -#[derive(Deserialize)] -struct Package { - name: String, - version: String, - authors: Vec, - license: String, - repository: String, - description: String, - categories: Vec, - keywords: Vec, - readme: String, - edition: String, - rust_version: String, -} - -#[derive(Deserialize)] -struct Dependencies { - -} diff --git a/releases/rustfmt.toml b/rustfmt.toml similarity index 95% rename from releases/rustfmt.toml rename to rustfmt.toml index 93e688a..c3f75be 100644 --- a/releases/rustfmt.toml +++ b/rustfmt.toml @@ -4,7 +4,7 @@ tab_spaces = 4 newline_style = "Auto" indent_style = "Block" -max_width = 100 # This is number of characters. +max_width = 100 # This is the number of characters. # `use_small_heuristics` is ignored if the granular width config values are explicitly set. use_small_heuristics = "Max" # "Max" == All granular width settings same as `max_width`. # # Granular width configuration settings. These are percentages of `max_width`. @@ -58,7 +58,7 @@ match_block_trailing_comma = false blank_lines_upper_bound = 1 blank_lines_lower_bound = 0 edition = "2021" -version = "One" +style_edition = "2021" inline_attribute_width = 0 format_generated_files = true merge_derives = true @@ -70,7 +70,7 @@ color = "Auto" unstable_features = false disable_all_formatting = false skip_children = false -hide_parse_errors = false +show_parse_errors = true error_on_line_overflow = false error_on_unformatted = false emit_mode = "Files"