Skip to content
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

tree-sitter web-ui doesn't show parse tree in right pane #17

Closed
sogaiu opened this issue Aug 12, 2021 · 8 comments
Closed

tree-sitter web-ui doesn't show parse tree in right pane #17

sogaiu opened this issue Aug 12, 2021 · 8 comments

Comments

@sogaiu
Copy link
Owner

sogaiu commented Aug 12, 2021

IIUC, according to a comment in the "Doesn't seem to update with treesitter playground" issue a related factor may be a version mismatch for emsdk.

It may be that for tree-sitter-cli version 0.19.3, using version 2.0.11 of emsdk works.

For tree-sitter-cli version 0.19.5, using version 2.0.24 of emsdk may work.

@NoahTheDuke
Copy link

Upgrading to tree-sitter-cli 0.20.6 (the latest version) fixes this.

@sogaiu
Copy link
Owner Author

sogaiu commented Jul 14, 2022

Thanks for sharing!

@sogaiu
Copy link
Owner Author

sogaiu commented Aug 2, 2022

On the topic of versions of emsdk, it appears that versions from (and above?) 2.0.18 may have issues currently: tree-sitter/tree-sitter#1098 (comment)

@NoahTheDuke
Copy link

All these issues make the tree-sitter ecosystem feel really fragile. Not your fault, of course, I'm just surprised and disappointed.

@sogaiu
Copy link
Owner Author

sogaiu commented Aug 2, 2022

I'm hoping things will improve somewhat over time -- though I don't expect that to be soon.

For reference, there is this 1.0 Checklist.

@sogaiu
Copy link
Owner Author

sogaiu commented Jan 23, 2023

I've been examining the tree-sitter repository's commit logs and source recently and my current impression is that the fragility stems from at least a few factors:

  1. Use of emscripten - I think that's a neat project and have used it myself, but stability of API has not been something they've promised (AFAIU). I don't think there's really a good alternative to emscripten (at least not from a licensing perspective) at the current time and I'd much rather have some option than none.
  2. Use of npm / Node.js - Almost every grammar repository uses a project structure and tooling that makes use of these bits. May be I don't need to go into why this can contribute to instability.

On a related note, I have experimented with a structure that removes the use of npm recently. I've learned that the tree-sitter command line tool is built to generate various binding files (for Node.js and Rust) and it is hard-wired to look for package.json to carry out at least one subcommand.

I think it's possible to stop using npm though and that's something I'm still exploring.

@sogaiu
Copy link
Owner Author

sogaiu commented Jan 28, 2023

I think it's pretty clear that the original issue is caused by version mismatches between emscripten and the tree-sitter cli.

It would be nicer if the official docs (e.g. these) stated version requirements in detail (and there have been comments at the tree-sitter repository about this from time to time).

At present, if one uses a recent post 0.20.7 version of the tree-sitter cli (e.g. by compiling from source), emscripten 3.1.29 works. I've been using it with no obvious issues.

I'm going to close this issue as it's not specific to tree-sitter-clojure and I'm not sure it helps to keep it open. If someone feels otherwise though, I'm willing to discuss :)

@sogaiu sogaiu closed this as completed Jan 28, 2023
@sogaiu
Copy link
Owner Author

sogaiu commented Mar 1, 2023

I think this issue may resurface from time to time.

I've written up some details on it here for future reference.

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 a pull request may close this issue.

2 participants