diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 1240d40..d39704c 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -25,4 +25,4 @@ jobs: - name: Install MSRV run: cargo install cargo-msrv --locked -q - name: Verify MSRV - run: cargo msrv verify + run: cargo msrv verify -- cargo install --locked --path . diff --git a/Cargo.lock b/Cargo.lock index bee260f..6742842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.7" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -33,36 +33,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -100,15 +100,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bstr" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "regex-automata", @@ -132,9 +132,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -167,9 +167,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -178,15 +178,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -285,36 +285,28 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crossterm" @@ -341,6 +333,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "diff" version = "0.1.13" @@ -361,21 +359,31 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -402,9 +410,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -417,9 +425,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -427,15 +435,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -444,15 +452,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", @@ -461,15 +469,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -479,9 +487,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -497,9 +505,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -514,15 +522,19 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "half" -version = "1.8.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", +] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -532,9 +544,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" [[package]] name = "histo" @@ -553,9 +565,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "indexmap" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", "hashbrown", @@ -563,13 +575,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys 0.48.0", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -583,33 +595,24 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -622,15 +625,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -650,24 +653,15 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "log", @@ -677,18 +671,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" @@ -767,13 +761,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ "anstyle", "difflib", - "itertools 0.11.0", "predicates-core", ] @@ -805,9 +798,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -853,9 +846,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -863,9 +856,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -882,9 +875,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -894,9 +887,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -911,9 +904,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "relative-path" -version = "1.9.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "rstest" @@ -955,11 +948,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -968,9 +961,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -1081,9 +1074,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "streaming-stats" @@ -1096,9 +1089,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "syn" @@ -1113,26 +1106,16 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] -[[package]] -name = "termcolor" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" -dependencies = [ - "winapi-util", -] - [[package]] name = "termtree" version = "0.4.1" @@ -1141,18 +1124,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", @@ -1177,9 +1160,9 @@ checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" dependencies = [ "indexmap", "toml_datetime", @@ -1262,9 +1245,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1272,9 +1255,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", @@ -1287,9 +1270,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1297,9 +1280,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", @@ -1310,15 +1293,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -1489,9 +1472,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.18" +version = "0.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29" dependencies = [ "memchr", ] @@ -1504,7 +1487,7 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zepter" -version = "1.1.0" +version = "1.1.1" dependencies = [ "anyhow", "assert_cmd", @@ -1515,7 +1498,7 @@ dependencies = [ "env_logger", "glob", "histo", - "itertools 0.12.0", + "itertools 0.12.1", "lazy_static", "log", "pretty_assertions", diff --git a/Cargo.toml b/Cargo.toml index 3a0678f..28145bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "zepter" -version = "1.1.0" +version = "1.1.1" edition = "2021" authors = [ "Oliver Tale-Yazdi" ] description = "Analyze, Fix and Format features in your Rust workspace." license = "GPL-3.0-only" repository = "https://github.com/ggwpez/zepter" # Update the README if you change this: -rust-version = "1.70" +rust-version = "1.74" [[bin]] name = "zepter" @@ -21,23 +21,22 @@ required-features = [ "benchmarking" ] anyhow = { version = "1.0.79", optional = true } assert_cmd = { version = "2.0.13", optional = true } cargo_metadata = "0.18.1" -clap = { version = "4.4.18", features = ["derive", "cargo"] } +clap = { version = "4.5.0", features = ["derive", "cargo"] } colour = { version = "0.7.0", optional = true } criterion = { version = "0.5", optional = true } -env_logger = { version = "0.10.2", features = [ "auto-color", "humantime" ], optional = true } -histo = "1.0.0" -itertools = "0.12.0" +env_logger = { version = "0.11.1", features = [ "auto-color", "humantime" ], optional = true } +histo = { version = "1.0.0", optional = true } +itertools = "0.12.1" log = { version = "0.4.20", optional = true } semver = "1" serde = "1.0.196" -serde_json = "1.0.113" +serde_json = { version = "1.0.113", optional = true } serde_yaml = "0.9.31" -tempfile = { version = "3.9.0", optional = true } -toml_edit = "0.21.0" +tempfile = { version = "3.10.0", optional = true } +toml_edit = "0.22.4" tracing = { version = "0.1.40", optional = true } [dev-dependencies] -anyhow = "1.0.79" glob = "0.3.1" lazy_static = "1.4.0" pretty_assertions = "1.4.0" @@ -48,11 +47,10 @@ zepter = { path = ".", features = ["testing"] } [features] default = [ "logging" ] - logging = [ "dep:env_logger", "dep:log" ] -benchmarking = [ "dep:criterion" ] - -testing = [ "dep:anyhow", "dep:assert_cmd", "dep:colour", "dep:tempfile" ] +benchmarking = [ "dep:criterion", "dep:serde_json" ] +testing = [ "dep:anyhow", "dep:assert_cmd", "dep:colour", "dep:tempfile", "dep:serde_json" ] +debugging = [ "dep:histo" ] [profile.dev] opt-level = 3 diff --git a/README.md b/README.md index 2a08380..7f43d2b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Rust](https://github.com/ggwpez/zepter/actions/workflows/rust.yml/badge.svg)](https://github.com/ggwpez/zepter/actions/workflows/rust.yml) [![crates.io](https://img.shields.io/crates/v/zepter.svg)](https://crates.io/crates/zepter) -![MSRV](https://img.shields.io/badge/MSRV-1.70-informational) +![MSRV](https://img.shields.io/badge/MSRV-1.74-informational) [![docs.rs](https://img.shields.io/docsrs/zepter)](https://docs.rs/zepter/latest/zepter) Analyze, Fix and Format features in your Rust workspace. The goal of this tool is to have this CI ready to prevent common errors with Rust features. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 0ccc416..15bfcc8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-07-24" +channel = "nightly-2024-01-10" components = [ "rustfmt", "clippy" ] profile = "minimal" diff --git a/src/autofix.rs b/src/autofix.rs index 9621cd4..f5d351e 100644 --- a/src/autofix.rs +++ b/src/autofix.rs @@ -466,7 +466,6 @@ impl AutoFixer { let dep = deps.get_mut(dname).unwrap(); Self::lift_some_dependency(dep, default_feats)?; - //deps.key_decor_mut(dname).unwrap().set_suffix(""); } Ok(()) } diff --git a/src/cmd/debug.rs b/src/cmd/debug.rs index 8178532..e94d1fa 100644 --- a/src/cmd/debug.rs +++ b/src/cmd/debug.rs @@ -1,11 +1,12 @@ // SPDX-License-Identifier: GPL-3.0-only // SPDX-FileCopyrightText: Oliver Tale-Yazdi -use super::{lint::CrateAndFeature, GlobalArgs}; -use crate::{cmd::lint::build_feature_dag, prelude::Dag}; +use super::GlobalArgs; +use crate::cmd::lint::build_feature_dag; +#[cfg(feature = "debugging")] +use crate::{cmd::lint::CrateAndFeature, prelude::Dag}; use cargo_metadata::Metadata; -use histo::Histogram; use std::time::{Duration, Instant}; #[derive(Debug, clap::Parser)] @@ -33,15 +34,19 @@ impl DebugCmd { println!("Num workspace members: {}", meta.workspace_members.len()); println!("Num dependencies: {}", meta.packages.len()); println!("DAG nodes: {}, links: {}", dag.num_nodes(), dag.num_edges()); + + #[cfg(feature = "debugging")] self.connectivity_buckets(&dag); + if !self.no_benchmark { let (took, points) = Self::measure(&meta); println!("DAG setup time: {:.2?} (avg from {} runs)", took, points); } } + #[cfg(feature = "debugging")] pub fn connectivity_buckets(&self, dag: &Dag) { - let mut histogram = Histogram::with_buckets(10); + let mut histogram = histo::Histogram::with_buckets(10); for node in dag.lhs_nodes() { histogram.add(dag.degree(node) as u64); diff --git a/src/cmd/lint.rs b/src/cmd/lint.rs index a61269b..ca26056 100644 --- a/src/cmd/lint.rs +++ b/src/cmd/lint.rs @@ -253,13 +253,25 @@ impl core::str::FromStr for IgnoreSetting { } impl LintCmd { - pub(crate) fn run(&self, global: &GlobalArgs) { + pub(crate) fn run(&self, global: &GlobalArgs) -> Result<(), String> { match &self.subcommand { SubCommand::PropagateFeature(cmd) => cmd.run(global), - SubCommand::NeverEnables(cmd) => cmd.run(global), - SubCommand::NeverImplies(cmd) => cmd.run(global), - SubCommand::WhyEnabled(cmd) => cmd.run(global), - SubCommand::OnlyEnables(cmd) => cmd.run(global), + SubCommand::NeverEnables(cmd) => { + cmd.run(global); + Ok(()) + }, + SubCommand::NeverImplies(cmd) => { + cmd.run(global); + Ok(()) + }, + SubCommand::WhyEnabled(cmd) => { + cmd.run(global); + Ok(()) + }, + SubCommand::OnlyEnables(cmd) => { + cmd.run(global); + Ok(()) + }, } } } @@ -402,13 +414,15 @@ impl NeverEnablesCmd { } impl PropagateFeatureCmd { - pub fn run(&self, global: &GlobalArgs) { - let meta = self.cargo_args.load_metadata().expect("Loads metadata"); + pub fn run(&self, global: &GlobalArgs) -> Result<(), String> { + let meta = self.cargo_args.load_metadata()?; let dag = build_feature_dag(&meta, &meta.packages); for feature in self.features.iter() { self.run_feature(&meta, &dag, feature.clone(), global); } + + Ok(()) } fn run_feature( @@ -516,17 +530,14 @@ impl PropagateFeatureCmd { propagate_missing.entry(pkg.id.to_string()).or_default().insert(dep); } } - let faulty_crates: BTreeSet = propagate_missing - .keys() - .chain(feature_missing.keys()) - //.chain(feature_maybe_unused.iter()) - .cloned() - .collect(); - - let (mut errors, warnings) = (0, 0); - let mut fixes = 0; - for krate in faulty_crates { - let krate = lookup(&krate); + let faulty_crates: BTreeSet = + propagate_missing.keys().chain(feature_missing.keys()).cloned().collect(); + let mut faulty_crates = + faulty_crates.into_iter().map(|id| (lookup(&id), id)).collect::>(); + faulty_crates.sort_by(|(a, _), (b, _)| a.name.cmp(&b.name)); + + let (mut errors, mut fixes) = (0, 0); + for (krate, _) in faulty_crates { let in_workspace = meta.workspace_members.iter().any(|m| m == &krate.id); // check if we can modify in allowed_dir let krate_path = canonicalize(krate.manifest_path.clone().into_std_path_buf()).unwrap(); @@ -556,13 +567,13 @@ impl PropagateFeatureCmd { println!("crate {krate_str}\n feature '{}'", feature); if let Some(deps) = feature_missing.get(&krate.id.to_string()) { - let joined = - deps.iter().map(|dep| dep.display_name()).collect::>().join("\n "); + let mut named = deps.iter().map(RenamedPackage::display_name).collect::>(); + named.sort(); println!( " is required by {} dependenc{}:\n {}", deps.len(), if deps.len() == 1 { "y" } else { "ies" }, - joined + named.join("\n "), ); if self.fixer_args.enable && @@ -581,14 +592,14 @@ impl PropagateFeatureCmd { } if let Some(deps) = propagate_missing.get(&krate.id.to_string()) { - let joined = - deps.iter().map(|dep| dep.display_name()).collect::>().join("\n "); - println!(" must propagate to:\n {joined}"); + let mut named = deps.iter().map(RenamedPackage::display_name).collect::>(); + named.sort(); + println!(" must propagate to:\n {}", named.join("\n ")); if self.fixer_args.enable && self.fix_package.as_ref().map_or(true, |p| p == &krate.name) { - for dep in deps { + for dep in deps.iter() { let dep_name = dep.name(); if !self.fix_dependency.as_ref().map_or(true, |d| d == &dep_name) { continue @@ -618,7 +629,7 @@ impl PropagateFeatureCmd { } } } - if let Some(e) = error_stats(errors, warnings, fixes, self.fixer_args.enable, global) { + if let Some(e) = error_stats(errors, 0, fixes, self.fixer_args.enable, global) { println!("{}", e); } diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 8d69836..2131fca 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -94,10 +94,7 @@ impl Command { cmd.run(&self.global); Ok(()) }, - Some(SubCommand::Lint(cmd)) => { - cmd.run(&self.global); - Ok(()) - }, + Some(SubCommand::Lint(cmd)) => cmd.run(&self.global), Some(SubCommand::Format(cmd)) => { cmd.run(&self.global); Ok(()) @@ -181,7 +178,7 @@ impl GlobalArgs { } /// Arguments for how to load cargo metadata from a workspace. -#[derive(Debug, Clone, clap::Parser)] +#[derive(Debug, Clone, clap::Parser, PartialEq)] pub struct CargoArgs { /// Cargo manifest path or directory. /// @@ -205,18 +202,30 @@ pub struct CargoArgs { #[clap(long, global = true)] pub all_features: bool, - - #[clap(long = "debug-keep-meta")] - pub keep_meta: Option, } impl CargoArgs { + pub fn with_workspace(mut self, workspace: bool) -> Self { + self.workspace = workspace; + self + } + /// Load the metadata of the rust project. pub fn load_metadata(&self) -> Result { - self.load_metadata_unsorted() + let err = match self.load_metadata_unsorted() { + Ok(meta) => return Ok(meta), + Err(err) => err, + }; + + if check_for_locked_error(&err) { + Err("\nThe Cargo.lock file needs to be updated first since --locked is present.\n" + .to_string()) + } else { + Err(err) + } } - pub fn load_metadata_unsorted(&self) -> Result { + fn load_metadata_unsorted(&self) -> Result { let mut cmd = MetadataCommand::new(); if let Some(ref manifest_path) = self.manifest_path { @@ -240,17 +249,14 @@ impl CargoArgs { cmd.other_options(vec!["--locked".to_string()]); } - let meta = cmd.exec().map_err(|e| format!("Failed to load metadata: {e}"))?; - - if let Some(path) = &self.keep_meta { - std::fs::write(path, serde_json::to_string_pretty(&meta).unwrap()).unwrap(); - log::info!("Wrote metadata to {}", path.display()); - } - - Ok(meta) + cmd.exec().map_err(|e| format!("Failed to load metadata: {e}")) } } +fn check_for_locked_error(err: &str) -> bool { + err.contains("needs to be updated but --locked was passed to prevent this") +} + /// Resolve the dependency `dep` of `pkg` within the metadata. /// /// This checks whether the dependency is a workspace or external crate and resolves it accordingly. @@ -331,7 +337,7 @@ impl Ord for RenamedPackage { // Yikes... dafuq is this?! //bincode::serialize(self).unwrap().cmp(&bincode::serialize(other).unwrap()) - self.pkg.id.cmp(&other.pkg.id) + (&self.pkg.name, &self.pkg.id).cmp(&(&other.pkg.name, &other.pkg.id)) } } diff --git a/src/cmd/transpose.rs b/src/cmd/transpose.rs index c168410..9a82c7b 100644 --- a/src/cmd/transpose.rs +++ b/src/cmd/transpose.rs @@ -135,9 +135,7 @@ impl LiftToWorkspaceCmd { return Err("Cannot use --exact-version without --version-resolver=exact".to_string()) } - let mut args = self.cargo_args.clone(); - args.workspace = true; - let meta = args.load_metadata()?; + let meta = self.cargo_args.clone().with_workspace(true).load_metadata()?; log::debug!("Scanning workspace for '{}'", self.dependency); // version -> crate let mut by_version = HashMap::>::new(); @@ -240,7 +238,7 @@ impl LiftToWorkspaceCmd { fixer.add_workspace_dep(&dep, false)?; let mut modified = 0; - for (pkg, fixer) in fixers.values_mut() { + for (_pkg, fixer) in fixers.values_mut() { if !fixer.modified() { continue } @@ -249,7 +247,7 @@ impl LiftToWorkspaceCmd { if self.fix { fixer.save()?; } else { - log::debug!("Would modify {:?}", pkg.name); + log::debug!("Would modify {:?}", _pkg.name); } } if fixer.modified() { @@ -304,10 +302,8 @@ fn try_find_latest<'a, I: Iterator>(reqs: I) -> Result Result { if let Some(path) = &self.config { - let path = canonicalize(path).expect("Must canonicalize path"); + let path = canonicalize(path).err_to_str()?; if path.exists() { Ok(path) @@ -111,23 +111,21 @@ impl ConfigArgs { fn locate_workspace(&self) -> Result { let mut cmd = std::process::Command::new("cargo"); - cmd.arg("locate-project").args(["--workspace", "--offline", "--locked"]); + cmd.arg("locate-project").args([ + "--message-format", + "plain", + "--workspace", + "--offline", + "--locked", + ]); if let Some(path) = &self.manifest_path { cmd.arg("--manifest-path").arg(path); } - let output = cmd.output().expect("Failed to run `cargo locate-project`"); + let output = cmd.output().err_to_str()?; let path = output.stdout; - let path = - String::from_utf8(path).expect("Failed to parse output of `cargo locate-project`"); - let path: serde_json::Value = serde_json::from_str(&path).unwrap_or_else(|_| { - panic!( - "Failed to parse output of `cargo locate-project`: '{}'", - String::from_utf8_lossy(&output.stderr) - ) - }); - let path = path["root"].as_str().expect("Failed to parse output of `cargo locate-project`"); + let path = String::from_utf8(path).err_to_str()?; let path = PathBuf::from(path); - let root = path.parent().expect("Failed to get parent of workspace root"); + let root = path.parent().ok_or("Failed to find workspace root")?; Ok(root.into()) } diff --git a/src/lib.rs b/src/lib.rs index 4f0fdc7..8059ae8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,3 +79,14 @@ macro_rules! trace { } }; } + +/// Convert the error or a `Result` into a `String` error. +pub(crate) trait ErrToStr { + fn err_to_str(self) -> Result; +} + +impl ErrToStr for Result { + fn err_to_str(self) -> Result { + self.map_err(|e| format!("{}", e)) + } +} diff --git a/src/main.rs b/src/main.rs index 4741334..9b0ab7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use clap::Parser; use zepter::cmd::Command; -fn main() -> Result<(), String> { +fn main() -> Result<(), ()> { setup_logging(); // Need to remove this in case `cargo-zepter` is used: @@ -17,7 +17,7 @@ fn main() -> Result<(), String> { if let Err(err) = Command::parse_from(args).run() { eprintln!("{}", err); - Err("see log".into()) + Err(()) } else { Ok(()) } @@ -28,35 +28,17 @@ fn setup_logging() {} #[cfg(feature = "logging")] fn setup_logging() { - use env_logger::fmt::Color; use std::io::Write; env_logger::builder() .parse_env(env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "debug")) .format_timestamp(None) .format(|buf, record| { - let mut level_style = buf.style(); - level_style.set_bold(true); - - match record.level() { - log::Level::Error => { - level_style.set_color(Color::Red); - }, - log::Level::Warn => { - level_style.set_color(Color::Yellow); - }, - log::Level::Info => { - level_style.set_color(Color::White); - }, - log::Level::Debug => { - level_style.set_color(Color::Blue); - }, - log::Level::Trace => { - level_style.set_color(Color::Magenta); - }, - }; - - writeln!(buf, "[{}] {}", level_style.value(record.level()), record.args()) + let level_style = buf.default_level_style(record.level()).bold(); + let begin = level_style.render(); + let reset = level_style.render_reset(); + + writeln!(buf, "[{begin}{}{reset}] {}", record.level(), record.args()) }) .init(); } diff --git a/tests/integration/polkadot/issue-7261.yaml b/tests/integration/polkadot/issue-7261.yaml index 8cd65d9..04ded8e 100644 --- a/tests/integration/polkadot/issue-7261.yaml +++ b/tests/integration/polkadot/issue-7261.yaml @@ -7,8 +7,8 @@ cases: crate 'polkadot-test-runtime' feature 'std' must propagate to: - polkadot-runtime-parachains beefy-primitives (renamed from sp-consensus-beefy) + polkadot-runtime-parachains sp-mmr-primitives Found 3 issues and fixed 3 (all fixed). diff: "diff --git runtime/test-runtime/Cargo.toml runtime/test-runtime/Cargo.toml\nindex 6d38a0283d..97253325c5 100644\n--- runtime/test-runtime/Cargo.toml\n+++ runtime/test-runtime/Cargo.toml\n@@ -130,0 +131,3 @@ std = [\n+\t\"polkadot-runtime-parachains/std\",\n+\t\"beefy-primitives/std\",\n+\t\"sp-mmr-primitives/std\"\n" diff --git a/tests/integration/sdk/propagate.yaml b/tests/integration/sdk/propagate.yaml index 3bce609..4c99c70 100644 --- a/tests/integration/sdk/propagate.yaml +++ b/tests/integration/sdk/propagate.yaml @@ -750,8 +750,8 @@ cases: crate 'polkadot-node-metrics' feature 'runtime-benchmarks' must propagate to: - primitives (renamed from polkadot-primitives) polkadot-test-service + primitives (renamed from polkadot-primitives) sc-service crate 'polkadot-parachain' feature 'runtime-benchmarks' @@ -846,9 +846,9 @@ cases: pallet-timestamp pallet-vesting polkadot-parachain + polkadot-runtime-parachains primitives (renamed from polkadot-primitives) runtime-common (renamed from polkadot-runtime-common) - polkadot-runtime-parachains sp-runtime sp-staking xcm-executor @@ -905,9 +905,9 @@ cases: pallet-salary pallet-xcm polkadot-parachain - primitives (renamed from polkadot-primitives) polkadot-runtime-parachains polkadot-test-runtime + primitives (renamed from polkadot-primitives) sp-runtime crate 'xcm-executor' feature 'runtime-benchmarks' diff --git a/tests/integration/sdk/transpose.yaml b/tests/integration/sdk/transpose.yaml index d25f4c6..0ad4bd5 100644 --- a/tests/integration/sdk/transpose.yaml +++ b/tests/integration/sdk/transpose.yaml @@ -18,7 +18,7 @@ cases: Hint: cargo upgrade -p parity-scale-codec@3.6.5 - Error: "see log" + Error: () code: 1 - cmd: transpose dependency lift-to-workspace log stderr: | @@ -37,7 +37,7 @@ cases: Hint: cargo upgrade -p log@0.4.20 - Error: "see log" + Error: () code: 1 - cmd: transpose dependency lift-to-workspace log --version-resolver Unambiguous stderr: | @@ -52,7 +52,7 @@ cases: stderr: | [WARN] Unstable feature - do not rely on this! Held back modifications to 200 files; re-run with --fix to apply. - Error: "see log" + Error: () code: 1 - cmd: transpose dependency lift-to-workspace log --version-resolver exact stderr: | @@ -67,19 +67,19 @@ cases: stderr: | [WARN] Unstable feature - do not rely on this! Cannot use --exact-version without --version-resolver=exact - Error: "see log" + Error: () code: 1 - cmd: transpose dependency lift-to-workspace log --version-resolver exact --exact-version 0.4.20 stderr: | [WARN] Unstable feature - do not rely on this! Held back modifications to 200 files; re-run with --fix to apply. - Error: "see log" + Error: () code: 1 - cmd: zepter transpose dependency lift-to-workspace macro_magic stderr: | [WARN] Unstable feature - do not rely on this! Held back modifications to 3 files; re-run with --fix to apply. - Error: "see log" + Error: () code: 1 - cmd: zepter transpose dependency lift-to-workspace tt-call --version-resolver latest --fix stderr: | diff --git a/tests/integration/substrate/master-1.yaml b/tests/integration/substrate/master-1.yaml index b28454f..2a40391 100644 --- a/tests/integration/substrate/master-1.yaml +++ b/tests/integration/substrate/master-1.yaml @@ -69,8 +69,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'runtime-benchmarks' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'runtime-benchmarks' @@ -1149,8 +1149,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'runtime-benchmarks' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'runtime-benchmarks' @@ -2724,11 +2724,11 @@ cases: is required by 21 dependencies: chrono clap + codec (renamed from parity-scale-codec) frame-benchmarking frame-support frame-system log - codec (renamed from parity-scale-codec) rand sc-executor serde @@ -2755,9 +2755,9 @@ cases: feature 'std' is required by 9 dependencies: clap + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support - codec (renamed from parity-scale-codec) rand scale-info sp-arithmetic @@ -2770,11 +2770,11 @@ cases: crate 'frame-remote-externalities' feature 'std' is required by 10 dependencies: + codec (renamed from parity-scale-codec) frame-support futures log pallet-elections-phragmen - codec (renamed from parity-scale-codec) serde sp-core sp-io @@ -3322,9 +3322,9 @@ cases: crate 'mmr-gadget' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-consensus-beefy sp-core @@ -3455,9 +3455,11 @@ cases: feature 'std' is required by 33 dependencies: clap + codec (renamed from parity-scale-codec) frame-system frame-system-rpc-runtime-api futures + grandpa-primitives (renamed from sp-consensus-grandpa) kitchensink-runtime log node-primitives @@ -3467,7 +3469,6 @@ cases: pallet-im-online pallet-timestamp pallet-transaction-payment - codec (renamed from parity-scale-codec) platforms rand regex @@ -3477,7 +3478,6 @@ cases: sp-api sp-authority-discovery sp-consensus-babe - grandpa-primitives (renamed from sp-consensus-grandpa) sp-core sp-inherents sp-io @@ -3490,6 +3490,7 @@ cases: crate 'node-executor' feature 'std' is required by 28 dependencies: + codec (renamed from parity-scale-codec) frame-benchmarking frame-support frame-system @@ -3505,7 +3506,6 @@ cases: pallet-timestamp pallet-transaction-payment pallet-treasury - codec (renamed from parity-scale-codec) sc-executor scale-info sp-application-crypto @@ -3567,6 +3567,7 @@ cases: crate 'node-testing' feature 'std' is required by 17 dependencies: + codec (renamed from parity-scale-codec) frame-system futures kitchensink-runtime @@ -3575,7 +3576,6 @@ cases: pallet-asset-tx-payment pallet-assets pallet-transaction-payment - codec (renamed from parity-scale-codec) sc-executor sp-api sp-block-builder @@ -3676,6 +3676,7 @@ cases: crate 'pallet-election-provider-e2e-test' feature 'std' is required by 19 dependencies: + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support frame-system @@ -3686,7 +3687,6 @@ cases: pallet-session pallet-staking pallet-timestamp - codec (renamed from parity-scale-codec) scale-info sp-core sp-io @@ -3726,8 +3726,8 @@ cases: crate 'pallet-nomination-pools-benchmarking' feature 'std' must propagate to: - pallet-balances codec (renamed from parity-scale-codec) + pallet-balances scale-info crate 'pallet-nomination-pools-fuzzer' feature 'std' @@ -3743,6 +3743,7 @@ cases: crate 'pallet-nomination-pools-test-staking' feature 'std' is required by 17 dependencies: + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support frame-system @@ -3752,7 +3753,6 @@ cases: pallet-nomination-pools pallet-staking pallet-timestamp - codec (renamed from parity-scale-codec) scale-info sp-core sp-io @@ -3791,8 +3791,8 @@ cases: crate 'pallet-transaction-payment-rpc' feature 'std' is required by 6 dependencies: - pallet-transaction-payment-rpc-runtime-api codec (renamed from parity-scale-codec) + pallet-transaction-payment-rpc-runtime-api sp-api sp-core sp-runtime @@ -4079,10 +4079,10 @@ cases: crate 'sc-authority-discovery' feature 'std' is required by 12 dependencies: + codec (renamed from parity-scale-codec) futures log multihash - codec (renamed from parity-scale-codec) prost rand sp-api @@ -4094,9 +4094,9 @@ cases: crate 'sc-basic-authorship' feature 'std' is required by 7 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-core sp-inherents @@ -4140,10 +4140,10 @@ cases: crate 'sc-client-api' feature 'std' is required by 15 dependencies: + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) sc-executor sp-api sp-core @@ -4158,10 +4158,10 @@ cases: crate 'sc-client-db' feature 'std' is required by 11 dependencies: + codec (renamed from parity-scale-codec) hash-db kitchensink-runtime log - codec (renamed from parity-scale-codec) rand sp-arithmetic sp-core @@ -4183,9 +4183,9 @@ cases: crate 'sc-consensus-aura' feature 'std' is required by 14 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-application-crypto sp-block-builder @@ -4200,12 +4200,12 @@ cases: crate 'sc-consensus-babe' feature 'std' is required by 19 dependencies: + codec (renamed from parity-scale-codec) futures log num-bigint num-rational num-traits - codec (renamed from parity-scale-codec) rand_chacha scale-info sp-api @@ -4234,10 +4234,10 @@ cases: crate 'sc-consensus-beefy' feature 'std' is required by 15 dependencies: + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) serde sp-api sp-application-crypto @@ -4252,9 +4252,9 @@ cases: crate 'sc-consensus-beefy-rpc' feature 'std' is required by 8 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde serde_json sp-consensus-beefy @@ -4298,9 +4298,9 @@ cases: crate 'sc-consensus-manual-seal' feature 'std' is required by 13 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde sp-api sp-consensus-aura @@ -4314,9 +4314,9 @@ cases: crate 'sc-consensus-pow' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-block-builder sp-consensus-pow @@ -4326,9 +4326,9 @@ cases: crate 'sc-consensus-slots' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-arithmetic sp-consensus-slots sp-core @@ -4344,10 +4344,10 @@ cases: feature 'std' is required by 10 dependencies: anyhow + codec (renamed from parity-scale-codec) libc log once_cell - codec (renamed from parity-scale-codec) rustix sc-runtime-test sp-io @@ -4370,10 +4370,10 @@ cases: feature 'std' is required by 16 dependencies: bytes + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) rand serde serde_json @@ -4400,8 +4400,8 @@ cases: feature 'std' is required by 7 dependencies: bytes - futures codec (renamed from parity-scale-codec) + futures serde sp-consensus-grandpa sp-runtime @@ -4417,26 +4417,26 @@ cases: crate 'sc-network-light' feature 'std' is required by 6 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) prost sp-core sp-runtime crate 'sc-network-statement' feature 'std' is required by 5 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-runtime sp-statement-store crate 'sc-network-sync' feature 'std' is required by 10 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) prost sp-arithmetic sp-consensus-grandpa @@ -4458,18 +4458,18 @@ cases: crate 'sc-network-transactions' feature 'std' is required by 4 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-runtime crate 'sc-offchain' feature 'std' is required by 12 dependencies: bytes + codec (renamed from parity-scale-codec) fnv futures once_cell - codec (renamed from parity-scale-codec) rand sp-api sp-core @@ -4493,9 +4493,9 @@ cases: crate 'sc-rpc' feature 'std' is required by 13 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde_json sp-api sp-core @@ -4524,11 +4524,11 @@ cases: crate 'sc-rpc-spec-v2' feature 'std' is required by 12 dependencies: + codec (renamed from parity-scale-codec) futures futures-util hex log - codec (renamed from parity-scale-codec) serde serde_json sp-api @@ -4543,9 +4543,9 @@ cases: crate 'sc-service' feature 'std' is required by 22 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) rand sc-executor serde @@ -4584,15 +4584,15 @@ cases: crate 'sc-state-db' feature 'std' is required by 3 dependencies: - log codec (renamed from parity-scale-codec) + log sp-core crate 'sc-statement-store' feature 'std' is required by 8 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-core sp-runtime @@ -4654,10 +4654,10 @@ cases: crate 'sc-transaction-pool' feature 'std' is required by 11 dependencies: + codec (renamed from parity-scale-codec) futures log num-traits - codec (renamed from parity-scale-codec) serde sp-api sp-core @@ -4812,9 +4812,9 @@ cases: crate 'sp-blockchain' feature 'std' is required by 6 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-runtime sp-state-machine @@ -4990,9 +4990,9 @@ cases: crate 'substrate-frame-rpc-support' feature 'std' is required by 8 dependencies: + codec (renamed from parity-scale-codec) frame-support frame-system - codec (renamed from parity-scale-codec) scale-info serde sp-core @@ -5001,10 +5001,10 @@ cases: crate 'substrate-frame-rpc-system' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) frame-system-rpc-runtime-api futures log - codec (renamed from parity-scale-codec) sp-api sp-block-builder sp-core @@ -5024,8 +5024,8 @@ cases: crate 'substrate-state-trie-migration-rpc' feature 'std' is required by 10 dependencies: - log codec (renamed from parity-scale-codec) + log scale-info serde serde_json @@ -5037,8 +5037,8 @@ cases: crate 'substrate-test-client' feature 'std' is required by 9 dependencies: - futures codec (renamed from parity-scale-codec) + futures sc-executor serde serde_json @@ -5053,8 +5053,8 @@ cases: crate 'substrate-test-runtime-client' feature 'std' is required by 6 dependencies: - futures codec (renamed from parity-scale-codec) + futures sp-api sp-core sp-runtime @@ -5062,8 +5062,8 @@ cases: crate 'substrate-test-runtime-transaction-pool' feature 'std' is required by 3 dependencies: - futures codec (renamed from parity-scale-codec) + futures sp-runtime crate 'substrate-test-utils' feature 'std' @@ -5724,6 +5724,7 @@ cases: is required by 24 dependencies: frame-system frame-system-rpc-runtime-api + grandpa-primitives (renamed from sp-consensus-grandpa) kitchensink-runtime node-primitives pallet-asset-tx-payment @@ -5736,7 +5737,6 @@ cases: sp-api sp-authority-discovery sp-consensus-babe - grandpa-primitives (renamed from sp-consensus-grandpa) sp-core sp-inherents sp-io @@ -6569,8 +6569,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'try-runtime' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'try-runtime' @@ -7674,8 +7674,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'try-runtime' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'try-runtime' diff --git a/tests/integration/substrate/master.yaml b/tests/integration/substrate/master.yaml index c0fd7b5..eeda9b8 100644 --- a/tests/integration/substrate/master.yaml +++ b/tests/integration/substrate/master.yaml @@ -44,8 +44,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'runtime-benchmarks' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'runtime-benchmarks' @@ -733,8 +733,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'runtime-benchmarks' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'runtime-benchmarks' @@ -2018,11 +2018,11 @@ cases: is required by 22 dependencies: chrono clap + codec (renamed from parity-scale-codec) frame-benchmarking frame-support frame-system log - codec (renamed from parity-scale-codec) rand sc-executor serde @@ -2050,9 +2050,9 @@ cases: feature 'std' is required by 9 dependencies: clap + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support - codec (renamed from parity-scale-codec) rand scale-info sp-arithmetic @@ -2061,9 +2061,9 @@ cases: crate 'frame-remote-externalities' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde sp-core sp-io @@ -2597,9 +2597,9 @@ cases: crate 'mmr-gadget' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-consensus-beefy sp-core @@ -2725,9 +2725,11 @@ cases: feature 'std' is required by 33 dependencies: clap + codec (renamed from parity-scale-codec) frame-system frame-system-rpc-runtime-api futures + grandpa-primitives (renamed from sp-consensus-grandpa) kitchensink-runtime log node-primitives @@ -2737,7 +2739,6 @@ cases: pallet-balances pallet-im-online pallet-timestamp - codec (renamed from parity-scale-codec) platforms rand regex @@ -2747,7 +2748,6 @@ cases: sp-api sp-authority-discovery sp-consensus-babe - grandpa-primitives (renamed from sp-consensus-grandpa) sp-core sp-inherents sp-io @@ -2760,6 +2760,7 @@ cases: crate 'node-executor' feature 'std' is required by 28 dependencies: + codec (renamed from parity-scale-codec) frame-benchmarking frame-support frame-system @@ -2775,7 +2776,6 @@ cases: pallet-timestamp pallet-transaction-payment pallet-treasury - codec (renamed from parity-scale-codec) sc-executor scale-info sp-application-crypto @@ -2836,6 +2836,7 @@ cases: crate 'node-testing' feature 'std' is required by 18 dependencies: + codec (renamed from parity-scale-codec) frame-system futures kitchensink-runtime @@ -2845,7 +2846,6 @@ cases: pallet-asset-conversion-tx-payment pallet-asset-tx-payment pallet-assets - codec (renamed from parity-scale-codec) sc-executor sp-api sp-block-builder @@ -2922,6 +2922,7 @@ cases: crate 'pallet-election-provider-e2e-test' feature 'std' is required by 19 dependencies: + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support frame-system @@ -2932,7 +2933,6 @@ cases: pallet-session pallet-staking pallet-timestamp - codec (renamed from parity-scale-codec) scale-info sp-core sp-io @@ -2980,6 +2980,7 @@ cases: crate 'pallet-nomination-pools-test-staking' feature 'std' is required by 17 dependencies: + codec (renamed from parity-scale-codec) frame-election-provider-support frame-support frame-system @@ -2989,7 +2990,6 @@ cases: pallet-nomination-pools pallet-staking pallet-timestamp - codec (renamed from parity-scale-codec) scale-info sp-core sp-io @@ -3022,8 +3022,8 @@ cases: crate 'pallet-transaction-payment-rpc' feature 'std' is required by 6 dependencies: - pallet-transaction-payment-rpc-runtime-api codec (renamed from parity-scale-codec) + pallet-transaction-payment-rpc-runtime-api sp-api sp-core sp-runtime @@ -3316,10 +3316,10 @@ cases: crate 'sc-authority-discovery' feature 'std' is required by 12 dependencies: + codec (renamed from parity-scale-codec) futures log multihash - codec (renamed from parity-scale-codec) prost rand sp-api @@ -3331,9 +3331,9 @@ cases: crate 'sc-basic-authorship' feature 'std' is required by 7 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-core sp-inherents @@ -3377,10 +3377,10 @@ cases: crate 'sc-client-api' feature 'std' is required by 14 dependencies: + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) sc-executor sp-api sp-core @@ -3394,10 +3394,10 @@ cases: crate 'sc-client-db' feature 'std' is required by 11 dependencies: + codec (renamed from parity-scale-codec) hash-db kitchensink-runtime log - codec (renamed from parity-scale-codec) rand sp-arithmetic sp-core @@ -3419,9 +3419,9 @@ cases: crate 'sc-consensus-aura' feature 'std' is required by 14 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-application-crypto sp-block-builder @@ -3436,12 +3436,12 @@ cases: crate 'sc-consensus-babe' feature 'std' is required by 19 dependencies: + codec (renamed from parity-scale-codec) futures log num-bigint num-rational num-traits - codec (renamed from parity-scale-codec) rand_chacha scale-info sp-api @@ -3470,10 +3470,10 @@ cases: crate 'sc-consensus-beefy' feature 'std' is required by 15 dependencies: + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) serde sp-api sp-application-crypto @@ -3488,9 +3488,9 @@ cases: crate 'sc-consensus-beefy-rpc' feature 'std' is required by 8 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde serde_json sp-consensus-beefy @@ -3534,9 +3534,9 @@ cases: crate 'sc-consensus-manual-seal' feature 'std' is required by 13 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde sp-api sp-consensus-aura @@ -3550,9 +3550,9 @@ cases: crate 'sc-consensus-pow' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-block-builder sp-consensus-pow @@ -3562,9 +3562,9 @@ cases: crate 'sc-consensus-slots' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-arithmetic sp-consensus-slots sp-core @@ -3580,9 +3580,9 @@ cases: feature 'std' is required by 9 dependencies: anyhow + codec (renamed from parity-scale-codec) libc log - codec (renamed from parity-scale-codec) rustix sc-runtime-test sp-io @@ -3605,10 +3605,10 @@ cases: feature 'std' is required by 16 dependencies: bytes + codec (renamed from parity-scale-codec) fnv futures log - codec (renamed from parity-scale-codec) rand serde serde_json @@ -3634,8 +3634,8 @@ cases: crate 'sc-network-common' feature 'std' is required by 4 dependencies: - futures codec (renamed from parity-scale-codec) + futures sp-consensus-grandpa sp-runtime crate 'sc-network-gossip' @@ -3649,25 +3649,25 @@ cases: crate 'sc-network-light' feature 'std' is required by 6 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) prost sp-core sp-runtime crate 'sc-network-statement' feature 'std' is required by 4 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-statement-store crate 'sc-network-sync' feature 'std' is required by 10 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) prost sp-arithmetic sp-consensus-grandpa @@ -3688,19 +3688,19 @@ cases: crate 'sc-network-transactions' feature 'std' is required by 4 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-runtime crate 'sc-offchain' feature 'std' is required by 15 dependencies: bytes + codec (renamed from parity-scale-codec) fnv futures log once_cell - codec (renamed from parity-scale-codec) rand sp-api sp-core @@ -3717,9 +3717,9 @@ cases: crate 'sc-rpc' feature 'std' is required by 14 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) pretty_assertions serde_json sp-api @@ -3749,11 +3749,11 @@ cases: crate 'sc-rpc-spec-v2' feature 'std' is required by 13 dependencies: + codec (renamed from parity-scale-codec) futures futures-util hex log - codec (renamed from parity-scale-codec) pretty_assertions serde serde_json @@ -3765,9 +3765,9 @@ cases: crate 'sc-service' feature 'std' is required by 22 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) rand sc-executor serde @@ -3806,8 +3806,8 @@ cases: crate 'sc-state-db' feature 'std' is required by 3 dependencies: - log codec (renamed from parity-scale-codec) + log sp-core crate 'sc-statement-store' feature 'std' @@ -3871,9 +3871,9 @@ cases: crate 'sc-transaction-pool' feature 'std' is required by 10 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde sp-api sp-core @@ -3884,9 +3884,9 @@ cases: crate 'sc-transaction-pool-api' feature 'std' is required by 7 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) serde serde_json sp-core @@ -4011,9 +4011,9 @@ cases: crate 'sp-api-test' feature 'std' is required by 10 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) scale-info sp-api sp-core @@ -4040,9 +4040,9 @@ cases: crate 'sp-blockchain' feature 'std' is required by 6 dependencies: + codec (renamed from parity-scale-codec) futures log - codec (renamed from parity-scale-codec) sp-api sp-runtime sp-state-machine @@ -4204,9 +4204,9 @@ cases: crate 'substrate-frame-rpc-support' feature 'std' is required by 8 dependencies: + codec (renamed from parity-scale-codec) frame-support frame-system - codec (renamed from parity-scale-codec) scale-info serde sp-core @@ -4215,10 +4215,10 @@ cases: crate 'substrate-frame-rpc-system' feature 'std' is required by 9 dependencies: + codec (renamed from parity-scale-codec) frame-system-rpc-runtime-api futures log - codec (renamed from parity-scale-codec) sp-api sp-block-builder sp-core @@ -4249,8 +4249,8 @@ cases: crate 'substrate-test-client' feature 'std' is required by 9 dependencies: - futures codec (renamed from parity-scale-codec) + futures sc-executor serde serde_json @@ -4274,8 +4274,8 @@ cases: crate 'substrate-test-runtime-transaction-pool' feature 'std' is required by 3 dependencies: - futures codec (renamed from parity-scale-codec) + futures sp-runtime crate 'substrate-test-utils' feature 'std' @@ -4926,6 +4926,7 @@ cases: is required by 24 dependencies: frame-system frame-system-rpc-runtime-api + grandpa-primitives (renamed from sp-consensus-grandpa) kitchensink-runtime node-primitives pallet-asset-conversion-tx-payment @@ -4938,7 +4939,6 @@ cases: sp-api sp-authority-discovery sp-consensus-babe - grandpa-primitives (renamed from sp-consensus-grandpa) sp-core sp-inherents sp-io @@ -5678,8 +5678,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'try-runtime' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'try-runtime' @@ -6255,8 +6255,8 @@ cases: crate 'frame-support-test-compile-pass' feature 'try-runtime' is required by 3 dependencies: - renamed-frame-support (renamed from frame-support) frame-system + renamed-frame-support (renamed from frame-support) sp-runtime crate 'frame-support-test-pallet' feature 'try-runtime' diff --git a/tests/ui/config/v1/basic.yaml b/tests/ui/config/v1/basic.yaml index 27d8b71..3e16468 100644 --- a/tests/ui/config/v1/basic.yaml +++ b/tests/ui/config/v1/basic.yaml @@ -3,47 +3,43 @@ crates: cases: - cmd: run default stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version - cmd: run stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version - cmd: '' stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version - cmd: run my_version stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'my_version' [INFO] 1/1 --version - cmd: run my_debug - stdout: |+ + stdout: | Num workspace members: 1 Num dependencies: 1 DAG nodes: 0, links: 0 - # Number of samples = 0 - stderr: | [INFO] Running workflow 'my_debug' [WARN] Unstable feature - do not rely on this! [INFO] 1/1 debug --no-benchmark - cmd: run both - stdout: |+ - zepter 1.1.0 + stdout: | + zepter 1.1.1 Num workspace members: 1 Num dependencies: 1 DAG nodes: 0, links: 0 - # Number of samples = 0 - stderr: | [INFO] Running workflow 'both' [INFO] 1/2 --version diff --git a/tests/ui/config/v1/finds_all.yaml b/tests/ui/config/v1/finds_all.yaml index 25000f5..9bf2b15 100644 --- a/tests/ui/config/v1/finds_all.yaml +++ b/tests/ui/config/v1/finds_all.yaml @@ -3,7 +3,7 @@ crates: cases: - cmd: '' stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -19,7 +19,7 @@ cases: - [ '--version' ] - cmd: '' stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -35,7 +35,7 @@ cases: - [ '--version' ] - cmd: '' stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -51,7 +51,7 @@ cases: - [ '--version' ] - cmd: run default stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -67,7 +67,7 @@ cases: - [ '--version' ] - cmd: run default stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -83,7 +83,7 @@ cases: - [ '--version' ] - cmd: run default stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -99,7 +99,7 @@ cases: - [ '--version' ] - cmd: run default --config .cargo/polkadot.yaml stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version @@ -115,7 +115,7 @@ cases: - [ '--version' ] - cmd: run default -c .cargo/polkadot.yaml stdout: | - zepter 1.1.0 + zepter 1.1.1 stderr: | [INFO] Running workflow 'default' [INFO] 1/1 --version diff --git a/tests/ui/config/v1/version_bin.yaml b/tests/ui/config/v1/version_bin.yaml index 5723865..31aa6ab 100644 --- a/tests/ui/config/v1/version_bin.yaml +++ b/tests/ui/config/v1/version_bin.yaml @@ -3,7 +3,8 @@ crates: cases: - cmd: run default stderr: | - thread 'main' panicked at 'Invalid config file: "Config file version is too new. The file requires at least version 2.0.0, but the current version is 1.1.0. Please update Zepter or ignore this check with `--check-cfg-compatibility=off`."', src/cmd/run.rs:27:46 + thread 'main' panicked at src/cmd/run.rs:27:46: + Invalid config file: "Config file version is too new. The file requires at least version 2.0.0, but the current version is 1.1.1. Please update Zepter or ignore this check with `--check-cfg-compatibility=off`." note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace code: 101 - cmd: run default --check-cfg-compatibility=off @@ -11,7 +12,8 @@ cases: Error: Command '' failed with exit code 101 stderr: | [INFO] Running workflow 'default' - thread 'main' panicked at 'Invalid config file: "Config file version is too new. The file requires at least version 2.0.0, but the current version is 1.1.0. Please update Zepter or ignore this check with `--check-cfg-compatibility=off`."', src/cmd/run.rs:27:46 + thread 'main' panicked at src/cmd/run.rs:27:46: + Invalid config file: "Config file version is too new. The file requires at least version 2.0.0, but the current version is 1.1.1. Please update Zepter or ignore this check with `--check-cfg-compatibility=off`." note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace code: 1 configs: diff --git a/tests/ui/config/v1/version_file.yaml b/tests/ui/config/v1/version_file.yaml index 9f250be..2f2392b 100644 --- a/tests/ui/config/v1/version_file.yaml +++ b/tests/ui/config/v1/version_file.yaml @@ -3,7 +3,8 @@ crates: cases: - cmd: run default stderr: | - thread 'main' panicked at 'Invalid config file: "Can only parse workflow files with version '1'"', src/cmd/run.rs:27:46 + thread 'main' panicked at src/cmd/run.rs:27:46: + Invalid config file: "Can only parse workflow files with version '1'" note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace code: 101 configs: diff --git a/tests/ui/fmt/help.yaml b/tests/ui/fmt/help.yaml index 1ff3cb4..058eb8a 100644 --- a/tests/ui/fmt/help.yaml +++ b/tests/ui/fmt/help.yaml @@ -3,4 +3,4 @@ cases: - cmd: format --help stdout: "Format the features in your manifest files\n\nUsage: zepter format [OPTIONS] \n\nCommands:\n features Format the content of each feature in the crate manifest\n help Print this message or the help of the given subcommand(s)\n\nOptions:\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n --log \n Log level to use\n \n [default: info]\n\n --color\n Use ANSI terminal colors\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n -h, --help\n Print help (see a summary with '-h')\n" - cmd: format features --help - stdout: "Format the content of each feature in the crate manifest\n\nUsage: zepter format features [OPTIONS]\n\nOptions:\n --manifest-path \n Cargo manifest path or directory.\n \n For directories it appends a `Cargo.toml`.\n\n --workspace\n Whether to only consider workspace crates\n\n --offline\n Whether to use offline mode\n\n --locked\n Whether to use all the locked dependencies from the `Cargo.lock`.\n \n Otherwise it may update some dependencies. For CI usage its a good idea to use it.\n\n --all-features\n \n\n --debug-keep-meta \n \n\n --no-workspace\n Include dependencies in the formatting check.\n \n They will not be modified, unless their path is included in `--modify-paths`.\n\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n --log \n Log level to use\n \n [default: info]\n\n --modify-paths \n Paths that are allowed to be modified by the formatter\n\n -c, --check\n DEPRECATED AND IGNORED\n\n --color\n Use ANSI terminal colors\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n -f, --fix\n Fix the formatting errors automatically\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n --line-width \n The maximal length of a line for a feature\n \n [default: 80]\n\n --mode-per-feature \n Set the formatting mode for a specific feature.\n \n Can be specified multiple times. Example:\n `--mode-per-feature default:sort,default:canonicalize`\n\n --ignore-feature \n Ignore a specific feature across all crates.\n \n This is equivalent to `--mode-per-feature FEATURE:none`.\n\n --print-paths\n Also print the paths of the offending Cargo.toml files\n\n -h, --help\n Print help (see a summary with '-h')\n" + stdout: "Format the content of each feature in the crate manifest\n\nUsage: zepter format features [OPTIONS]\n\nOptions:\n --manifest-path \n Cargo manifest path or directory.\n \n For directories it appends a `Cargo.toml`.\n\n --workspace\n Whether to only consider workspace crates\n\n --offline\n Whether to use offline mode\n\n --locked\n Whether to use all the locked dependencies from the `Cargo.lock`.\n \n Otherwise it may update some dependencies. For CI usage its a good idea to use it.\n\n --all-features\n \n\n --no-workspace\n Include dependencies in the formatting check.\n \n They will not be modified, unless their path is included in `--modify-paths`.\n\n --modify-paths \n Paths that are allowed to be modified by the formatter\n\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n -c, --check\n DEPRECATED AND IGNORED\n\n --log \n Log level to use\n \n [default: info]\n\n --color\n Use ANSI terminal colors\n\n -f, --fix\n Fix the formatting errors automatically\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n --line-width \n The maximal length of a line for a feature\n \n [default: 80]\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n --mode-per-feature \n Set the formatting mode for a specific feature.\n \n Can be specified multiple times. Example:\n `--mode-per-feature default:sort,default:canonicalize`\n\n --ignore-feature \n Ignore a specific feature across all crates.\n \n This is equivalent to `--mode-per-feature FEATURE:none`.\n\n --print-paths\n Also print the paths of the offending Cargo.toml files\n\n -h, --help\n Print help (see a summary with '-h')\n" diff --git a/tests/ui/lint/never-enables/simple.yaml b/tests/ui/lint/never-enables/simple.yaml index 9419ab5..3a007bf 100644 --- a/tests/ui/lint/never-enables/simple.yaml +++ b/tests/ui/lint/never-enables/simple.yaml @@ -27,6 +27,4 @@ cases: enables feature "G1" on dependencies: B - cmd: lint never-enables --precondition F0 --stays-disabled G1 - stdout: '' - cmd: lint never-enables --precondition F1 --stays-disabled G0 - stdout: '' diff --git a/tests/ui/root-args/help.yaml b/tests/ui/root-args/help.yaml index df72b83..07d1f36 100644 --- a/tests/ui/root-args/help.yaml +++ b/tests/ui/root-args/help.yaml @@ -5,4 +5,4 @@ cases: - cmd: lint --help stdout: "Lint your feature usage by analyzing crate metadata\n\nUsage: zepter lint [OPTIONS] \n\nCommands:\n propagate-feature Check whether features are properly propagated\n never-enables A specific feature never enables a specific other feature\n never-implies A specific feature never implies a specific other feature\n only-enables A specific feature is only implied by a specific set of other features\n why-enabled Arguments for how to load cargo metadata from a workspace\n help Print this message or the help of the given subcommand(s)\n\nOptions:\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n --log \n Log level to use\n \n [default: info]\n\n --color\n Use ANSI terminal colors\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n -h, --help\n Print help (see a summary with '-h')\n" - cmd: lint propagate-feature --help - stdout: "Check whether features are properly propagated\n\nUsage: zepter lint propagate-feature [OPTIONS] --features \n\nOptions:\n --manifest-path \n Cargo manifest path or directory.\n \n For directories it appends a `Cargo.toml`.\n\n --workspace\n Whether to only consider workspace crates\n\n --offline\n Whether to use offline mode\n\n --locked\n Whether to use all the locked dependencies from the `Cargo.lock`.\n \n Otherwise it may update some dependencies. For CI usage its a good idea to use it.\n\n --all-features\n \n\n --debug-keep-meta \n \n\n --features \n The feature to check\n\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n --log \n Log level to use\n \n [default: info]\n\n -p, --packages [...]\n The packages to check. If empty, all packages are checked\n\n --color\n Use ANSI terminal colors\n\n --feature-enables-dep \n The auto-fixer will enables the feature of the dependencies as non-optional.\n \n This can be used in case that a dependency should not be enabled like `dep?/feature` but\n like `dep/feature` instead. In this case you would pass `--feature-enables-dep\n feature:dep`. The option can be passed multiple times, or multiple key-value pairs can be\n passed at once by separating them with a comma like: `--feature-enables-dep\n feature:dep,feature2:dep2`. (TODO: Duplicate entries are undefined).\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n --left-side-feature-missing \n Overwrite the behaviour when the left side dependency is missing the feature.\n \n This can be used to ignore missing features, treat them as warning or error. A \"missing\n feature\" here means that if `A` has a dependency `B` which has a feature `F`, and the\n propagation is checked then normally it would error if `A` is not forwarding `F` to `B`.\n Now this option modifies the behaviour if `A` does not have the feature in the first place.\n The default behaviour is to require `A` to also have `F`.\n \n [default: fix]\n\n Possible values:\n - ignore: Ignore this behaviour\n - report: Only report but do not fix\n - fix: Fix if `--fix` is passed\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n --ignore-missing-propagate \n Ignore single missing links in the feature propagation chain.\n\n --left-side-outside-workspace \n How to handle the case that the LHS is outside the workspace.\n \n [default: fix]\n\n Possible values:\n - ignore: Ignore this behaviour\n - report: Only report but do not fix\n - fix: Fix if `--fix` is passed\n\n --dep-kinds \n How to handle dev-dependencies.\n \n [default: normal:check,dev:check,build:check]\n\n --show-version\n Show crate versions in the output\n\n --show-path\n Show crate manifest paths in the output\n\n --fix\n Try to automatically fix the problems\n\n --modify-paths \n \n\n --fix-dependency \n Fix only issues with this package as dependency\n\n --fix-package \n Fix only issues with this package as feature source\n\n -h, --help\n Print help (see a summary with '-h')\n" + stdout: "Check whether features are properly propagated\n\nUsage: zepter lint propagate-feature [OPTIONS] --features \n\nOptions:\n --manifest-path \n Cargo manifest path or directory.\n \n For directories it appends a `Cargo.toml`.\n\n --workspace\n Whether to only consider workspace crates\n\n --offline\n Whether to use offline mode\n\n --locked\n Whether to use all the locked dependencies from the `Cargo.lock`.\n \n Otherwise it may update some dependencies. For CI usage its a good idea to use it.\n\n --all-features\n \n\n --features \n The feature to check\n\n -p, --packages [...]\n The packages to check. If empty, all packages are checked\n\n -q, --quiet\n Only print errors. Supersedes `--log`\n\n --feature-enables-dep \n The auto-fixer will enables the feature of the dependencies as non-optional.\n \n This can be used in case that a dependency should not be enabled like `dep?/feature` but\n like `dep/feature` instead. In this case you would pass `--feature-enables-dep\n feature:dep`. The option can be passed multiple times, or multiple key-value pairs can be\n passed at once by separating them with a comma like: `--feature-enables-dep\n feature:dep,feature2:dep2`. (TODO: Duplicate entries are undefined).\n\n --log \n Log level to use\n \n [default: info]\n\n --color\n Use ANSI terminal colors\n\n --left-side-feature-missing \n Overwrite the behaviour when the left side dependency is missing the feature.\n \n This can be used to ignore missing features, treat them as warning or error. A \"missing\n feature\" here means that if `A` has a dependency `B` which has a feature `F`, and the\n propagation is checked then normally it would error if `A` is not forwarding `F` to `B`.\n Now this option modifies the behaviour if `A` does not have the feature in the first place.\n The default behaviour is to require `A` to also have `F`.\n \n [default: fix]\n\n Possible values:\n - ignore: Ignore this behaviour\n - report: Only report but do not fix\n - fix: Fix if `--fix` is passed\n\n --exit-code-zero\n Try to exit with code zero if the intended check failed.\n \n Will still return 1 in case of an actual error (eg. failed to find some file) or a panic\n (aka software bug).\n\n --ignore-missing-propagate \n Ignore single missing links in the feature propagation chain.\n\n --fix-hint \n Dont print any hints on how to fix the error.\n \n This is mostly used internally when dispatching, workflows since they come with their\n hints.\n \n [default: on]\n\n Possible values:\n - on: Prints some hint that is (hopefully) helpful\n - off: Prints no hint at all\n\n --left-side-outside-workspace \n How to handle the case that the LHS is outside the workspace.\n \n [default: fix]\n\n Possible values:\n - ignore: Ignore this behaviour\n - report: Only report but do not fix\n - fix: Fix if `--fix` is passed\n\n --dep-kinds \n How to handle dev-dependencies.\n \n [default: normal:check,dev:check,build:check]\n\n --show-version\n Show crate versions in the output\n\n --show-path\n Show crate manifest paths in the output\n\n --fix\n Try to automatically fix the problems\n\n --modify-paths \n \n\n --fix-dependency \n Fix only issues with this package as dependency\n\n --fix-package \n Fix only issues with this package as feature source\n\n -h, --help\n Print help (see a summary with '-h')\n" diff --git a/tests/ui/root-args/version.yaml b/tests/ui/root-args/version.yaml index 22a936b..65fd0bf 100644 --- a/tests/ui/root-args/version.yaml +++ b/tests/ui/root-args/version.yaml @@ -2,7 +2,7 @@ crates: [] cases: - cmd: --version stdout: | - zepter 1.1.0 + zepter 1.1.1 - cmd: -V stdout: | - zepter 1.1.0 + zepter 1.1.1