-
-
Notifications
You must be signed in to change notification settings - Fork 84
Merge vscode-parse-tree extension into Cursorless monorepo #1488
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
Comments
I've gotten the buildscripts nearly functional locally (13 or so packages fail to build out of what, 40-50?) for step one, but it fails spectacularly for reasons I don't fully understand when run via github actions. https://github.com/cocona20xx/tree-sitter-wasms/tree/issue-1488-restructure My only guess is that how the buildscripts are set up is fundamentally incompatible with github actions due to how it stores dependencies temporarily? That'd explain the |
The github action works on the original repo, so presumably something broke from the tree-sitter version bump? Looks like this repo has it working, so maybe worth seeing if there's something to steal there? Can try just forking that branch onto your repo and running it to see if it also works for you for a start. Lmk if you wanna drop into a meet-up to debug |
I found a solution after a lot of trial and error (16 to 18 commits worth of it! 🫠):
Now that build behavior is the same on my machine as it is on Actions, the focus is going to be on getting every depenency package to actually build, which isn't happening just yet. |
Weird. Good work. Might be worth just switching to |
cursorless-dev/tree-sitter-wasms#1 After much ado, I think this is as far as I can take things for bullet point 1. Lmk if anything else is needed. |
Should complete the first bullet point of cursorless-dev/cursorless#1488 as mentioned in the title. Things are a bit more hacky than I'd like, and in the future I might rewrite a good chunk of the code in order to only use `git clone`'d packages, but this is good enough for now. Obviously I can't test anything publishing related, so this is as far as I can take things. Note that the parser packages listed in `package.json` are only the ones present in [vscode-parse-tree](https://github.com/cursorless-dev/vscode-parse-tree) (plus gdscript since I have a pr open for that which this makes somewhat irrelevant if I understand things correctly?); please lmk if the parser packages that were unique to this project should be readded! Finally, please note that a few parser packages have had their versions upgraded. IIrc most of these were due to issues building older versions, as nearly all of the packages which are `git clone`'d in `build.ts` at runtime require special linking to build their `.wasm` file, which thankfully is present in fairly recent versions of said repos.
The problem
The solution
1. Publish npm package in CI containing pre-built wasms
We need to modify https://github.com/cursorless-dev/tree-sitter-wasms as follows:
dependabot.yml
from that repo as we don't currently want auto-updating, as it could break our queries@cursorless/tree-sitter-wasms
2. Create a
cursorless-tree-sitter
package in our monorepoCursorlessTreeSitter
copied fromJetBrainsTreeSitter
@cursorless/tree-sitter-wasms
3. Modify our vscode setup to leverage the above
extension.ts
to construct aCursorlessTreeSitter
and passpackages/cursorless-tree-sitter/node_modules/@cursorless/tree-sitter-wasms/out
as directory in development. That should be subdir ofcursorlessRepoRoot()
or whatever the function istree-sitter-wasms
subdir of assets rootpackages/cursorless-tree-sitter/node_modules/@cursorless/tree-sitter-wasms/out
totree-sitter-wasms
vscode-parse-tree
Future steps
@cursorless/tree-sitter-wasms
npm package into one package per language, eg@cursorless/tree-sitter-wasms-python
. Will still ship all from the same https://github.com/cursorless-dev/tree-sitter-wasms repo. This will enable us to individually pin versions to improve auto-upgrade (Add renovate bot #1282)Possibly useful links
The text was updated successfully, but these errors were encountered: