lol

tree-sitter/update: rename fetchImpl to updateImpl

+9 -7
+9 -7
pkgs/development/tools/parsing/tree-sitter/update.nix
··· 387 387 388 388 jsonFile = name: val: (formats.json { }).generate name val; 389 389 390 - # implementation of the fetching of repo information from github 391 - fetchImpl = passArgs "fetchImpl-with-args" { 390 + # implementation of the updater 391 + updateImpl = passArgs "updateImpl-with-args" { 392 392 binaries = { 393 393 curl = "${curl}/bin/curl"; 394 394 nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; ··· 399 399 ignoredTreeSitterOrgRepos 400 400 ; 401 401 } 402 - (writers.writePython3 "fetchImpl" { 402 + (writers.writePython3 "updateImpl" { 403 403 flakeIgnore = ["E501"]; 404 404 } ./update_impl.py); 405 405 ··· 423 423 ${xe}/bin/xe -F -j5 ${script} {} 424 424 ''; 425 425 426 + # The output directory in the current source tree. 427 + # This will depend on your local environment, but that is intentional. 426 428 outputDir = "${toString ./.}/grammars"; 427 429 428 430 update-all-grammars = writeShellScript "update-all-grammars.sh" '' 429 431 set -euo pipefail 430 432 echo "fetching list of grammars" 1>&2 431 - treeSitterRepos=$(${fetchImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') 433 + treeSitterRepos=$(${updateImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') 432 434 echo "checking the tree-sitter repo list against the grammars we know" 1>&2 433 - printf '%s' "$treeSitterRepos" | ${fetchImpl} check-tree-sitter-repos '{}' 435 + printf '%s' "$treeSitterRepos" | ${updateImpl} check-tree-sitter-repos '{}' 434 436 echo "writing files to ${outputDir}" 1>&2 435 437 mkdir -p "${outputDir}" 436 438 ${forEachParallel 437 439 "repos-to-fetch" 438 440 (writeShellScript "fetch-repo" '' 439 - ${fetchImpl} fetch-repo "$1" 441 + ${updateImpl} fetch-repo "$1" 440 442 '') 441 443 (lib.mapAttrsToList 442 444 (nixRepoAttrName: attrs: attrs // { ··· 446 448 }) 447 449 allGrammars) 448 450 } 449 - ${fetchImpl} print-all-grammars-nix-file "$(< ${ 451 + ${updateImpl} print-all-grammars-nix-file "$(< ${ 450 452 jsonFile "all-grammars.json" { 451 453 allGrammars = 452 454 (lib.mapAttrsToList