Skip to content

fix: reset vscode version to 1.96.2 #1084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2025

Conversation

hippietrail
Copy link
Collaborator

Issues

#1074

Description

This is the lowest-common-denominator to work with both VS Code forks, Cursor which is at 1.96.2 and Windsurf which is at 1.97.0

Demo

Screenshot 2025-04-18 at 5 19 52 pm Screenshot 2025-04-18 at 5 20 08 pm

How Has This Been Tested?

I build (from Windsurf) using
just setup and just package-vscode

Then I installed the resulting VSIX manually from the command palette into both Windsurf and Cursor.

The status bar item with the dialect indicator and the new Harper logo showed up in both. Typing gibberish into the editor of both causes Harper to flag them as misspellings.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

This is the lowest-common-denominator to work with both VS Code forks, Cursor which is at 1.96.2 and Windsurf which is at 1.97.0
@hippietrail hippietrail requested a review from mcecode April 18, 2025 10:25
@mcecode
Copy link
Collaborator

mcecode commented Apr 18, 2025

Does just test-vscode still work as expected for you even with this change? Just making sure that the issue fixed in #1042 doesn't crop up again.

@hippietrail
Copy link
Collaborator Author

hippietrail commented Apr 18, 2025

Does just test-vscode still work as expected for you even with this change? Just making sure that the issue fixed in #1042 doesn't crop up again.

No, it does seem to crop up again but I haven't been able to figure it out. The LLM is saying it's due to errors in internal VS Code ts/js code but I don't know whether or not there's some way to get everything to work with the old engine and the current engine, or if the 1042 issues don't have an impact of the extension working on all 3 editors.

Here's the current output of just test-vscode:

hippietrail@Andrews-M1-MacBook-Air harper % NODE_OPTIONS='--force-node-api-uncaught-exceptions-policy=true --trace-warnings' DEBUG=vscode-test:* just test-vscode
warning: /Users/hippietrail/harper/harper-wasm/Cargo.toml: unused manifest key: package.private
warning: /Users/hippietrail/harper/harper-cli/Cargo.toml: unused manifest key: package.private
    Finished `release` profile [optimized] target(s) in 0.44s
Scope: all 8 workspace projects
Done in 1.3s using pnpm v10.6.3

> harper@0.29.1 pretest /Users/hippietrail/harper/packages/vscode-plugin
> tsc && node esbuild.cjs

[watch] build started
[watch] build finished

> harper@0.29.1 test /Users/hippietrail/harper/packages/vscode-plugin
> node build/tests/runTests.js

✔ Validated version: 1.99.3
✔ Found existing install in /Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3
[main 2025-04-18T11:07:33.706Z] update#setState disabled
[main 2025-04-18T11:07:33.710Z] update#ctor - updates are disabled by the environment
2025-04-18 18:07:34.037 Electron[96104:9450372] +[IMKClient subclass]: chose IMKClient_Legacy
2025-04-18 18:07:34.037 Electron[96104:9450372] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
[main 2025-04-18T11:07:34.175Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:07:34.175Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
[main 2025-04-18T11:07:34.176Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:07:34.176Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'terminalShellType' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.vscode-python-envs' wants API proposal 'terminalShellType' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'github.copilot-chat' wants API proposal 'chatReadonlyPromptReference' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
ChatSessionStore: Migrating 0 chat sessions from storage service to file system
[main 2025-04-18T11:07:34.360Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:07:34.360Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Started local extension host with pid 96122.
Loading development extension at /Users/hippietrail/harper/packages/vscode-plugin
Settings Sync: Account status changed from uninitialized to unavailable
Started
** dialect set to American ** American
** dialect set to British ** British
** dialect set to American ** American
..............................


30 specs, 0 failures
Finished in 6.899 seconds
[main 2025-04-18T11:07:42.035Z] Extension host with pid 96122 exited with code: 0, signal: unknown.
[main 2025-04-18T11:07:42.115Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:07:42.115Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Exit code:   0

hmm ... that was when I from a terminal in Windsurf. When I do the same from a terminal in VS Code I get this:

hippietrail@Andrews-M1-MacBook-Air vscode-plugin % NODE_OPTIONS='--force-node-api-uncaught-exceptions-policy=true --trace-warnings' DEBUG=vscode-test:* just test-vscode
warning: /Users/hippietrail/harper/harper-cli/Cargo.toml: unused manifest key: package.private
warning: /Users/hippietrail/harper/harper-wasm/Cargo.toml: unused manifest key: package.private
    Finished `release` profile [optimized] target(s) in 0.37s
Scope: all 8 workspace projects
Done in 1.3s using pnpm v10.6.3

> harper@0.29.1 pretest /Users/hippietrail/harper/packages/vscode-plugin
> tsc && node esbuild.cjs

[watch] build started
[watch] build finished

> harper@0.29.1 test /Users/hippietrail/harper/packages/vscode-plugin
> node build/tests/runTests.js

✔ Validated version: 1.99.3
✔ Found existing install in /Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3
[main 2025-04-18T11:16:49.885Z] update#setState disabled
[main 2025-04-18T11:16:49.887Z] update#ctor - updates are disabled by the environment
2025-04-18 18:16:50.195 Electron[98707:9464434] +[IMKClient subclass]: chose IMKClient_Legacy
2025-04-18 18:16:50.196 Electron[98707:9464434] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
[main 2025-04-18T11:16:50.281Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:16:50.281Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
[main 2025-04-18T11:16:50.282Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:16:50.282Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'terminalShellType' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.vscode-python-envs' wants API proposal 'terminalShellType' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
Via 'product.json#extensionEnabledApiProposals' extension 'github.copilot-chat' wants API proposal 'chatReadonlyPromptReference' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
ChatSessionStore: Migrating 0 chat sessions from storage service to file system
[main 2025-04-18T11:16:50.446Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:16:50.446Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Started local extension host with pid 98719.
Loading development extension at /Users/hippietrail/harper/packages/vscode-plugin
Settings Sync: Account status changed from uninitialized to unavailable
Started
** dialect set to American ** American
** dialect set to British ** British
** dialect set to American ** American
................F.............

Failures:
1) Languages > gives correct diagnostics for JavaScript files
  Message:
    Error: Expected 1 diagnostics, got 0.
  Stack:
        at compareActualVsExpectedDiagnostics (/Users/hippietrail/harper/packages/vscode-plugin/build/tests/suite/helper.js:52:15)
        at UserContext.<anonymous> (/Users/hippietrail/harper/packages/vscode-plugin/build/tests/suite/languages.test.js:45:61)

30 specs, 1 failure
Finished in 6.861 seconds
Error: Tests failed
        at Object.run (/Users/hippietrail/harper/packages/vscode-plugin/build/tests/suite/index.js:19:15)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[main 2025-04-18T11:16:58.026Z] Extension host with pid 98719 exited with code: 0, signal: unknown.
[main 2025-04-18T11:16:58.107Z] [uncaught exception in main]: TypeError: Cannot convert undefined or null to object
[main 2025-04-18T11:16:58.107Z] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at kc.s (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:30032)
    at Object.<anonymous> (file:///Users/hippietrail/harper/packages/vscode-plugin/.vscode-test/vscode-darwin-arm64-1.99.3/Visual%20Studio%20Code.app/Contents/Resources/app/out/main.js:113:29714)
Exit code:   1
Failed to run tests TestRunFailedError: Test run failed with code 1
    at ChildProcess.onProcessClosed (/Users/hippietrail/harper/node_modules/.pnpm/@vscode+test-electron@2.4.1/node_modules/@vscode/test-electron/out/runTest.js:110:24)
    at ChildProcess.emit (node:events:507:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
  code: 1,
  signal: undefined
}
 ELIFECYCLE  Test failed. See above for more details.
error: Recipe `test-vscode` failed with exit code 1

I don't understand why it's different since no matter which editor I'm using a terminal inside of, the test still only uses VS Code.

After getting that bad output I did just setup and then again just test-vscode and now it's telling me everything is ok (not counting those various warnings.)


It seems to be just setup that has the problem, just test-vscode on its own seems fine even though just setup also spawns the testing and it looks like the problem is in the testing? I'm getting confused again.

Maybe it's something intermittent in just setup? Switching between the 3 editors and doing a setup and a test a few times in each they all seem happy now but I saw errors at least once each, I think during the first just setup in each?

@mcecode
Copy link
Collaborator

mcecode commented Apr 19, 2025

Hmmm. Testing this branch locally doesn't really show any errors for me. Since the errors in question only show up in testing and they only appear for you after the tests finish, I think this is fine to merge just so we don't block VS Code forks from being able to update the extension.

@hippietrail
Copy link
Collaborator Author

Hmmm. Testing this branch locally doesn't really show any errors for me. Since the errors in question only show up in testing and they only appear for you after the tests finish, I think this is fine to merge just so we don't block VS Code forks from being able to update the extension.

Great! There seemed to be something spurious about them.

@elijah-potter elijah-potter added this pull request to the merge queue Apr 21, 2025
Merged via the queue into Automattic:master with commit 03d2987 Apr 21, 2025
22 checks passed
@hippietrail hippietrail deleted the windsurf-and-cursor-1074 branch April 22, 2025 01:56
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.

3 participants