Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 26, 2025

Summary

This PR fixes issue #6240 where the Roo Code extension fails to load on VS Code 1.85.x due to a missing Node.js API.

Problem

VS Code 1.85.x bundles Node.js 16.14.2, which doesn't include the getDefaultHighWaterMark function that was introduced in Node.js 16.7.0. The execa dependency (v9.5.2+) uses this API, causing the extension to fail during activation with:

TypeError: (0 , rBn.getDefaultHighWaterMark) is not a function

Solution

Added a polyfill for getDefaultHighWaterMark at the very beginning of extension.ts before any imports. The polyfill:

  • Only adds the function if it doesn't already exist
  • Uses the default values from Node.js source (16 for object mode, 16KB for regular mode)
  • Is fully tested with comprehensive unit tests

Testing

  • Added unit tests to verify the polyfill behavior
  • All existing tests pass
  • Linting and type checks pass

Impact

This fix allows users on older VS Code versions (1.84.0 - 1.85.x) to continue using the Roo Code extension without upgrading VS Code.

Fixes #6240


Important

Adds a polyfill for getDefaultHighWaterMark in extension.ts to support VS Code 1.85.x, with tests in extension-polyfill.spec.ts.

  • Behavior:
    • Adds polyfill for getDefaultHighWaterMark in extension.ts to support VS Code 1.85.x using Node.js 16.14.2.
    • Polyfill uses default values from Node.js source (16 for object mode, 16KB for regular mode).
  • Testing:
    • Adds unit tests in extension-polyfill.spec.ts to verify polyfill behavior.
    • Tests ensure the function is added if missing and does not override existing implementations.
  • Impact:
    • Fixes issue Roocode does not load #6240, allowing Roo Code extension to work on VS Code 1.84.0 - 1.85.x without requiring a VS Code upgrade.

This description was created by Ellipsis for 61d0d15. You can customize this summary. It will automatically update as commits are pushed.

- VS Code 1.85.x bundles Node.js 16.14.2 which lacks getDefaultHighWaterMark
- Added polyfill at the start of extension.ts before any imports
- Added comprehensive tests for the polyfill functionality
- Fixes #6240
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 26, 2025 07:18
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 26, 2025
@roomote roomote bot mentioned this pull request Jul 26, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 26, 2025
@daniel-lxs
Copy link
Member

Closing for now while we scope the issue

@daniel-lxs daniel-lxs closed this Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Roocode does not load

4 participants