feat: DH-20578: Groovy remote file source#273
Conversation
No docs changes detected for 6d1d2f9 |
ac0c50b to
e92d180
Compare
d2eaefd to
093ca1f
Compare
4d810c2 to
5eab919
Compare
7b8e4ea to
9778ba0
Compare
End-to-end Test Summary
Failed Test Summary
|
Unit Test Summary
Failed Test SummaryNo failed tests ✨ |
331321e to
69164eb
Compare
22f7c02 to
94eb4ff
Compare
94eb4ff to
7971923
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)
There was a problem hiding this comment.
Pull request overview
Adds Groovy support for “remote file source” behavior across the extension (tree view, session/plugin wiring, error parsing/diagnostics, and MCP tools), while keeping Python behavior intact and more explicitly typed.
Changes:
- Introduces Groovy remote file source service integration (execution context + source request handling) alongside existing Python integration.
- Expands the Remote Import Source tree to group workspace content by language and updates context commands/icons accordingly.
- Updates MCP tooling and error hinting to support Groovy and language-specific remote source operations.
Reviewed changes
Copilot reviewed 34 out of 37 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/remoteFileSourceUtils.ts | Adds Groovy helpers/tree items + Groovy plugin request listener; refactors Python naming. |
| src/util/remoteFileSourceUtils.spec.ts | Updates/extends unit tests for new tree items and module/package helpers. |
| src/util/remoteFileSourceMsgUtils.ts | Renames module fullname type to Python-specific type. |
| src/util/remoteFileSourceMsgUtils.spec.ts | Updates tests for renamed Python module fullname type. |
| src/util/snapshots/remoteFileSourceUtils.spec.ts.snap | Snapshot updates for new/changed tree item outputs. |
| src/types/serviceTypes.d.ts | Extends service interface with Groovy/Python remote plugin presence checks. |
| src/types/remoteImportSourceTreeTypes.ts | Adds language root element + languageId fields on tree node types. |
| src/types/remoteFileSourceTypes.ts | Introduces Groovy resource/package types and PythonModuleFullname rename. |
| src/services/RemoteFileSourceService.ts | Splits Groovy vs Python plugin registration/execution context responsibilities. |
| src/services/FilteredWorkspace.ts | Generalizes workspace filtering/marking for Groovy + Python; adds marked-relative path export + change handling. |
| src/services/FilteredWorkspace.spec.ts | Extends marking/unmarking tests and adds suppress-notify scenarios. |
| src/services/DhcService.ts | Wires Groovy plugin service + Groovy diagnostics; uses language-specific error parsers and plugin checks. |
| src/providers/RemoteImportSourceTreeProvider.ts | Adds Groovy workspace support and language grouping in the tree provider. |
| src/mcp/utils/runCodeUtils.ts | Adds Groovy import error hinting + improves Python hinting with raw error parsing fallback. |
| src/mcp/utils/runCodeUtils.spec.ts | Adds/updates tests for new mock workspace model + Groovy/Python hint behavior. |
| src/mcp/tools/runCodeFromUri.ts | Adds Groovy diagnostics/workspace inputs; produces Groovy hints and raw-error fallback. |
| src/mcp/tools/runCodeFromUri.spec.ts | Adds Groovy execution scenarios and “no diagnostics” fallback cases. |
| src/mcp/tools/removeRemoteFileSources.ts | Requires/validates languageId and routes to language-specific removal. |
| src/mcp/tools/removeRemoteFileSources.spec.ts | Updates tests for languageId-aware removal. |
| src/mcp/tools/listRemoteFileSources.ts | Adds optional languageId filtering and aggregates Groovy+Python sources. |
| src/mcp/tools/listRemoteFileSources.spec.ts | Updates tests for per-language listing and combined listing behavior. |
| src/mcp/tools/addRemoteFileSources.ts | Requires/validates languageId and routes to language-specific add. |
| src/mcp/tools/addRemoteFileSources.spec.ts | Updates tests for languageId-aware add. |
| src/mcp/McpServer.ts | Passes Groovy diagnostics/workspace into MCP server. |
| src/dh/modules.d.ts | Temporarily augments jsapi-types with RemoteFileSourceService + request event types. |
| src/dh/errorUtils.ts | Splits Python error parsing name and adds Groovy import error parsing. |
| src/dh/errorUtils.spec.ts | Adds Groovy parse tests and renames Python parse tests accordingly. |
| src/dh/dhc.ts | Session init now acquires Groovy RemoteFileSourceService when available; keeps Python widget acquisition. |
| src/dh/snapshots/errorUtils.spec.ts.snap | Snapshot updates for renamed Python parser tests. |
| src/controllers/McpController.ts | Wires Groovy diagnostics/workspace into MCP controller. |
| src/controllers/ExtensionController.ts | Creates Groovy FilteredWorkspace + diagnostics; registers language-specific remote source commands; adds reveal-in-explorer command. |
| src/common/constants.ts | Adds icon IDs for Groovy/Python. |
| src/common/commands.ts | Adds language-specific remote source command IDs and dispatches execAdd/execRemove by language. |
| skills/deephaven-vscode-using/SKILL.md | Updates skill docs with remote file source guidance and hint usage. |
| package.json | Adds language-specific remote source commands/menu contributions and “Reveal in Explorer” action. |
| mocks/vscode.ts | Improves EventEmitter mock and adds FS watcher onDidChange mock support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mofojed
left a comment
There was a problem hiding this comment.
Find/replace supress => suppress
No other real comments, seems fine
Co-authored-by: Copilot <copilot@github.com> (#DH-20578)
|
@mofojed I addressed yours and Copilot's review comments |
|
@mofojed FYI, failing e2e tests appear to be an issue on |
DH-20578: Adds Groovy support for remote file source features in VS Code extension. The supporting plugin work has not fully landed yet mostly waiting on tests, but I don't think that should block this PR:
Related Pending PRs
Changes for these are deployed to
bmingles-remote-file-source2BHSTesting
bmingles-remote-file-source2has Groovy and Python remote plugins installed, so full feature set can be tested thereSetup
bmingles-remote-file-source2vm if not already runninggit@github.com:bmingles/deephaven-controller-script-testlocalgit branch (themainbranch is configured as a controller source onbmingles-remote-file-source2).Local override tests
bmingles-remote-file-source2server in VS Codesrc/main/groovy/docs-sample.groovyagainst the BHS"Server"prefix e.g.testTableshould also include the"Server"prefixsrc/main/groovy/testfolder as a Groovy remote file source"Local"prefix e.g.testTableshould also include the"Local"prefixsrc/main/groovy/testas a remote file source"Server"prefixesTree Selection Behavior
There was a bug fixed in this PR that impacts how partial unmarking works in the Remote file source tree view.
src/main/groovy/nested/ws1ws1folder as remote source with the+buttonws1/sub1subfolder and click the-sign to remove itws1/sub2is now the marked folder.ws1/sub1andws1/file1.groovyshould both be unmarked