diff --git a/pkgs/development/tools/ruff/Cargo.lock b/pkgs/development/tools/ruff/Cargo.lock index 07e945a5164c..77ac3ebd9783 100644 --- a/pkgs/development/tools/ruff/Cargo.lock +++ b/pkgs/development/tools/ruff/Cargo.lock @@ -666,7 +666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.5", + "hashbrown", "lock_api", "once_cell", "parking_lot_core", @@ -680,7 +680,7 @@ checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" dependencies = [ "cfg-if", "crossbeam-utils", - "hashbrown 0.14.5", + "hashbrown", "lock_api", "once_cell", "parking_lot_core", @@ -928,12 +928,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.5" @@ -950,7 +944,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.5", + "hashbrown", ] [[package]] @@ -1037,12 +1031,12 @@ dependencies = [ [[package]] name = "imara-diff" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98c1d0ad70fc91b8b9654b1f33db55e59579d3b3de2bffdced0fdb810570cb8" +checksum = "af13c8ceb376860ff0c6a66d83a8cdd4ecd9e464da24621bbffcd02b49619434" dependencies = [ "ahash", - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -1062,7 +1056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown", "serde", ] @@ -1532,6 +1526,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordermap" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5a8e22be64dfa1123429350872e7be33594dbf5ae5212c90c5890e71966d1d" +dependencies = [ + "indexmap", +] + [[package]] name = "os_str_bytes" version = "6.6.1" @@ -1861,6 +1864,7 @@ name = "red_knot" version = "0.0.0" dependencies = [ "anyhow", + "clap", "countme", "crossbeam", "ctrlc", @@ -1882,8 +1886,10 @@ name = "red_knot_module_resolver" version = "0.0.0" dependencies = [ "anyhow", + "camino", "compact_str", "insta", + "once_cell", "path-slash", "ruff_db", "ruff_python_stdlib", @@ -1901,8 +1907,8 @@ version = "0.0.0" dependencies = [ "anyhow", "bitflags 2.6.0", - "hashbrown 0.14.5", - "indexmap", + "hashbrown", + "ordermap", "red_knot_module_resolver", "ruff_db", "ruff_index", @@ -1995,7 +2001,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "argfile", @@ -2090,13 +2096,13 @@ dependencies = [ "dashmap 6.0.1", "filetime", "insta", - "once_cell", "ruff_python_ast", "ruff_python_parser", "ruff_source_file", "ruff_text_size", "rustc-hash 2.0.0", "salsa", + "tempfile", "tracing", "zip", ] @@ -2177,7 +2183,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.5.1" +version = "0.5.2" dependencies = [ "aho-corasick", "annotate-snippets 0.9.2", @@ -2443,7 +2449,6 @@ version = "0.2.2" dependencies = [ "anyhow", "crossbeam", - "globset", "insta", "jod-thread", "libc", @@ -2587,11 +2592,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -2601,15 +2607,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.3" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -2709,9 +2715,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -2729,9 +2735,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -2751,9 +2757,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8eddb61f0697cc3989c5d64b452f5488e2b8a60fd7d5076a3045076ffef8cb0" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -2791,9 +2797,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.2" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079f3a42cd87588d924ed95b533f8d30a483388c4e400ab736a7058e34f16169" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" dependencies = [ "serde", "serde_derive", @@ -2802,9 +2808,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.2" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc03aad67c1d26b7de277d51c86892e7d9a0110a2fe44bf6b26cc569fba302d6" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" dependencies = [ "darling", "proc-macro2", @@ -2911,9 +2917,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.68" +version = "2.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "201fcda3845c23e8212cd466bfebf0bd20694490fc0356ae8e428e0824a915a6" dependencies = [ "proc-macro2", "quote", @@ -3305,9 +3311,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.7" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" dependencies = [ "base64", "flate2", @@ -3315,7 +3321,6 @@ dependencies = [ "once_cell", "rustls", "rustls-pki-types", - "rustls-webpki", "url", "webpki-roots", ] diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index c0d31e390d9d..aa96d8dbe363 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -14,13 +14,13 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.5.1"; + version = "0.5.2"; src = fetchFromGitHub { owner = "astral-sh"; repo = "ruff"; rev = "refs/tags/${version}"; - hash = "sha256-2tW/p9A7jpQg8ZmSF7KRuN6kBNKK1cfjnS9KlvnCpQA="; + hash = "sha256-g71RqbEoCpmCjd0CKkc++yv00ohoORDeMYAwYEHKhW4="; }; cargoLock = { @@ -31,17 +31,6 @@ rustPlatform.buildRustPackage rec { }; }; - # Fix compatibility with cargo-auditable - # https://github.com/astral-sh/ruff/pull/12275 - # TODO: this will be included in the next release - patches = [ - (fetchpatch { - name = "fix-compatibility-with-cargo-auditable"; - url = "https://github.com/astral-sh/ruff/commit/d0298dc26d471666acc01dacdb603e3e95aca06f.patch"; - hash = "sha256-Shf1Gw1pY98ZE+h9OhlpkJwq/S52EAJqUUk/uHix2fg="; - }) - ]; - nativeBuildInputs = [ installShellFiles ]; @@ -52,31 +41,6 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.CoreServices ]; - # tests expect no colors - preCheck = '' - export NO_COLOR=1 - ''; - - # Failing for an unclear reason. - # According to the maintainers, those tests are from an experimental crate that isn't actually - # used by ruff currently and can thus be safely skipped. - checkFlags = [ - "--skip=semantic::tests::expression_scope" - "--skip=semantic::tests::reachability_trivial" - "--skip=semantic::types::infer::tests::follow_import_to_class" - "--skip=semantic::types::infer::tests::if_elif" - "--skip=semantic::types::infer::tests::if_elif_else" - "--skip=semantic::types::infer::tests::ifexpr_walrus" - "--skip=semantic::types::infer::tests::ifexpr_walrus_2" - "--skip=semantic::types::infer::tests::join_paths" - "--skip=semantic::types::infer::tests::literal_int_arithmetic" - "--skip=semantic::types::infer::tests::maybe_unbound" - "--skip=semantic::types::infer::tests::narrow_none" - "--skip=semantic::types::infer::tests::resolve_base_class_by_name" - "--skip=semantic::types::infer::tests::resolve_module_member" - "--skip=semantic::types::infer::tests::resolve_visible_def" - ]; - postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd ruff \ --bash <($out/bin/ruff generate-shell-completion bash) \