commit: 4350a2ad587103ccc4f0748f19b4eeb312f595ce Author: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> AuthorDate: Wed Nov 27 02:52:54 2024 +0000 Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> CommitDate: Fri Nov 29 21:12:11 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4350a2ad
dev-util/ruff: add 0.8.0 Needs one backport to fix a test regression when not building with debug. I've also added an experimental dedup thing. One of the major issues with rust is that cargo locks and requires all crates to be downloaded offline, even if you're not using most of them because the crate dependencies are Windows-specific. I haven't solved that, but I did manage to remove about 40 of them by removing some workspace members from the ruff monorepo that aren't actually part of the ruff binary in any configuration (which means their dependencies don't need to be locked, either). This has to be done before running pycargoebuild *and* also done in the ebuild itself. Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org> dev-util/ruff/Manifest | 14 + ...knot-Fix-unit-tests-in-release-mode-14604.patch | 109 +++++ dev-util/ruff/ruff-0.8.0.ebuild | 480 +++++++++++++++++++++ 3 files changed, 603 insertions(+) diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index 60f81fd3e9f2..016c260f533a 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -25,7 +25,9 @@ DIST bincode-1.3.3.crate 28958 BLAKE2B ea01d2efd8149ecba5e240ed989268b683d542a5f DIST bitflags-1.3.2.crate 23021 BLAKE2B eb990bb27b2bdeb66fd7212ce582cb36e1c616debbac85df642d0c82b25439e6bf9b1e811fac76b59e58ea3c1bbea6170d03a61e8f9a395e4334a0e2e2987eda SHA512 3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62 DIST bitflags-2.6.0.crate 45357 BLAKE2B 3a368bd2eb58c095b7b4a46680cc2d90a28e24b2e37c854bbf8647c861c4b8fb37eca827599673c5c7df763048149dd82123d1ede1f8a0e58a6bc23c8250f7e6 SHA512 f9bb3c48931ed7e7e05ec6d13305af5da6b6c18861ff307d7dc17c658f63972c87b70b0527287b3625c8592befc207cfe15550654995faf3862bb12a6d95bacf DIST block-buffer-0.10.4.crate 10538 BLAKE2B d819c4f9c4be85868e8b105fb7e479d2e58d3ed85c3339bd677a3e111f85cb1ff624a54d7802ab79a6e1d9221115f66388568340480fe83eae1cb448f19f5b11 SHA512 b7d436d8e627e16e6ddc300ee8f706a6cef28ff6f09eff848eedee46f84bdcd03601303c92ab8996042e55922866a59259948177c0a4496eed723523e77f6fdb +DIST boxcar-0.2.7.crate 10454 BLAKE2B 803910bc77d968764c7e985b97231fcd85c63577a9c3819a62ae8a9e3601e4ebb273111e838f650c0a7fc35fb97d964a29bdf6d52aa0330346d50421a7006cbd SHA512 c84051590f8c7f493bfc0e8a9eb8364a46f853ce9a32e13a1eb5ddcfc5088900bed7b714d34b02341721653d6c313edbcd9fae3747f502f7743d4ec86f660ba2 DIST bstr-1.10.0.crate 380426 BLAKE2B 19330a5a293430c09908d2174ff814351b16419f60de6463abf9b8a9dff06a4e6845e889d8047a710cef54842f2790d9cd5080b92cdcb113d89742b869979c74 SHA512 823abdbda9b13802facc7d6b1ed9ad809ed3b0b827d26e418348ffb8481b5f5735f129c5a9a8c7b2ab010d7f32ca57cba69a1ee10a64225c54c6ceacd22c05d2 +DIST bstr-1.11.0.crate 380721 BLAKE2B f0fac00b83cab351f8b7e02cfd20a2aaf04de853878b8c1a667159ea444093eb3fdebe4bd893e9b3723070fb4b1d2646b7c560987b640bf3f5a4923fe9accf72 SHA512 e4534db9f27184134264dfb16ffc79b7d2374e79ef50400cee4cf44c1e9d7d0b9f7ab8fa034493b5a1ef835c797214bfb399ae95d4b670b3283180fded414ba9 DIST bumpalo-3.16.0.crate 85677 BLAKE2B 08da17b757931d2910e0299df53eb62731aa8c4ebd8915859b81d1982b331e7455dfac977c754e500a35ee07ba8eff00a61d2f62be99744e2ddbba06c1268f49 SHA512 a51b75c36f6794db444cab20eeb24f42a319080ecb486a56d254d6f873f3d188b5ccba11db30c068bd0c52c4322d4a3f5f5195c81c94b0bc04387030418835b1 DIST byteorder-1.5.0.crate 23288 BLAKE2B 7f85a7948406844070a2c8202e0bd52f73b3dfc7c666a97046128044eb9352195afb80e2bf894c0742ad109e4473339de1365d09591de70dfec6c8c02a8e1453 SHA512 96caf981177f6ded9f27f025922cb94eb0cd9de5303bd91680099912d922092e77b7361efa70011e84f1595e443193e4f1b354443b9980c123f6ae573b236f7f DIST cachedir-0.3.1.crate 8668 BLAKE2B 94b624651fad1acb2b82d7d886449db2b5558e672ad220396c190d155fd1ba8d46fcb26eed6b15aadae91011c7c44ae32c8257696b3e3f0568c3f0e4c95442d0 SHA512 af060f442ce5e101493e99545befe0f7e4bee8a07fae4cd0eb20d5e1cb10957e4a93cf768c8bd21f60f7bb826d1278f20095ea869d9c006fba1261cc1288829e @@ -42,7 +44,9 @@ DIST ciborium-0.2.2.crate 35611 BLAKE2B 7bb34ed2b16f55af2d762bbc83263bba901a0f05 DIST ciborium-io-0.2.2.crate 6697 BLAKE2B 07636da78f59859515af0075cb36d9ca969113ac327ff727953c73b64b60ddae22e5b1b65d8be5aa401f8b13d34074cbc8b47f23abd7a13d551f0b1c78f23575 SHA512 641b8592f9699d5e6c607815c8e6dfc82b2bd01897015e04ef8853420a7d90c2ec5c1140e39eb7623ce05587bea52ef63659eae76baee5b6592d2ac5298ce106 DIST ciborium-ll-0.2.2.crate 14695 BLAKE2B 3c9ab0b338070359f9565706a504e4f6c65560072380af6e0a57068ae6716773d40e75dee84ded5e1d32f93445a07a0965759bedace58291b68b94479fb16488 SHA512 2f7ef6ad8bf5a862e8b9daa64bc6d8184c87a22c264b10dbb35c00c9effcd5712f354b4ca6c2eb8e6795d4b99d7cb88fa2acf01f3ad6fb28caf81708a500549a DIST clap-4.5.20.crate 56376 BLAKE2B 8efa9c3e171ef38c98a25c526f528629e7e72850c6ec27e7e89a212403ee90d7d005b00750769e4335423ecec1d86abb35c19b0bf7f2c063bc7c6a8bd59d6804 SHA512 e432a118a2ec15b273a404c3cb75bbe579b11034ba55def1823d4670c6553e3d8611074a24f50a0f4adc8bda184213b06106c44c68a19d267342c53e345351d4 +DIST clap-4.5.21.crate 56470 BLAKE2B 63b58b49ad5494712d0d45db92bea7a0247715f655c108cb81a4ae7380bdf572c292bee1edfb601aacec401d7d2fcd76068373200be642ac8179a33bc6b941ef SHA512 ca7b55defd85a4e1001d04653aaf1c38af9b43715dc6fd7b7a8c49a66ce1be0c09e0ac78b3a3febb90ad9a7d8676b4ff1ddc136816019eb394b7d4908af2a51e DIST clap_builder-4.5.20.crate 163812 BLAKE2B 689110f2e4f46e8c4c779b6c39cb5f5758c3a32ea5bbfa1faaa6642da7d650cac0827a3e5b503c5054a85e0e7dbf04e7c53d65991a45f3be90c75070cc9c200a SHA512 e914c8b6592f9d230b4f4290cf4b4d73d0160c12a1fa3976c74bad21ff16da532d6af792f0a33fa472166f1cd551291b5d1d71fe8b359040040418694ec52000 +DIST clap_builder-4.5.21.crate 164115 BLAKE2B 7df7a2fb8472e32c1885978f99a77b05f91c96131d00947386930e7249ad7a7b055ae5b1ebf145ddafef4d7d5fb276f3135423101bdb5ebc597b9b15267cfab1 SHA512 48abad9de7b0985138a2586674df36bcb925f3280cc19c7dcbec14d58c1a3bb391c836ff284366fb32d7460a5616b066e4e055e3a5fa7651196e62c59ca49c8c DIST clap_complete-4.5.2.crate 37850 BLAKE2B bfaae6107890319a9717d96f5616012016fd5439c7ac7dcfb0082d797a335c7c926459c8c1db0cc0652f700366c83956d8e0447bb3e990c183133b8f26d64301 SHA512 1c9db70159681dd23011df6e804fa193f67f3dee874b2583a5c9da90db1c7283a13b330befecca91de260f70b974168652b450cf8b519a79957ac7a6373992b3 DIST clap_complete_command-0.6.1.crate 7959 BLAKE2B 61bb266fdebb625ce3327164ab39d65943406fe9c101f10fa3a1f18d4728e0eeca07dcd8eb4e8f6eb63587cd1af86fb05beedf1c5b2bbaf22356f213ea738c7c SHA512 b364cac56e9604c7c06a84f5d687b62398f92e3c0407123b183d5c3846948a4a0975469326312ad57e2ce936574462f3dde61385062827e48efc3ff813185ef6 DIST clap_complete_nushell-4.5.2.crate 34391 BLAKE2B ce7a44c4a9e3d577e014c71d6f8f6b16e192ae169f499973316f6f3c7febae59c957ba6acc153802bde423fd58301b5b5ef5b606e275bf8f608ad40fb192338b SHA512 1da7b7f01e948f4c055bb912426d950418f353837dda9e6bb8e249bda4169b29de2291173c9d0193f0c746ec1387ad8a893721f32125f14565948f2e90fddf53 @@ -89,6 +93,7 @@ DIST dirs-sys-0.4.1.crate 10719 BLAKE2B 30334f2192698d7d03bd4e8bc8a682482da7d13b DIST displaydoc-0.2.5.crate 24219 BLAKE2B ba3396c93d27a99a92ff4a0f01a8d192b419bad25e48d9427b76260ebf2f9982291d77f2eb24d239c0b1fbb097e866a20bc46dc1879fdfc6637ea49928444a92 SHA512 5ca35fa59f263162389c1180331e9df607d9374bcb056cb04bc46c98e4d87277162ddb2335ffa8a8c5f69218abc3eabccdcaa71c21b8dd9081cc4146f266b948 DIST doc-comment-0.3.3.crate 4123 BLAKE2B a82d1c1a7a90af6e111b5e684a1298d7eac5fd8e4bf7d5baf6c7403d26b609958716d57e51122fe7ad7626fe00a2d824dcfef3cc2fd7679fdb7b5099603de1cd SHA512 e98ff9646a3612bd41bb6f278e7b6e9a0c58747f8b82524da814cf51b7f06c76ad4d65b502ac5740e818744abb295f78f15f8262d0b50ced1523f6d1a26939ba DIST drop_bomb-0.1.5.crate 6859 BLAKE2B d115c842c3642e070cbf91c8155e09a10fd51f772b2f491d7ac16ddb983e9a6334fad23415670caf24fc3dc2f37a894f6b39443453ca394d9227e8783d5519b4 SHA512 b4b33e275506a52a062d4d3c6beff14b4081b56c4491fcc28f4aaee645f6dec103fc0b67994cf7816d36313ad5383478aca28dc4d6cf619486a517f136d7b344 +DIST dunce-1.0.5.crate 8244 BLAKE2B 1499ae0bb3d34e8d42e97eaf551308efc95697366b804dc83c51171a939d45bad46fce9f82a39e17b6b92fc833aecc85eabd2104823c7db30396833388125728 SHA512 36d7d75217d629185a9a9187f7d2e2dc346a28be0ad1c21b1b6bcbe3991e9cd11797e53d745c0b3b5ae94cf1e4cf141cdb2322bab86d97cc258b4145e3b97a56 DIST dyn-clone-1.0.17.crate 11848 BLAKE2B 1f90492639630036e1e877537328e46ee3fa697d85b2f87c45990d4a51cc900a6f604d077b16575015bbf0a970c26f898226e87e6e2af82d624f5fa565036617 SHA512 b51fee8c4fa3c6b0bc677e9997d4b6921bfee9a11e369eedc649d19eb5d95d7872b533b37fb1ca842c75e714b46afb1231369341c45071db94f09b53e37e03f6 DIST either-1.11.0.crate 18973 BLAKE2B 31ece6eb44a367926b5f9ee817f6ac9d93746f5b95c95fab360361f6b3a02160c682d298d115f39615e5b4758953f3f29ece22a72fe4285875dce03483f87486 SHA512 f62a3859afdba762b004d4c766090a25d3bd81e4a14509c3bd0f39b0d433aeff997b39759f7dbc5a012bf3b680fc4510a4b2643d63dda8171bad7403554905ff DIST encode_unicode-0.3.6.crate 45741 BLAKE2B e1e3792bc2bf9db7df33a516d0d755eef5eff1249aa9b2fd7f0dfcb155786c566fb619c9b2d73425a8625c8593988b117e9676c341f65e8795ddc838bf9881c4 SHA512 64193d6ac75f66d58ed864169b5d6228ede36dcf100614395e086bc8e847a3ddd287734d88e8ed50f38c679a99c80ec68449175a67d8ee03b02ec1cfa9d55e77 @@ -163,6 +168,7 @@ DIST kqueue-sys-1.0.4.crate 7160 BLAKE2B d75e152cfccbdf7ae000be14e0f84c6d1fd0729 DIST lazy_static-1.4.0.crate 10443 BLAKE2B 25b2e61bbac48f0dcbc79c81d7bf01f2403d8269ecb6be3ea6147bd00f7a588df15a91f44dfc18ada19b21faa71de4637c7d493a8628cbecd0e547d74e616a23 SHA512 e124c0521ec7c950f3c4a066821918da7a9c6e711115d98009ae7c351928fdddead852e7596fea5937a9c30e4e4ce8eee7099b20248b5d6e3b2494b6a6d88cb8 DIST libc-0.2.161.crate 765389 BLAKE2B 4880efbc347e0b92faa893993f37c486a69afd1a3c741cfb9d3a2d3c87fd56e49788f8aeac17baca217f4ceee9180097386ef481f4e142942802f27983f8e6fa SHA512 264d7a872c10484b9cb19ee858c2ac44bf165297653fbc6220672bd2e0ba10913408130f21d370d2861eef529f9ecafece66515b47b4461d56e6b02f55ea2be8 DIST libc-0.2.162.crate 769354 BLAKE2B 3bac6124db801cdcd6918ccd86e84c99cced45c44dba11f198ec5852354942db511966fc85347d2ce4c8ff82c89eef2c47016766b2f6ffbea20d99c1deab4ead SHA512 f43e294d587e7cd9c2da9b67be83fc70801ea66c318342cf1e11556566ecc1c8a612925770d85c75af1e887b425f326fac59229b78877d2377092243ea8e6a99 +DIST libc-0.2.164.crate 769055 BLAKE2B cfb757ea04ec8ad6d6a0dff92cbedd626aa4932cd83d67d19ac51cc140f9aeb54b38b488796c4a0e722f7bceaf54c4807a32ec0560bae4840a82fc1c4a5151ab SHA512 614835ee7388c854cacdc179b5700b7de0c696ec0eebca2b997f1039157f737fa79e208832a46f2fa27fcedb6fe7a27faf26079f06ee0e679b6f35d4a5371e3f DIST libcst-1.5.0.crate 111472 BLAKE2B 55a5b824be6671f50fe9a5f26c31ebd399f23529701c59c6c81247142bd51a13dc0e6a44256e30c920a1e60c17a048c72c5181f93f8759c3fa52863c7d241418 SHA512 a7cb011b30573f213420c7b014887d47f1f2e42433bd02362abb53d1747cdac9f29b388eb3dbad9c352581439f129bb6467f626ecf79fd68332c682e2791ba67 DIST libcst_derive-1.4.0.crate 9303 BLAKE2B 4f6f05578fd57328b80913cb594b3cc6944b8ac62bbee747598a0502c044dc77e781836ef7b7e01046d92990514b5168c553f87ccafe2197c328bdd833b3c613 SHA512 6095719fbd5931d1e8e9e60ae7c03b03b9110ecc6054396e1a086e7fc7f1642a6085deff0d90d857ae8f0037aa8bf396a9b5a5660941c0de4cc659664a41034a DIST libmimalloc-sys-0.1.39.crate 198523 BLAKE2B 371751d8eabd682d879a4d85b163d3c2f3dc3968232241cd2d7b573a5b78164efa6cd90c2b81d350c69354fee5676edb3e37f75f676731fccc913a83878c7358 SHA512 db578da8722b82eafac3b587b2db24cbf95fbd85a25b7ce30286deb9eda6820b5d452ece7c3126a2d8c96400941dc3946b4cb2f46172241861405aa09a3a2451 @@ -214,6 +220,7 @@ DIST peg-runtime-0.8.3.crate 4159 BLAKE2B 10183478eaec5d3057eb8d6a4e58728dad682d DIST pep440_rs-0.4.0.crate 24329 BLAKE2B 1e2034cf404009a548d9082ad335b12109068562056a81cd985927c29ede9b43a3fce0bfb58689a9a9a44d7eec93ad73349618acd5838b645b2dc4f56ffa2466 SHA512 4a46a43abdcede7ce9f3d23f40cc98cd73150cab16dbad40caa463edc8357f65a5520e5553e0950b7512d90b635c7480e1bbdccb741708e1914b5016a26c4620 DIST pep440_rs-0.7.2.crate 44479 BLAKE2B 5a949d7a57cd77fc06d7637180ea171a89feac24a78a70d193e2031400886fce0248b8dadc38ec4f715ad755387ffabd619969fa7e3ee0c370ef42c85cb8114e SHA512 8820ed27804cf008d327180b9984d553f2d2ad9d8e0618e4fbd176a55db54dddaab5babb7a77af8325012d36e82d7e48af3704bc3e7efb98da8bd4f20ea53998 DIST pep508_rs-0.3.0.crate 30053 BLAKE2B 264845b05ad3a85643066a256ba9aa40d2638e4445b541b910e94f30b2d5b5df0c449214176e721612327d46bb8c956ba7c34801b8007fc0f50a26498528cae2 SHA512 77dce8f4816c8d582e098031fafe3ad8d39e11cec47954e70fb6a82d0aeb524ef90e240759c75eb7f024763423fb8fdcd2a42c635d184920a262b87bece3003b +DIST pep508_rs-0.9.1.crate 70869 BLAKE2B 3e28a0e6226e790aff8fec45b598a23dfe2a5d571349f262755a0c62eca6bad682ab7fdb3f6fd732f13cbe61f7ff68eb2a30fe9318d789bcebbeed46a8a1935f SHA512 df85ff3eea3dc4c2ca71992c06139f96ff1bed175eb6deb50f442592858ed61ac2d9ac42a9117d54e9233dcd56f0124713cb274bffe51692f906ccd940e12684 DIST percent-encoding-2.3.1.crate 10235 BLAKE2B cf8e2fd7b359a05b7bdaf731f9ae84c7fe6f468a53482eb2db7f93dfdaab64ac812b3664899db260055a93449462e6d219c695942fc5b030517b197b4df9b95f SHA512 5951ea8315e52cf3acfbaa023cb9e13a136b114c54a7da0bd44619ae24cd2159d4a96469d7572a2fdabd94e19513a033387117d7ca81d0eb409fb383e4acda44 DIST pest-2.7.11.crate 123779 BLAKE2B 23bb1f3453d5d839dba7b3292806eb2d327ccafb1b1472fd970262a44c0abbabfbf3316ca16dd5526177bcb67a701cf79fa86b68fd1e57a3d875cb4b7ff89ad9 SHA512 daf92b28d8757d0c41e347668e54b90522d654a451ba03d01d9aff9b22d6c57b6a264237c5c8b1340e45605626fe848dad84672ae2e83604ce22b2c89cbd08ac DIST pest_derive-2.7.11.crate 36320 BLAKE2B e81ed8b60492da9612d2208c6cfa712ebf8c6ed7993642bfc4fadeaba10a0bc16700bce012d34d955104041ed8bbf659d16d9b86eab52342875d4c6148e7f60d SHA512 96f6b44ac09785ce5981f082ddf283a178c676a0b436f9b0cf7afddc8be38583f0512adce83363f0ee8ec4f26bbfba01e30dcb17d9420adc00b0a82c10349b86 @@ -232,6 +239,7 @@ DIST predicates-core-1.0.8.crate 8552 BLAKE2B 774ed04fea09335ae9b4e87a237871f954 DIST predicates-tree-1.0.11.crate 8393 BLAKE2B a8ed762ab18f3cd72ed749cb3db3d756dfd2d3875b0f1c68a99e39ed4ac5c7000086606c21a834ea0a81db961ceab659a4648435d9eaf1bf3d7f29d92410efb6 SHA512 e1b08010f9cab65c75d82cc44cfdf64d92127acf6a72ee0ce1533e5d7d8027ccab912e1c499b7b78508b5e3cb20dc03df94de3dd520ae13736906a5f374b10cd DIST pretty_assertions-1.4.1.crate 78952 BLAKE2B 016df9fb2f24304b68a6bf4fc8e144387f07a5a15fc8d92757cffad11b4a00e74559abf597d4ac8619a3dfea705c82df1b8c8620c5f32c61ea8f212fd9cbf9f5 SHA512 474f77c61cc17bbe9914c56b98a80e5918450205827cd059d693c2d603ff61a0897cad25dde645cb495200e61ddc14333d15eb8bf2de090a2eb68deeb9aec8b0 DIST proc-macro2-1.0.89.crate 49446 BLAKE2B 844c021394e7a2551bc179592a6769d672360150abf92debcb9ac60a94a2e426c48c408f06aeb2128686f5f04d66dc12973714670c21a5063ee6b9f3bae4e671 SHA512 488ab38a04df1d0330309382a7e4f667238cbc9b4d513da6a8f5718f8a762f76cc122af67fefe8f4b021a286b3d23e3ec83d781fe6ac823042a6daf14d147e2f +DIST pyproject-toml-0.13.4.crate 10535 BLAKE2B f308e174010d5352116a86da96b24083a20c73d72d5e968704d3eb5af3b15e543f7a30b21ac1ab75fe983d065278812df78fbdac11cdc5bc25aa24cf0006e693 SHA512 97e36aad3533ac80fd0679eb1c8a118b006f05cc135ef48a5f7c33cdb521303e81617e490a044f960804ef4710b604b85ffb57af5010b5846f79d291e0c43281 DIST pyproject-toml-0.9.0.crate 6041 BLAKE2B 43947f872bffbdc37e1be5c8e0654f94ff0339c71244a519ecfaeba47a4204bbb004021bb5ca48cc07bd2be9146c288afdbfba8529b9d461798d235af390eaaa SHA512 d6475d4bed6a74392a0322dcf1d0cce2f8974616afb931270eb410e7c44fc8750acb1bd250b89203eaeda04efd5845e38d7618f762c3946012d5d3e77180b610 DIST quick-junit-0.5.0.crate 20994 BLAKE2B 5886dc3d865d2d094542ccf66a5c542ccfadcbf34cd42634ed92e7454d129aae208ccb038e300e2836784fdd3297d24a2de536581c02a8b032d11c3e9395af4e SHA512 4eca172e9abe33210d71a65bd9f1d54333f06e7119879158b4d131f618320236c199b1ab49904d31b5c67d7512649b6ed97b3cf2e0bb0858670b31701b7f275d DIST quick-xml-0.36.1.crate 185352 BLAKE2B 0ad31fb7210bb9c71ee480d400d10c01e02fdc509ccc275305cdabe29aa7d3816ffc7854371e493d3b4b28d43452bf7ef393f7ba4ca556d311cc83f7887ee802 SHA512 21233a50b5ec45db623d4043e03962a19f10cae36fcf3074c32eec3c007a59310ab884352b6c880632535164745fbbf2985d27cd549d50b509f97395a0d48248 @@ -252,6 +260,7 @@ DIST regex-syntax-0.8.5.crate 357541 BLAKE2B fc6d125f7a8574c37d81c75cbfd447cbcff DIST ring-0.17.8.crate 4188554 BLAKE2B f531b15cc5cf88f2ef00b1708473a7e98a42dbbd026027ef2c42f2d8bdba0eb1665621fc98db618252f6a131bd54b1493987a0285bf2b9a22eba4c9409ee1cab SHA512 e4966409a4078ee43bfc9cc659d08ad28419effe2a729c8c275361a7fe0620a3c727009bcfb1d0bab265af2bc107b50c19d868a4e80da7a8bb55f97e8b214358 DIST ruff-0.7.3.gh.tar.gz 5325798 BLAKE2B 5a02c5c58f6b48198796ad2cb586158692e01a0c471edbb7a1ab32c1ab5ecf8e77aa73947a20d4467db39c09bb77ba7730832fa888f9b2510cb848df8d88332a SHA512 25fa601b995a3bfb90d6ace3bcc163b21e0bdbc22465aa95137d308bcf9a87416c9edfde2cdf3a9d8b9d2fff1602351b141fa0fc7e39603710784fbb4b9a28ec DIST ruff-0.7.4.gh.tar.gz 5369146 BLAKE2B b62cee5be9b469c85e817b6870e7ba31c0aa5a1abffb3a4470dc4beee80421effe30c4c2c0ed7801cae63fe7a0e78b0685d8aff2fb9c6b228ea6caa58893318a SHA512 5e86c18774a6ef925a2486e8cb4cff17dd8317847e02d761ecd2b45b7a51c50918be9b880d8adc827093283f077ad0c4d685e8cd54f8800526c3b84b3fee3db6 +DIST ruff-0.8.0.gh.tar.gz 5392373 BLAKE2B 063e32d003e13426dd33ee02f1edd021b3fc82b43f37971a45065f8d29b83bc78b489d6165b07e0fc4d3e47aed433ac3699839eaedc556cdb1d2e7bc02257265 SHA512 6973c298633dd5d2cb21ef89dd753874fd1c97ff2a912f994bbf86d2cc0683d045dfdb46a77663d5ba35745f03150f19c254cc0959bc2d831857d425542730f5 DIST rust-stemmers-1.2.0.crate 2351301 BLAKE2B d633c0d7091fd05e55a521670104831bed89deef7a2fb7c1eed3528246e65b67a97888fed48b134b10c477e7b95c034e8bbad70500c779b1ff7b0c334de0b37b SHA512 b9453a0984d41e5a692e5ea1a8a7bc6142de30f7b345a269489b8d4ebe3b3d442e7fe5f338c72a790521dea7a2ad9605c0ca8218a6b76d8bc5e19ae02cf711d7 DIST rustc-hash-1.1.0.crate 9331 BLAKE2B 16ac56622897f47a06b661fb59a196b08d48e782ab87549c8bd5c6fe92f374c9bfd44dcb36588512bd9b6125c2fd79a12d648aaa308fd9694bcca3a7c1b49ac9 SHA512 84e673ea9b046f7b989d47f2c4505557fbd5de991e6fc9f56a03605d40e0b4ba5427cd566954890153cc033ccbec6c984306634571935bfe0d4cdfbe56f39544 DIST rustc-hash-2.0.0.crate 12691 BLAKE2B b6a619f681e897c8a9167bb88d6ba78715010ac6c1ef9a7a9e115fe8aab10fcd9d4f5e1893e89a36a59118819dbf67de3d261a190fe37948137f097bc99b3fd2 SHA512 996ad683db2e6839ee28fdc4a31293aecce7baefaf6051220a633a00beddef1be41aef0995d7501e5b92dbc85350ced920bc980d05f5ba235e9a5d1a13464339 @@ -270,10 +279,13 @@ DIST scoped-tls-1.0.1.crate 8202 BLAKE2B 20be49f0546691bcff3f0fc257345e432e20083 DIST scopeguard-1.2.0.crate 11619 BLAKE2B 8b7e9ed6cefef9ee55407fb9690d57a2a98bb93e5105aeebdb475a52485e9e185255249e1dce8f83cd80534e7402d485aac3efa7e8493b13135de27550cd4bc4 SHA512 6247719a15fe1e4e2d179127b9a934bd2f99367724f41175ed9522f58824b6bc69b35002eae66b35880375ff61d77ac43ddaa78cbde7160a35183a1da32d3fbb DIST seahash-4.1.0.crate 31976 BLAKE2B f553bcff7af9da9b024efd8db4ec8cbe4100dcf4ccd8f627c724fe4a34b678ef0be8da44e92ea55c4622b9f9f37228792a22c8bcdd54e652ca926eb3c7d37655 SHA512 4d9111dd2e491c7f6d49e0b79a3c23628c02d6603ac46e88ed137ca737830003b549ccb38087679de2cf0b02a53065b89f8d79e0ac9ddb66844d970cc6383f8b DIST serde-1.0.214.crate 78523 BLAKE2B c701f316a3204625d475668d2722991d75c8d9c573ae32e9175ccf99780fbe0c9c9d1dd0b4bac35f2cc91aca888c7f3dc41af2842dd833ab82776a38c2a2f6c0 SHA512 100eac65a39b9b9c32c1671d36fa9cf8aca84a2673e24c2521fdbdb3ed9f932c71548f3f1a26b1e73dd7c92a34ffa8ed1c76eb173fa20d6e85736cdf8dc9a8ee +DIST serde-1.0.215.crate 78527 BLAKE2B ca8e1175839ca45a4d78a155f5943396211408a85e0840b065c52948188010653d68fc4fc7b63bf2c39a11a6988abb7f6f3c6d878ca1373596e0a5d62186e109 SHA512 3da13f1a74393f1fcb6d659b5e060a11ecae358f55cdf4a2fd05bfc863fea6f75d3140d3bc74902f8feba8cddf7dae71a3f4e4e78e78e1b08ed46b3e4900281f DIST serde-wasm-bindgen-0.6.5.crate 21098 BLAKE2B 34b7a66752422c21031fb21202c8405c43a1e6758eb067b4fafeb24f812280e70bf16c27bbcfa4b4b5723e369bca81e42020677787a79277f32f71eaab6822fd SHA512 c457b1e8c83760d94eaf8eb49169cd620cc1fd8246af8953503c2bea9c4ae916f3de3b9070bfd4102a713f8d843b6ee96404e27b21a48c589b444aae0f9303b1 DIST serde_derive-1.0.214.crate 56630 BLAKE2B c284561109e5d60e103f1bb421e4da48f35c5046aa52359177e286449cf8fe51a92f6295f5bec3dc4cd737025e8d0bc618436e2f7640873f66bc5b77bb4f450a SHA512 70bc0a31d344cfec8d30f2034beab25097ef76ab8d89947b21753f737759e5d4e60e5596e0c7994a7cc35993bae01148120f6cdf5239be25fb243056effa27f0 +DIST serde_derive-1.0.215.crate 57092 BLAKE2B f28bb66017599afdcd8d45c514b8e07854eb944c1dcf931e052a01ce421e0de6c20c13b3867da5922e2153e25ce88bf9fa27e2e68ddc9d212977f71fa0bd6352 SHA512 cae686bdf10c683149956ffe1c64fcf3e9b9bf0cd6e33b4ce7429d0ca35b9fdb55443693866c1202fa79348c6ea0f49ab3be3d5f857de4ae0818d2b4c8c67d9b DIST serde_derive_internals-0.29.0.crate 26065 BLAKE2B 522b09f139554a52201ac397323f0124b809e9e9ff6329b34afa99f90cdf65fb3cac8370d6ecb712b72dd8b5a1d96f7f7c4ffc9ac6718eaa8a66e1aaaa28d891 SHA512 ee6e53fc58aaefb2ff953bf58ef90af3c74151f5193fe7a75d8afbc6e3dfb83d54c514ee1403b5283bb7d25ff71d24c1d8622bf1bbe940e2ab8821938d4dff21 DIST serde_json-1.0.132.crate 150549 BLAKE2B a49aef7737fad2e6f6ec79cb6da00c734e7de7ef16be321846d1f6229534b58e15ceb0f6306eeae6f85bf07431d82959c0a56ed1394d21a67b65c8c48e971f3f SHA512 9d157ce7d705fee8245569e7c577310782b69675a6e459f21904544b824a1ca5c9b445d17419fee438dfeb6fcc35343ba14e022043fffade0210b6d2c1b5795e +DIST serde_json-1.0.133.crate 150739 BLAKE2B 7891eb5b8edcc7fd09ab1e15d3881ffdcb629aa39f2bd758c0505700a5f2dfabd85b1b66c3b094268bc1627b346e204c792f4ca61efa76c54ab9cd5744fb0ee2 SHA512 20e65ec87bff319897a141960d13deb5cadcf821209c1ee8799f1dc7f458ce432bc62c16df5bdada1c8d3cc01ff23b8125e8fa0a03545d4614f32efd687dc69f DIST serde_repr-0.1.19.crate 9997 BLAKE2B 1bfc8e94b8c3cf897813f4749d6a1112c1097c2c257821eb366073a41ac46084a21bdc0ee4e3b99d82444619a894472e24fccb60cbd8a41ab7d5b0469cad7c41 SHA512 678216a62702b3300fef850f10ee60d88f31de1fbeb7300e3fbbdc4e4a9cbc95c6890c8e7b9385223ec837d9504edd53e69b620f80609e54579c0994ed1ab0a1 DIST serde_spanned-0.6.7.crate 9164 BLAKE2B 559a62c0ac00a1559947224bd268842f35c52f65d0d52102c98b5e683dfe4c36acb015edf97c5f79ff818dc575b3ae43c3f100d18eb7afc3ab9c96e348ba6794 SHA512 d0ef413867a705080fa68f84a059b4d04b604bec59323329ded7ae03e0caec49c89fc53640c1e58c27bb23b5c9f260ed176ac52f3a93d25d8d7643252dba037f DIST serde_test-1.0.177.crate 18671 BLAKE2B 85efeedf5465ba9258f7138667cf547b4e3934b5b3cf36ceb09be04ec6ab32c77c43e7130cb1302a642586f0554c66ddaa5633f9644f9250c9db0b978993f8c3 SHA512 11be2b5f2f8e18ae5b787f26517cfd0be4750b021f792ec90f74425c54292c7b8e1525758b7fd9459d764fc1c104e6def95c14fe685261425aa162582074bc6c @@ -347,12 +359,14 @@ DIST untrusted-0.9.0.crate 14447 BLAKE2B 8e9c3ae09435af0885bc4a6e3c8943805b48cfc DIST ureq-2.10.1.crate 113163 BLAKE2B aece4293775ee9bed49dfd7c1761fdee20c92322dedf70431b6214e8a40fd9f63e43d2846c1929135005c5260ffba4a388d779a2cb2808eb892b6b869f65fa08 SHA512 9944f0790b9c342a3584bb9217d0546dc4272b011bdaa47d22b42684dd7f655aad22750d395875c63e7c92d8d44ddf1ef610061b485f9600dfd79b4db5743656 DIST url-2.5.2.crate 79704 BLAKE2B be3526298a8816fbd88385caf49c2d58aacc7dcbe2d9183478cf501c26fb5f22d7704ef1313ba6d355e849cbf8ab7980310c1aae85e253a2b28d59099e23af29 SHA512 2515903e41c0659cb226f9bb049ef80f2a49d1b609b6ac480e570a84e899088ffe3be4fb58f41a1fa7f5288eb5f97ab513f331aeb6d56979df783d48e2ace28a DIST url-2.5.3.crate 81624 BLAKE2B 431a2594ba962fd36f7cea3567d689f15cb09548a8a2b26a7dfeb95ad5cff3ca21d22145436b23a35cefd676002b097ce271588be1c1bce24aae22c372cfa9a7 SHA512 f9dcdaa395d2ecc9f4968a440cdbf59b49d91787bbeb622846f915c92ac51a402751804928ed7bd52e6980cb406ffa64d11d939065c6d261c4979ce199ab5359 +DIST urlencoding-2.1.3.crate 6538 BLAKE2B 65777b0990aa6b3d27a47f36114da8622026ac8946b5ffb6e04172b666ec7244a55c250a7fb626472bb2b636eb32ee945599cee5ce7351c3cef2322366db15ff SHA512 035848d9243ed6a4528377b56edd7f8bcb5f824381b420dc8f5c4bfc3f1246655c54eaa7de0e4aaa7138e0b08fd796b9ace140ab919aed2d94f6952b577386ac DIST utf16_iter-1.0.5.crate 9736 BLAKE2B edcd9776113d4d2b267a9cbd58cab11c5497ff1a8252c4e695de619fc8e5eee1595343c857651774b3670d13392144e9d7df579f2e226842aa7e4e023a76fb65 SHA512 44dcbc5a7db149392fdaa31862be240f78fc5d7616f54be32cfc8f3adbee310e8681ae1bbe6edaad8a7fe6e7759dbac8ae4f69d0dbdbe5350c21dccdbbe975fa DIST utf8_iter-1.0.4.crate 10437 BLAKE2B 1e7a8b9241ebbb62cb497542b970473780f735010a0af900771a43abceae4e7f362d21d4f79f7c00630e4549400875ea17574b2cbe4f5ea19e8ed428e3b5577d SHA512 a72671995b3eb295581c60dc632e4a25ba257227fb5d58a8bec322428b6d69529bba79a6f02b8e7ee6698b7779d9d6695f5badad73e07c254b00c9d6256c9090 DIST utf8parse-0.2.1.crate 13435 BLAKE2B a1c111d7ffc60690f2aaa86f034c66ba1abe4e126f1774a4377d41eba3269369862f57515af387ea785d69a8adf46338b5e53761b5ee6f4f4380473f4d9cab0a SHA512 51fba8f1e7eb74b7020fd831e30a67fc8353ac2ee07335c8c3374a5570ac8117f165f6905d4b7f0360095b7b5ed3e739001d02a8cc3c89195baf2cd679136050 DIST uuid-1.11.0.crate 47683 BLAKE2B 37a601b0fe7ec57333613f8c18ada76bd784c43c8af7c252200a7c9c76b445b179931cdf727b5ddae3ffa3fa29c5a13507fb0f2bd604d306982843e042038314 SHA512 0cd1b95fc2247bf4e627de6abb41e332ebaf39e5720640e52b9f235f7a0e2d451e7a486efdabb616ce00e47832d21919611683d0e6a71c86a86f290940cfda32 DIST uuid-macro-internal-1.11.0.crate 9225 BLAKE2B 58f0c923185e2910601d6fed49fdf83aa1ec1c56629d9a8d938fe896f14a17166fd2ec6d55d6d9c3efaa0146a700d685b9513ee2dbbdd6c90a75d26944db2af4 SHA512 f6a3b4bcedf71b1d2ee9f1d57b772257624a88ea7b38e475d783db8c9a5e54e123350d9f8f6b235fa767bf75620fe4aa87e3e9c660fc1fedcaaac0b3ca474aff DIST valuable-0.1.0.crate 27718 BLAKE2B ef5ded994c9a6dd302bed27f0d757447b0c86dfefa499c1ef0d25c3a6745ce61cfa2c926826534c9f605f9b89b4a19f91f06f94ae7c03f1ddc4c58fab3ae58bb SHA512 a97f65db1f1c5049a276dbb0e45e25c6fc6ce9d27ac1fcd77c945324cd8216ef60344065c79799ca04e338455e4f7422c44078eea32d5fc359dd0211ee7eb387 +DIST version-ranges-0.1.1.crate 13740 BLAKE2B 79a2a1dd28e41b3d54bb57d773be72bbf1161394860139703a71ed1a553fcafeeaa13eaf264f75047b4d6275b2f5f7b1add06a70b5b6d3eb5a40009919b140ff SHA512 96e3d9802af828fb61a0bd75b722c313b0788c0bd4d5f91042db298f1a308e37528823325ce7acdc4fcb2611d26f5f68e8dc08ee72da5685f3672c4c402b47ef DIST version_check-0.9.4.crate 14895 BLAKE2B fa1fa4008af165bfc1fdbe560488afd9d232cfafee94104fbcc4cbc52f234849bff9ddfa88109a1ac682f6d9c1d86b0459893d223f64e65adc08966aaf93dc89 SHA512 b172dc9a3759a4a683ffc39b9a40b03b9974b626a088217de87090466cef695226557c226cf3e469b2b25ee7297b7eb0d7719878cab42457f80146a81943c0c8 DIST vt100-0.15.2.crate 30404 BLAKE2B 66964edb8ec34dc9d350b55d74f03c88d843d67fb5fa9cdd93306f45f2076ac7a2a0f5d8c09a81d9fd206c62ca060f6df12205784c6d2da1e084aecbeae2de15 SHA512 aaac73376e2ac0db4d1c3ee31f22b741e8ceb4b763feb247d566b1c81700bc0aa64851732993e56fa50c0197656a2668721a9f7f823433a0c6fac2fc09b62a3e DIST vte-0.11.1.crate 40455 BLAKE2B 7a24759e15a87ec17c9869c02b4875f67651b2b50431d71acb60b4e16874240be691ad33d3336d7ad6b9f39d79fc7aa33e6c6604e616f904d8ec48538851f679 SHA512 43dbad0fe71305159736c5578f015a4cb2668922263f43cf09019efb40b09e5bfff13816ffa9aa1cd8d3a20dcbbc9ea12f223edaee1b44ed8e3f112f97020a5b diff --git a/dev-util/ruff/files/0001-red-knot-Fix-unit-tests-in-release-mode-14604.patch b/dev-util/ruff/files/0001-red-knot-Fix-unit-tests-in-release-mode-14604.patch new file mode 100644 index 000000000000..ce475ccbedd3 --- /dev/null +++ b/dev-util/ruff/files/0001-red-knot-Fix-unit-tests-in-release-mode-14604.patch @@ -0,0 +1,109 @@ +From 22d7ece91d625ed2e673d0f44402f224b25c5335 Mon Sep 17 00:00:00 2001 +From: David Peter <shar...@users.noreply.github.com> +Date: Tue, 26 Nov 2024 15:40:02 +0100 +Subject: [PATCH] [red-knot] Fix unit tests in release mode (#14604) + +## Summary + +This is about the easiest patch that I can think of. It has a drawback +in that there is no real guarantee this won't happen again. I think this +might be acceptable, given that all of this is a temporary thing. + +And we also add a new CI job to prevent regressions like this in the +future. + +For the record though, I'm listing alternative approaches I thought of: + +- We could get rid of the debug/release distinction and just add `@Todo` +type metadata everywhere. This has possible affects on runtime. The main +reason I didn't follow through with this is that the size of `Type` +increases. We would either have to adapt the `assert_eq_size!` test or +get rid of it. Even if we add messages everywhere and get rid of the +file-and-line-variant in the enum, it's not enough to get back to the +current release-mode size of `Type`. +- We could generally discard `@Todo` meta information when using it in +tests. I think this would be a huge drawback. I like that we can have +the actual messages in the mdtest. And make sure we get the expected +`@Todo` type, not just any `@Todo`. It's also helpful when debugging +tests. + +closes #14594 + +## Test Plan + +```rs +cargo nextest run --release +``` + +(cherry picked from commit 0e71c9e3bbd78fad878fa4d09126a7b305d06fe2) +[Strip out unnecessary CI changes -- Eli] +Signed-off-by: Eli Schwartz <eschwa...@gentoo.org> +--- + crates/red_knot_python_semantic/src/types/infer.rs | 12 ++++++++++-- + crates/red_knot_test/src/matcher.rs | 13 +++++++++++++ + 2 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/red_knot_python_semantic/src/types/infer.rs +index 853abbe26..25a4f80aa 100644 +--- a/crates/red_knot_python_semantic/src/types/infer.rs ++++ b/crates/red_knot_python_semantic/src/types/infer.rs +@@ -5970,7 +5970,11 @@ mod tests { + "src/a.py", + &["foo", "<listcomp>"], + "x", +- "@Todo(async iterables/iterators)", ++ if cfg!(debug_assertions) { ++ "@Todo(async iterables/iterators)" ++ } else { ++ "@Todo" ++ }, + ); + + Ok(()) +@@ -6000,7 +6004,11 @@ mod tests { + "src/a.py", + &["foo", "<listcomp>"], + "x", +- "@Todo(async iterables/iterators)", ++ if cfg!(debug_assertions) { ++ "@Todo(async iterables/iterators)" ++ } else { ++ "@Todo" ++ }, + ); + + Ok(()) +diff --git a/crates/red_knot_test/src/matcher.rs b/crates/red_knot_test/src/matcher.rs +index 6d8b0488c..5c8b7328e 100644 +--- a/crates/red_knot_test/src/matcher.rs ++++ b/crates/red_knot_test/src/matcher.rs +@@ -180,6 +180,16 @@ where + } + } + ++/// Discard `@Todo`-type metadata from expected types, which is not available ++/// when running in release mode. ++#[cfg(not(debug_assertions))] ++fn discard_todo_metadata(ty: &str) -> std::borrow::Cow<'_, str> { ++ static TODO_METADATA_REGEX: std::sync::LazyLock<regex::Regex> = ++ std::sync::LazyLock::new(|| regex::Regex::new(r"@Todo\([^)]*\)").unwrap()); ++ ++ TODO_METADATA_REGEX.replace_all(ty, "@Todo") ++} ++ + struct Matcher { + line_index: LineIndex, + source: SourceText, +@@ -276,6 +286,9 @@ impl Matcher { + } + } + Assertion::Revealed(expected_type) => { ++ #[cfg(not(debug_assertions))] ++ let expected_type = discard_todo_metadata(&expected_type); ++ + let mut matched_revealed_type = None; + let mut matched_undefined_reveal = None; + let expected_reveal_type_message = format!("Revealed type is `{expected_type}`"); +-- +2.45.2 + diff --git a/dev-util/ruff/ruff-0.8.0.ebuild b/dev-util/ruff/ruff-0.8.0.ebuild new file mode 100644 index 000000000000..580aaadfd587 --- /dev/null +++ b/dev-util/ruff/ruff-0.8.0.ebuild @@ -0,0 +1,480 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.13.4 + +EAPI=8 + +CRATES=" + adler@1.0.2 + ahash@0.8.11 + aho-corasick@1.1.3 + android-tzdata@0.1.1 + android_system_properties@0.1.5 + annotate-snippets@0.6.1 + annotate-snippets@0.9.2 + anstream@0.6.13 + anstyle-parse@0.2.3 + anstyle-query@1.0.2 + anstyle-wincon@3.0.2 + anstyle@1.0.8 + anyhow@1.0.93 + append-only-vec@0.1.5 + arc-swap@1.7.1 + argfile@0.2.1 + assert_fs@1.1.2 + autocfg@1.2.0 + bincode@1.3.3 + bitflags@1.3.2 + bitflags@2.6.0 + block-buffer@0.10.4 + boxcar@0.2.7 + bstr@1.11.0 + bumpalo@3.16.0 + byteorder@1.5.0 + cachedir@0.3.1 + camino@1.1.9 + castaway@0.2.3 + cc@1.0.95 + cfg-if@1.0.0 + cfg_aliases@0.1.1 + chic@1.2.2 + chrono@0.4.38 + clap@4.5.21 + clap_builder@4.5.21 + clap_complete@4.5.2 + clap_complete_command@0.6.1 + clap_complete_nushell@4.5.2 + clap_derive@4.5.18 + clap_lex@0.7.0 + clearscreen@3.0.0 + colorchoice@1.0.0 + colored@2.1.0 + compact_str@0.8.0 + console@0.15.8 + core-foundation-sys@0.8.6 + countme@3.0.1 + cpufeatures@0.2.13 + crc32fast@1.4.0 + crossbeam-channel@0.5.12 + crossbeam-deque@0.8.5 + crossbeam-epoch@0.9.18 + crossbeam-queue@0.3.11 + crossbeam-utils@0.8.19 + crossbeam@0.8.4 + crypto-common@0.1.6 + darling@0.20.8 + darling_core@0.20.8 + darling_macro@0.20.8 + dashmap@6.1.0 + difflib@0.4.0 + digest@0.10.7 + dir-test-macros@0.3.0 + dir-test@0.3.0 + dirs-sys@0.3.7 + dirs-sys@0.4.1 + dirs@4.0.0 + dirs@5.0.1 + displaydoc@0.2.5 + doc-comment@0.3.3 + drop_bomb@0.1.5 + dunce@1.0.5 + dyn-clone@1.0.17 + either@1.11.0 + encode_unicode@0.3.6 + env_filter@0.1.0 + env_logger@0.11.5 + equivalent@1.0.1 + errno@0.3.8 + etcetera@0.8.0 + fastrand@2.1.1 + fern@0.7.0 + filetime@0.2.25 + flate2@1.0.28 + fnv@1.0.7 + form_urlencoded@1.2.1 + fs-err@2.11.0 + fsevent-sys@4.1.0 + generic-array@0.14.7 + getopts@0.2.21 + getrandom@0.2.14 + glob@0.3.1 + globset@0.4.15 + globwalk@0.9.1 + hashbrown@0.14.5 + hashbrown@0.15.1 + hashlink@0.9.1 + heck@0.5.0 + hermit-abi@0.3.9 + home@0.5.9 + humantime@2.1.0 + iana-time-zone-haiku@0.1.2 + iana-time-zone@0.1.60 + icu_collections@1.5.0 + icu_locid@1.5.0 + icu_locid_transform@1.5.0 + icu_locid_transform_data@1.5.0 + icu_normalizer@1.5.0 + icu_normalizer_data@1.5.0 + icu_properties@1.5.1 + icu_properties_data@1.5.0 + icu_provider@1.5.0 + icu_provider_macros@1.5.0 + ident_case@1.0.1 + idna@1.0.3 + idna_adapter@1.2.0 + ignore@0.4.23 + imperative@1.0.6 + indexmap@2.6.0 + indoc@2.0.5 + inotify-sys@0.1.5 + inotify@0.10.2 + insta-cmd@0.6.0 + insta@1.41.1 + instant@0.1.12 + is-docker@0.2.0 + is-macro@0.3.7 + is-wsl@0.4.0 + itertools@0.13.0 + itoa@1.0.11 + jobserver@0.1.32 + jod-thread@0.1.2 + js-sys@0.3.72 + kqueue-sys@1.0.4 + kqueue@1.0.8 + lazy_static@1.4.0 + libc@0.2.164 + libcst@1.5.0 + libcst_derive@1.4.0 + libmimalloc-sys@0.1.39 + libredox@0.1.3 + linked-hash-map@0.5.6 + linux-raw-sys@0.4.14 + litemap@0.7.3 + lock_api@0.4.11 + log@0.4.22 + lsp-server@0.7.7 + matchers@0.1.0 + matches@0.1.10 + matchit@0.8.5 + memchr@2.7.4 + mimalloc@0.1.43 + minimal-lexical@0.2.1 + miniz_oxide@0.7.2 + mio@1.0.2 + natord@1.0.9 + newtype-uuid@1.1.0 + nix@0.28.0 + nom@7.1.3 + notify-types@1.0.0 + notify@7.0.0 + nu-ansi-term@0.50.1 + num-traits@0.2.18 + once_cell@1.20.2 + option-ext@0.2.0 + ordermap@0.5.3 + os_str_bytes@7.0.0 + parking_lot@0.12.3 + parking_lot_core@0.9.9 + paste@1.0.15 + path-absolutize@3.1.1 + path-dedot@3.1.1 + path-slash@0.2.1 + pathdiff@0.2.2 + peg-macros@0.8.4 + peg-runtime@0.8.3 + peg@0.8.4 + pep440_rs@0.7.2 + pep508_rs@0.9.1 + percent-encoding@2.3.1 + pest@2.7.11 + pest_derive@2.7.11 + pest_generator@2.7.11 + pest_meta@2.7.11 + phf@0.11.2 + phf_codegen@0.11.2 + phf_generator@0.11.2 + phf_shared@0.11.2 + pin-project-lite@0.2.14 + pkg-config@0.3.30 + ppv-lite86@0.2.17 + predicates-core@1.0.8 + predicates-tree@1.0.11 + predicates@3.1.2 + proc-macro2@1.0.89 + pyproject-toml@0.13.4 + quick-junit@0.5.0 + quick-xml@0.36.1 + quote@1.0.37 + rand@0.8.5 + rand_chacha@0.3.1 + rand_core@0.6.4 + rayon-core@1.12.1 + rayon@1.10.0 + redox_syscall@0.4.1 + redox_syscall@0.5.3 + redox_users@0.4.5 + regex-automata@0.1.10 + regex-automata@0.4.8 + regex-syntax@0.6.29 + regex-syntax@0.8.5 + regex@1.11.1 + rust-stemmers@1.2.0 + rustc-hash@2.0.0 + rustix@0.38.40 + rustversion@1.0.15 + ryu@1.0.17 + same-file@1.0.6 + schemars@0.8.21 + schemars_derive@0.8.21 + scopeguard@1.2.0 + seahash@4.1.0 + serde@1.0.215 + serde_derive@1.0.215 + serde_derive_internals@0.29.0 + serde_json@1.0.133 + serde_repr@0.1.19 + serde_spanned@0.6.7 + serde_test@1.0.177 + serde_with@3.11.0 + serde_with_macros@3.11.0 + sha2@0.10.8 + sharded-slab@0.1.7 + shellexpand@3.1.0 + similar@2.5.0 + siphasher@0.3.11 + smallvec@1.13.2 + stable_deref_trait@1.2.0 + static_assertions@1.1.0 + strip-ansi-escapes@0.2.0 + strsim@0.10.0 + strsim@0.11.1 + strum@0.26.3 + strum_macros@0.26.4 + syn@1.0.109 + syn@2.0.87 + synstructure@0.13.1 + tempfile@3.14.0 + terminal_size@0.4.0 + terminfo@0.8.0 + termtree@0.4.1 + test-case-core@3.3.1 + test-case-macros@3.3.1 + test-case@3.3.1 + thiserror-impl@1.0.67 + thiserror-impl@2.0.3 + thiserror@1.0.67 + thiserror@2.0.3 + thread_local@1.1.8 + tikv-jemalloc-sys@0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 + tikv-jemallocator@0.6.0 + tinystr@0.7.6 + tinyvec@1.6.0 + tinyvec_macros@0.1.1 + toml@0.8.19 + toml_datetime@0.6.8 + toml_edit@0.22.20 + tracing-attributes@0.1.27 + tracing-core@0.1.32 + tracing-log@0.2.0 + tracing-subscriber@0.3.18 + tracing-tree@0.4.0 + tracing@0.1.40 + typed-arena@2.0.2 + typenum@1.17.0 + ucd-trie@0.1.6 + unic-char-property@0.9.0 + unic-char-range@0.9.0 + unic-common@0.9.0 + unic-ucd-category@0.9.0 + unic-ucd-version@0.9.0 + unicode-ident@1.0.13 + unicode-normalization@0.1.24 + unicode-width@0.1.13 + unicode-width@0.2.0 + unicode_names2@1.3.0 + unicode_names2_generator@1.3.0 + unscanny@0.1.0 + url@2.5.3 + urlencoding@2.1.3 + utf16_iter@1.0.5 + utf8_iter@1.0.4 + utf8parse@0.2.1 + uuid-macro-internal@1.11.0 + uuid@1.11.0 + valuable@0.1.0 + version-ranges@0.1.1 + version_check@0.9.4 + vte@0.11.1 + vte_generate_state_changes@0.1.1 + walkdir@2.5.0 + wasi@0.11.0+wasi-snapshot-preview1 + wasm-bindgen-backend@0.2.95 + wasm-bindgen-macro-support@0.2.95 + wasm-bindgen-macro@0.2.95 + wasm-bindgen-shared@0.2.95 + wasm-bindgen@0.2.95 + web-time@1.1.0 + which@6.0.1 + wild@2.2.1 + winapi-i686-pc-windows-gnu@0.4.0 + winapi-util@0.1.8 + winapi-x86_64-pc-windows-gnu@0.4.0 + winapi@0.3.9 + windows-core@0.52.0 + windows-sys@0.48.0 + windows-sys@0.52.0 + windows-sys@0.59.0 + windows-targets@0.48.5 + windows-targets@0.52.6 + windows_aarch64_gnullvm@0.48.5 + windows_aarch64_gnullvm@0.52.6 + windows_aarch64_msvc@0.48.5 + windows_aarch64_msvc@0.52.6 + windows_i686_gnu@0.48.5 + windows_i686_gnu@0.52.6 + windows_i686_gnullvm@0.52.6 + windows_i686_msvc@0.48.5 + windows_i686_msvc@0.52.6 + windows_x86_64_gnu@0.48.5 + windows_x86_64_gnu@0.52.6 + windows_x86_64_gnullvm@0.48.5 + windows_x86_64_gnullvm@0.52.6 + windows_x86_64_msvc@0.48.5 + windows_x86_64_msvc@0.52.6 + winnow@0.6.18 + winsafe@0.0.19 + write16@1.0.0 + writeable@0.5.5 + yansi-term@0.1.2 + yoke-derive@0.7.4 + yoke@0.7.4 + zerocopy-derive@0.7.32 + zerocopy@0.7.32 + zerofrom-derive@0.1.4 + zerofrom@0.1.4 + zerovec-derive@0.10.3 + zerovec@0.10.4 + zip@0.6.6 + zstd-safe@5.0.2+zstd.1.5.2 + zstd-sys@2.0.11+zstd.1.5.6 + zstd@0.11.2+zstd.1.5.2 +" + +declare -A GIT_CRATES=( + [lsp-types]='https://github.com/astral-sh/lsp-types;3512a9f33eadc5402cfab1b8f7340824c8ca1439;lsp-types-%commit%' + [salsa-macro-rules]='https://github.com/salsa-rs/salsa;254c749b02cde2fd29852a7463a33e800b771758;salsa-%commit%/components/salsa-macro-rules' + [salsa-macros]='https://github.com/salsa-rs/salsa;254c749b02cde2fd29852a7463a33e800b771758;salsa-%commit%/components/salsa-macros' + [salsa]='https://github.com/salsa-rs/salsa;254c749b02cde2fd29852a7463a33e800b771758;salsa-%commit%' +) + +RUST_MIN_VER="1.80.0" + +inherit shell-completion cargo + +DESCRIPTION="An extremely fast Python linter, written in Rust" +HOMEPAGE=" + https://docs.astral.sh/ruff/ + https://github.com/astral-sh/ruff +" +SRC_URI=" + ${CARGO_CRATE_URIS} + https://github.com/astral-sh/ruff/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 BSD CC0-1.0 ISC MIT MPL-2.0 PSF-2 Unicode-3.0 + Unicode-DFS-2016 WTFPL-2 +" +# libcst_derive +LICENSE+=" + MIT PSF-2 Apache-2.0 +" +# ring +LICENSE+=" + ISC SSLeay openssl MIT +" + +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~riscv" + +RDEPEND=" + !elibc_musl? ( !elibc_Darwin? ( !elibc_bionic? ( dev-libs/jemalloc:= ) ) ) + app-arch/zstd +" +DEPEND=" + ${RDEPEND} +" + +QA_FLAGS_IGNORED="usr/bin/.*" + +DOCS=( + BREAKING_CHANGES.md + CODE_OF_CONDUCT.md + CONTRIBUTING.md + README.md + assets + docs +) + +PATCHES=( + # backport fix for test asserts with USE="-debug" + "${FILESDIR}"/0001-red-knot-Fix-unit-tests-in-release-mode-14604.patch +) + +src_prepare() { + default + + # Experimental cruft cleaner. These crates are not used by the ruff binary, + # and when they are removed in the git repo, the lockfile is regenerated + # and gets quite a bit smaller. Hence pycargoebuild also produces much + # smaller CRATES= variables. Less for the user to download, fewer distfiles + # to mirror. + pushd crates >/dev/null || die + rm -r ruff_{benchmark,dev} red_knot{,_server,_workspace} *_wasm || die + popd > /dev/null || die +} + +src_configure() { + export RUSTFLAGS="${RUSTFLAGS}" + cargo_src_configure +} + +src_compile() { + local -x ZSTD_SYS_USE_PKG_CONFIG=1 + # Gentoo bug #927338 + if use !elibc_musl && use !elibc_Darwin && use !elibc_bionic; then + local -x CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 + local -x JEMALLOC_OVERRIDE="${ESYSROOT}/usr/$(get_libdir)"/libjemalloc.so + fi + cargo_src_compile --bin ruff + + local releasedir + releasedir=$(cargo_target_dir) + + ${releasedir}/ruff generate-shell-completion bash > ruff-completion.bash || die + ${releasedir}/ruff generate-shell-completion zsh > ruff-completion.zsh || die +} + +src_test() { + local -x ZSTD_SYS_USE_PKG_CONFIG=1 + # Gentoo bug #927338 + if use !elibc_musl && use !elibc_Darwin && use !elibc_bionic; then + local -x CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 + local -x JEMALLOC_OVERRIDE="${ESYSROOT}/usr/$(get_libdir)"/libjemalloc.so + fi + cargo_src_test --target-dir "${PWD}"/tested-target/ +} + +src_install() { + local releasedir=$(cargo_target_dir) + + dobin ${releasedir}/ruff + + newbashcomp ruff-completion.bash ruff + newzshcomp ruff-completion.zsh _ruff + + dodoc -r "${DOCS[@]}" +}