aider-chat: 0.85.1 -> 0.85.2, fix tree-sitter query (#425990)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
diff --git a/aider/repomap.py b/aider/repomap.py
|
||||
index 23eee239..0a40f2e6 100644
|
||||
--- a/aider/repomap.py
|
||||
+++ b/aider/repomap.py
|
||||
@@ -16,6 +16,7 @@ from grep_ast import TreeContext, filename_to_lang
|
||||
from pygments.lexers import guess_lexer_for_filename
|
||||
from pygments.token import Token
|
||||
from tqdm import tqdm
|
||||
+from tree_sitter import QueryCursor
|
||||
|
||||
from aider.dump import dump
|
||||
from aider.special import filter_important_files
|
||||
@@ -286,7 +287,7 @@ class RepoMap:
|
||||
|
||||
# Run the tags queries
|
||||
query = language.query(query_scm)
|
||||
- captures = query.captures(tree.root_node)
|
||||
+ captures = QueryCursor(query).captures(tree.root_node)
|
||||
|
||||
saw = set()
|
||||
if USING_TSL_PACK:
|
||||
@@ -19,7 +19,7 @@ let
|
||||
d.stopwords
|
||||
]);
|
||||
|
||||
version = "0.85.1";
|
||||
version = "0.85.2";
|
||||
aider-chat = python3Packages.buildPythonApplication {
|
||||
pname = "aider-chat";
|
||||
inherit version;
|
||||
@@ -29,7 +29,7 @@ let
|
||||
owner = "Aider-AI";
|
||||
repo = "aider";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-T2v07AFhrpq9a3XEU2B2orSu0afZFUsb3FRTBcJHDoQ=";
|
||||
hash = "sha256-J2xCx1edbu8mEGzNq2PKMxPCMlMZkArEwz6338Sm1tw=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = true;
|
||||
@@ -146,6 +146,8 @@ let
|
||||
];
|
||||
|
||||
patches = [
|
||||
./fix-tree-sitter.patch
|
||||
|
||||
(replaceVars ./fix-flake8-invoke.patch {
|
||||
flake8 = lib.getExe python3Packages.flake8;
|
||||
})
|
||||
@@ -154,7 +156,6 @@ let
|
||||
disabledTestPaths = [
|
||||
# Tests require network access
|
||||
"tests/scrape/test_scrape.py"
|
||||
"tests/basic/test_repomap.py"
|
||||
# Expected 'mock' to have been called once
|
||||
"tests/help/test_help.py"
|
||||
];
|
||||
@@ -164,7 +165,6 @@ let
|
||||
# Tests require network
|
||||
"test_urls"
|
||||
"test_get_commit_message_with_custom_prompt"
|
||||
"test_cmd_tokens_output"
|
||||
# FileNotFoundError
|
||||
"test_get_commit_message"
|
||||
# Expected 'launch_gui' to have been called once
|
||||
@@ -222,15 +222,16 @@ let
|
||||
passthru = {
|
||||
withOptional =
|
||||
{
|
||||
withPlaywright ? false,
|
||||
withBrowser ? false,
|
||||
withHelp ? false,
|
||||
withBedrock ? false,
|
||||
withAll ? false,
|
||||
withPlaywright ? withAll,
|
||||
withBrowser ? withAll,
|
||||
withHelp ? withAll,
|
||||
withBedrock ? withAll,
|
||||
...
|
||||
}:
|
||||
aider-chat.overridePythonAttrs (
|
||||
{
|
||||
pname,
|
||||
dependencies,
|
||||
makeWrapperArgs,
|
||||
propagatedBuildInputs ? [ ],
|
||||
@@ -238,20 +239,27 @@ let
|
||||
}:
|
||||
|
||||
{
|
||||
pname =
|
||||
pname
|
||||
+ lib.optionalString withPlaywright "-playwright"
|
||||
+ lib.optionalString withBrowser "-browser"
|
||||
+ lib.optionalString withHelp "-help"
|
||||
+ lib.optionalString withBedrock "-bedrock";
|
||||
|
||||
dependencies =
|
||||
dependencies
|
||||
++ lib.optionals (withAll || withPlaywright) aider-chat.optional-dependencies.playwright
|
||||
++ lib.optionals (withAll || withBrowser) aider-chat.optional-dependencies.browser
|
||||
++ lib.optionals (withAll || withHelp) aider-chat.optional-dependencies.help
|
||||
++ lib.optionals (withAll || withBedrock) aider-chat.optional-dependencies.bedrock;
|
||||
++ lib.optionals withPlaywright aider-chat.optional-dependencies.playwright
|
||||
++ lib.optionals withBrowser aider-chat.optional-dependencies.browser
|
||||
++ lib.optionals withHelp aider-chat.optional-dependencies.help
|
||||
++ lib.optionals withBedrock aider-chat.optional-dependencies.bedrock;
|
||||
|
||||
propagatedBuildInputs =
|
||||
propagatedBuildInputs
|
||||
++ lib.optionals (withAll || withPlaywright) [ playwright-driver.browsers ];
|
||||
++ lib.optionals withPlaywright [ playwright-driver.browsers ];
|
||||
|
||||
makeWrapperArgs =
|
||||
makeWrapperArgs
|
||||
++ lib.optionals (withAll || withPlaywright) [
|
||||
++ lib.optionals withPlaywright [
|
||||
"--set"
|
||||
"PLAYWRIGHT_BROWSERS_PATH"
|
||||
"${playwright-driver.browsers}"
|
||||
@@ -259,7 +267,7 @@ let
|
||||
"PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS"
|
||||
"true"
|
||||
]
|
||||
++ lib.optionals (withAll || withHelp) [
|
||||
++ lib.optionals withHelp [
|
||||
"--set"
|
||||
"NLTK_DATA"
|
||||
"${aider-nltk-data}"
|
||||
|
||||
Reference in New Issue
Block a user