Fix test_cargo_lock_update

test_cargo_lock_update was relying in Ruff 0.0.254 which used its own
fork of LibCST.
Ruff deprecated its fork [1] and removed the repository, hence this
tests was failing trying to reach a defunct repository.

[1] https://github.com/astral-sh/ruff/commit/072358e26
This commit is contained in:
Mario Rodas 2024-06-01 04:20:00 +00:00 committed by mergify[bot]
parent c8ba353d22
commit 5bfdcbecf4
2 changed files with 6 additions and 14 deletions

View File

@ -14,7 +14,7 @@ def test_main(helpers: conftest.Helpers) -> None:
"--commit", "--commit",
"cargoLock.update", "cargoLock.update",
"--version", "--version",
"v0.0.255", "v0.4.7",
] ]
) )
subprocess.run( subprocess.run(
@ -39,6 +39,4 @@ def test_main(helpers: conftest.Helpers) -> None:
check=True, check=True,
).stdout.strip() ).stdout.strip()
print(diff) print(diff)
assert ( assert "https://github.com/astral-sh/ruff/compare/v0.4.5...v0.4.7" in diff
"https://github.com/charliermarsh/ruff/compare/v0.0.254...v0.0.255" in diff
)

View File

@ -2,25 +2,19 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "ruff"; pname = "ruff";
version = "0.0.254"; version = "0.4.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "charliermarsh"; owner = "astral-sh";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-61Yw4YWolMZbi9nqDdkSH4UxIpPxUO4Aq44ABXZxMbU="; hash = "sha256-+8JKzKKWPQEanU2mh8p5sRjnoU6DawTQQi43qRXVXIg=";
}; };
cargoLock = { cargoLock = {
lockFile = src + "/Cargo.lock"; lockFile = src + "/Cargo.lock";
outputHashes = { outputHashes = {
"libcst-0.1.0" = "sha256-jG9jYJP4reACkFLrQBWOYH6nbKniNyFVItD0cTZ+nW0="; "lsp-types-0.95.1" = "sha256-8Oh299exWXVi6A39pALOISNfp8XBya8z+KT/Z7suRxQ=";
"libcst_derive-0.1.0" = "sha256-jG9jYJP4reACkFLrQBWOYH6nbKniNyFVItD0cTZ+nW0=";
"rustpython-ast-0.2.0" = "sha256-Q2PVP+noPvdjoe8OMzEZOHprSwvpu/rmMkllghnf/yI=";
"rustpython-common-0.2.0" = "sha256-Q2PVP+noPvdjoe8OMzEZOHprSwvpu/rmMkllghnf/yI=";
"rustpython-compiler-core-0.2.0" = "sha256-Q2PVP+noPvdjoe8OMzEZOHprSwvpu/rmMkllghnf/yI=";
"rustpython-parser-0.2.0" = "sha256-Q2PVP+noPvdjoe8OMzEZOHprSwvpu/rmMkllghnf/yI=";
"unicode_names2-0.6.0" = "sha256-eWg9+ISm/vztB0KIdjhq5il2ZnwGJQCleCYfznCI3Wg=";
}; };
}; };
} }