Draft
Conversation
No docs changes detected for 94eb4ff |
ac0c50b to
e92d180
Compare
d2eaefd to
093ca1f
Compare
4d810c2 to
5eab919
Compare
7b8e4ea to
9778ba0
Compare
End-to-end Test Summary
Failed Test SummaryNo failed tests ✨ |
Unit Test Summary
Failed Test Summary
|
331321e to
69164eb
Compare
9465c03 to
22f7c02
Compare
…cations when batch updates are happening (DH-20578)
…rse Groovy import errors. Currently only Python errors are parsed in parseServerError(). Need to add new function that parses Groovy RuntimeExceptions with pattern 'Attempting to import a path that does not exist: import X;'. Example input: 'RuntimeException: Attempting to import a path that does not exist: import package3.subpackage1.MultiClassTest;'. Function should extract import path and return ParsedError object similar to Python version. Added parseGroovyServerError function to errorUtils.ts that parses Groovy RuntimeException import errors, returning ParsedError with type, value, and importPath fields. Added 3 unit tests covering successful parse, unrecognized format, and empty string cases. (#DH-20578)
…nsionController. Currently only _pythonDiagnostics exists at line 230. Add _groovyDiagnostics property, initialize it in initializeDiagnostics() method (line 474) with vscode.languages.createDiagnosticCollection('groovy'), add listener to clear diagnostics on save for .groovy files, and pass to DhcService and MCP controller constructors.
Added _groovyDiagnostics property to ExtensionController, initialized with createDiagnosticCollection('groovy') in initializeDiagnostics(), added save listener to clear groovy diagnostics for .groovy files, passed to DhcService.factory and McpController constructor. Also updated DhcService.factory signature and McpController constructor to accept the new parameter. (#DH-20578)
…stics. Currently constructor accepts diagnosticsCollection parameter for Python (line 60). Add groovyDiagnosticsCollection parameter. In runCode() method around line 541, add else-if branch for languageId === 'groovy' that calls parseGroovyServerError() and creates diagnostics similar to Python error handling (lines 542-577). Store diagnostics in groovyDiagnosticsCollection. Added parseGroovyServerError import to DhcService.ts, cleared groovy diagnostics at start of runCode(), and added else-if branch for languageId === 'groovy' that calls parseGroovyServerError() and stores vscode.Diagnostic objects in groovyDiagnosticsCollection (#DH-20578)
…unCodeUtils.ts. Pattern match errors for 'Attempting to import a path that does not exist: import X;', extract import path (e.g. package3.subpackage1.MultiClassTest), get top-level package (package3), and verify subpackage path exists. For import 'package3.subpackage1.MultiClassTest', must find folder named 'package3' that contains subfolder 'subpackage1'. Use groovyWorkspace.getChildNodes() and iterateNodeTree() to search. Return {hint, foundMatchingFolderUris} where foundMatchingFolderUris contains only folders with verified subpackage paths. Check hasGroovyRemoteFileSourcePlugin(connection) first. Also create hasGroovyRemoteFileSourcePlugin() helper function.
Created createGroovyImportErrorHint() in runCodeUtils.ts that parses Groovy import errors (regex matching 'Attempting to import a path that does not exist: import X;'), extracts top-level package and verifies subpackage folder structure using groovyWorkspace.getChildNodes() and iterateNodeTree(). Added hasGroovyRemoteFileSourcePlugin() helper and exported both functions. Added hasGroovyRemoteFileSourcePlugin() method to DhcService and IDhcService interface. Added comprehensive unit tests covering all scenarios (no errors, plugin not installed, subpackage verification, multiple roots). All 31 tests pass. (#DH-20578)
…oovyDiagnostics and groovyWorkspace parameters. Currently only pythonDiagnostics and pythonWorkspace are passed (line 51-52). Add groovyDiagnostics (vscode.DiagnosticCollection) and groovyWorkspace (FilteredWorkspace<GroovyPackageName>) parameters. Pass both to createRunCodeFromUriTool() factory function. Updated McpServer constructor to accept groovyDiagnostics and groovyWorkspace parameters. Updated McpController constructor to add _groovyWorkspace parameter. Updated createRunCodeFromUriTool signature to accept both groovy params. Updated ExtensionController to assert and pass _groovyWorkspace to McpController. (#DH-20578)
… import errors. Currently has TODO comment at line 130 about DH-21363. Add groovyDiagnostics and groovyWorkspace to tool parameters. In error handling (line 124+), add else-if for languageId === 'groovy' that calls getDiagnosticsErrors(groovyDiagnostics), formats errors, and calls createGroovyImportErrorHint(groovyErrors, executedConnection, groovyWorkspace). Remove TODO comment. Pattern should match Python error handling at lines 132-147. Added createGroovyImportErrorHint import and else-if block for languageId === 'groovy' in runCodeFromUri.ts. The groovy branch calls getDiagnosticsErrors(groovyDiagnostics), formats errors, and calls createGroovyImportErrorHint with correct parameters. Removed the TODO comment about DH-21363. (#DH-20578)
…detection. Add tests in errorUtils.spec.ts for parseGroovyServerError with multiple error patterns. Add tests in runCodeUtils.spec.ts for createGroovyImportErrorHint covering: no errors, plugin not installed, plugin installed with matching folders, plugin installed without matches, complex package paths (e.g. package3.subpackage1.MultiClassTest). Add tests in runCodeFromUri.spec.ts for MCP tool with Groovy errors. Mock groovyDiagnostics and groovyWorkspace appropriately. Added comprehensive Groovy error tests: (1) 4 new parseGroovyServerError patterns in errorUtils.spec.ts (simple import, deep nested, extra text after semicolon, different prefix); (2) Updated runCodeFromUri.spec.ts with groovyDiagnostics/groovyWorkspace mocks, added createGroovyImportErrorHint to mock, updated all 4 createRunCodeFromUriTool calls to include new params, and added groovy code execution describe block with 5 test cases (success, error with hint, error without hint, ConnectionNotFoundError, general exception). All 55 tests pass. (#DH-20578)
22f7c02 to
94eb4ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP, blocked by: