You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to limitations in emscripten, the tree-sitter library must determine which functions from the C standard library are exposed to each individual parser, and the set of functions they have chosen to expose is rather limited. Therefore a benign change which might work perfectly using the native versions of the libraries might completely break the web versions of the libraries. Compile to wasm with patch to web-tree-sitter (UPDATE) tree-sitter/tree-sitter-haskell#56 (comment)
As a consequence of these two factors, we cannot rely on semantic versioning for web-tree-sitter parsers, and we have to be quite conservative in what versions we allow.
For the short term, I propose that we limit each of the parsers to the exact version which is currently used by the yarn.lock file, be that in exact version number or a commit hash.
For the longer term, I propose that we build a test suite which repeatedly loads up files from several major projects using these supported programming languages and check the generated parse trees to see if (1) they are free from errors, and (2) they correspond to our golden standard files (once we have those). We can then use this test suite to guide in version bumps.
The text was updated successfully, but these errors were encountered:
@wenkokke do we need to pin to sha's within package.json? It would be simpler to use main / master in package.json, and then rely on yarn.lock / package-lock.json to capture exact sha's. Would make bumping much easier; eg could even let Renovate bot lockfile maintenance handle it once we migrate this repo into Cursorless monorepo so that we get CI
The web versions of tree-sitter parsers are unfortunately quite brittle:
Flag for tree-sitter parse and test which use the generated wasm tree-sitter/tree-sitter#1565
Native and WASM parsers behave differently tree-sitter/tree-sitter-haskell#69
Compile to wasm with patch to web-tree-sitter (UPDATE) tree-sitter/tree-sitter-haskell#56 (comment)
As a consequence of these two factors, we cannot rely on semantic versioning for web-tree-sitter parsers, and we have to be quite conservative in what versions we allow.
For the short term, I propose that we limit each of the parsers to the exact version which is currently used by the
yarn.lock
file, be that in exact version number or a commit hash.For the longer term, I propose that we build a test suite which repeatedly loads up files from several major projects using these supported programming languages and check the generated parse trees to see if (1) they are free from errors, and (2) they correspond to our golden standard files (once we have those). We can then use this test suite to guide in version bumps.
The text was updated successfully, but these errors were encountered: