Skip to content

Add sandbox setup cmd for VSCodium #2989

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 21 commits into from
Jul 12, 2025

Conversation

rinOfTheStars
Copy link
Contributor

This implicitly requires vscode-tree-sitter-query to be published to the Open VSX Registry to not cause issues when running tests, as rn that plugin is commented out in packages/common/src/extensionDependencies.ts due to it not being present there. This PR will therefor need to be a draft until that plugin is uploaded to Open VSX; I'll probably also add to the documentation to note the differences in commands between VSCodium and VSCode at some point soon. There's also probably a cleaner way to do this with a variable passed to packages/cursorless-vscode/src/scripts/initLaunchSandbox.ts to swap between vscode and vscodium mode or something, but I'll look into that later as well.

@rinOfTheStars
Copy link
Contributor Author

The only reliable, cross-platform workaround to OpenVSX marketplace not having the vscode-tree-sitter-query plugin I could find was to just bundle it as part of the repository (in data/vsix for now) as a vsix file. Afaik this should work with the filesystems of all OSes supported by Talon (Windows, macOS, Linux).

I'll add some details to the documentation about this, and then things should be ready for review!

Required to smoothly show commands for both VSCode and VSCodium when they differ
@rinOfTheStars
Copy link
Contributor Author

Should be ready for review!

@rinOfTheStars rinOfTheStars marked this pull request as ready for review June 29, 2025 03:22
@AndreasArvidsson
Copy link
Member

Not quite sure I'm following fully. The parse tree extension that Cursorless requires is already available on open vsx.
https://open-vsx.org/extension/pokey/parse-tree

@rinOfTheStars
Copy link
Contributor Author

Not quite sure I'm following fully. The parse tree extension that Cursorless requires is already available on open vsx.

https://open-vsx.org/extension/pokey/parse-tree

jrieken:vscode-tree-sitter-query (https://github.com/jrieken/vscode-tree-sitter-query) is the extension, not pokey:parse-tree. It's the syntax highlighter/file support provider for the tree sitter query language, so it's included in extensionDependencies.ts, and required since the query language is a language supported by Cursorless

@AndreasArvidsson
Copy link
Member

Oh you mean you are missing a language definition for .scm files?

I'm not a big fan of bundling other extensions like this. Is it really that much of a problem to just install this dependency manually during initial setup for now? Hopefully the extension will be available on the marketplace in the future

@rinOfTheStars
Copy link
Contributor Author

Oh you mean you are missing a language definition for .scm files?

I'm not a big fan of bundling other extensions like this. Is it really that much of a problem to just install this dependency manually during initial setup for now? Hopefully the extension will be available on the marketplace in the future

Yeah I'm not a fan either, fwiw. I can add to the docs how to manually install it instead if that would work better

@AndreasArvidsson
Copy link
Member

Oh you mean you are missing a language definition for .scm files?
I'm not a big fan of bundling other extensions like this. Is it really that much of a problem to just install this dependency manually during initial setup for now? Hopefully the extension will be available on the marketplace in the future

Yeah I'm not a fan either, fwiw. I can add to the docs how to manually install it instead if that would work better

I think that would be best.

- Consolidate initLaunchSandbox.ts and initLaunchSandboxCodium.ts into a single script which determines which editor-cli tool pair is installed automatically.
- Remove pointers to now-removed initLaunchSandboxCodium.ts in package.json and packages/cursorless-vscode/package.json
- Remove auto-installation of missing extension from VSCodium setup from .vsix file, add documentation on how to install it manually instead to CONTRIBUTING.mdx
- Remove data/vsix dir and all files within due to above
- Update CONTRIBUTING.mdx to note that running pnpm compile is not strictly required to contribute to Cursorless
- Update CONTRIBUTING.mdx to remove reference to the specific version settings profiles were added, and instead just tell contributors to raise an issue if they're a problem for some reason
- Fix odd line break at the top of CONTRIBUTING.mdx
3. Run the following in the terminal:

```bash
pnpm install
pnpm compile
```
Don't fret if `pnpm compile` fails! While required for running tests locally on your machine, you will still be able to run tests through GitHub Actions, and it will not prevent you from contributing otherwise.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed if it should go in a separate PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should compile fail locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I knew 😓 but as I noted in the talon slack, it fails locally on my machine despite seemingly having no reason to. Still trying to track down what's wrong with my setup (or if its a regression/bug that only occurs for new contributors).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a discord session about that. Not being able to compile locally is not a good developer experience.

Copy link
Contributor Author

@rinOfTheStars rinOfTheStars Jul 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is a known issue on the @types maintainers' end that fell through the cracks and never got fixed: DefinitelyTyped/DefinitelyTyped#43912

Adding "skipLibCheck": true to the base ts config (tsconfig.base.json) seems to fix this issue without causing any itself (running all tests seems to work fine); no clue why the bug happens on some systems but not others, however, or if there are potential major caveats to this fix. If there's some way to detect when a build fails due to the conflict between @types/mocha and @types/jest and only then pass this config argument, that would probably be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I have a link to the discord, then? Idk if I want to do voice call stuff but seeing if other people can replicate this (bc it is extremely odd it only happens on my machine, and yet occurs regardless of install location) is probably best done there, yeah

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly.
https://discord.gg/zGdVz2pD

That sounds like it might be a path or other environment variable interfering?

Anyhow I don't think we should have texts in the documentation expecting people not to be able to compile cursorless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly. https://discord.gg/zGdVz2pD

That sounds like it might be a path or other environment variable interfering?

Anyhow I don't think we should have texts in the documentation expecting people not to be able to compile cursorless.

Yeah, fair enough honestly. I wish I had any clue as to what exactly is preventing pnpm compile from working, but honestly I'm entirely clueless at this point. My only guess is it has something to do with homebrew itself, or with the filesystem being used? I'm probably going to do a disk wipe + reinstall sometime soon anyway (I've got backups through a Time Machine external disk, so I'll manually restore stuff piecemeal when I need it) so if that doesn't fix this issue when running everything from as fresh of an install as possible, then I guess that'd could as reproduction?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really strange. Let's do this. Can you run the below commands and give me the full log? You can do it on slack if you don't want to post it here.

node -v
npm -v
pnpm -v
pnpm run clean
pnpm install
pnpm compile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://gist.github.com/rinOfTheStars/522c9b95f28cc3d4b0b9d9b98eacfb95

Unless there's something going on with one of the node/npm/pnpm versions being used, nothing seems out of the ordinary until the pnpm compile failure at the end.

@rinOfTheStars
Copy link
Contributor Author

rinOfTheStars commented Jul 10, 2025

Further insights into whatever is going on with building cursorless on my machine: it works fine in a vm both with and without homebrew installed. Going to see if using the homebrew-sourced versions of pnpm, node, and typescript changes that (unlikely)

Edit: yup, works fine regardless of how I install pnpm. Going to see if its any of the other cli tools I have installed, I guess? Yeah nvm the obvious culprits aren't showing anything so idk, at this point I have to assume my main OS install is cursed and that I'm far more overdo for doing a fresh reinstall for cleanup purposes than I thought

change var to let at line 17
@AndreasArvidsson AndreasArvidsson added this pull request to the merge queue Jul 12, 2025
Merged via the queue into cursorless-dev:main with commit 8c70364 Jul 12, 2025
15 checks passed
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