Skip to content

Conversation

@Tobbe
Copy link
Member

@Tobbe Tobbe commented Dec 30, 2025

Redwood at one point had a VSCode extension, it was a long time ago since it was maintained. This PR removes the code that we had in the framework for this extension that was only used by the extension. There is still code left that smells very much like extension code, but it'll take a bit more work to remove/rewrite, so I'll leave it in here for now

@netlify
Copy link

netlify bot commented Dec 30, 2025

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 5040382
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6956f71846c1ad00089e9901

@github-actions github-actions bot added this to the chore milestone Dec 30, 2025
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 30, 2025

Greptile Summary

This PR removes legacy VSCode extension code from the @cedarjs/structure package. The extension was deprecated long ago, and this cleanup removes approximately 2,564 lines of unused code.

Major changes:

  • Deleted entire directories: language_server/, interactive_cli/, outline/, and .vscode/
  • Removed VSCode-specific dependencies from package.json: vscode-languageserver, vscode-languageserver-textdocument, and @types/vscode
  • Renamed ide.ts to nodes.ts and removed IDE-specific interfaces (Definition, Implementation, CodeLens, Hover, Decoration)
  • Renamed x/vscode-languageserver-types.ts to x/diagnostics.ts and removed language server protocol imports
  • Deleted x/vscode.ts (345 lines) containing VSCode API wrappers
  • Updated model files (RWEnvHelper.ts, RWRoute.ts, RWRouter.ts, etc.) to remove ideInfo() methods and update imports

Impact assessment:

  • No breaking changes to the public API - printDiagnostics() and DiagnosticSeverity exports remain unchanged
  • Dependent packages (@cedarjs/cli, @cedarjs/prerender, @cedarjs/telemetry) are unaffected as they only use the exported diagnostic functions
  • All import paths updated correctly throughout the codebase

Confidence Score: 5/5

  • This PR is safe to merge - it's a clean removal of deprecated code with no breaking changes
  • The PR systematically removes legacy VSCode extension code without affecting the public API. All internal imports were properly updated, no orphaned references remain, and dependent packages only use the unaffected exported functions. The changes are purely subtractive (deleting unused code) with minimal refactoring (file renames and import updates).
  • No files require special attention

Important Files Changed

Filename Overview
packages/structure/package.json Removed VSCode extension dependencies: vscode-languageserver, vscode-languageserver-textdocument, and @types/vscode
packages/structure/src/nodes.ts Renamed from ide.ts and removed VSCode-specific IDE interfaces (Definition, Implementation, CodeLens, Hover, etc.)
packages/structure/src/x/diagnostics.ts Renamed from vscode-languageserver-types.ts and removed unused VSCode language server imports (TextDocuments, CodeAction, WorkspaceEdit)
packages/structure/src/x/vscode.ts Deleted - contained VSCode extension API wrappers and window methods (showQuickPick, createTerminal, etc.)
packages/structure/src/language_server/RWLanguageServer.ts Deleted - entire language server implementation removed (181 lines)
packages/structure/src/outline/outline.ts Deleted - tree outline generation for VSCode extension (307 lines)

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant PR as This PR
    participant Pkg as @cedarjs/structure
    participant CLI as @cedarjs/cli
    
    Note over PR: Remove VSCode Extension Code
    
    PR->>Pkg: Delete language_server/ directory
    Note right of Pkg: RWLanguageServer.ts (181 lines)<br/>commands.ts, diagnostics.ts, etc.
    
    PR->>Pkg: Delete interactive_cli/ directory
    Note right of Pkg: command_builder.ts (241 lines)<br/>UI components for extension
    
    PR->>Pkg: Delete outline/ directory
    Note right of Pkg: outline.ts (307 lines)<br/>Tree view generation
    
    PR->>Pkg: Delete src/x/vscode.ts
    Note right of Pkg: VSCode API wrappers<br/>showQuickPick, createTerminal
    
    PR->>Pkg: Rename ide.ts → nodes.ts
    Note right of Pkg: Remove IDE interfaces<br/>Keep core BaseNode/FileNode
    
    PR->>Pkg: Rename vscode-languageserver-types.ts → diagnostics.ts
    Note right of Pkg: Remove LSP imports<br/>Keep diagnostic utilities
    
    PR->>Pkg: Update package.json
    Note right of Pkg: Remove vscode-languageserver<br/>vscode-languageserver-textdocument<br/>@types/vscode
    
    PR->>Pkg: Update model files
    Note right of Pkg: Remove ideInfo() methods<br/>Update imports to new module names
    
    CLI->>Pkg: Import printDiagnostics()
    Note left of CLI: Public API unchanged<br/>CLI commands still work
Loading

@nx-cloud
Copy link

nx-cloud bot commented Dec 30, 2025

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 5040382

Command Status Duration Result
nx run-many -t test --minWorkers=1 --maxWorkers=4 ✅ Succeeded 2m 2s View ↗
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 25s View ↗
nx run-many -t build ✅ Succeeded 1m 20s View ↗
nx run-many -t test:types ✅ Succeeded 9s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-01 22:54:42 UTC

@Tobbe Tobbe changed the title chore(structure): Remove remance of VSCode ext chore(structure): Remove remnants of VSCode ext Dec 31, 2025
@Tobbe Tobbe merged commit 0521308 into main Jan 1, 2026
41 checks passed
@Tobbe Tobbe deleted the tobbe-remove-vscode-ext-code branch January 1, 2026 22:58
@Tobbe Tobbe modified the milestones: chore, v2.3.0 Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants