cursorless-dev / vscode-parse-tree

Syntax trees for VSCode using tree-sitter
MIT License
44 stars 38 forks source link

fix the build #42

Closed phillco closed 1 year ago

phillco commented 2 years ago

The build is currently broken on both M1 and Intel for me because make web-tree-sitter does not work:

$ yarn
yarn install v1.22.19
warning ../../package.json: No license field
$ make web-tree-sitter
emcc: error: undefined exported symbol: "__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv" [-Wundefined] [-Werror]
make: *** [vendor/web-tree-sitter/0.20.4/README.md] Error 1
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

It turns out that @pokey's build is working because he has a previously compiled version of web-tree-sitter exists in that directory.

We want to eliminate this dependency (#32) but for now, a quick fix is to check in that precompiled version so that others can build the project in the interim.

$ yarn
yarn install v1.22.19
warning ../../package.json: No license field
$ make web-tree-sitter
make: Nothing to be done for `web-tree-sitter'.
[1/5] πŸ”  Validating package.json...
warning parse-tree@0.21.0: The engine "vscode" appears to be invalid.
[2/5] πŸ”  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] πŸ”—  Linking dependencies...
[5/5] πŸ”¨  Building fresh packages...
success Saved lockfile.
✨  Done in 42.40s.
pokey commented 2 years ago

@wenkokke any objections? Would be good to at least un-break the build until we migrate to published web-tree-sitter (#32)

wenkokke commented 2 years ago

For reference, this isn’t a hack, but just running the actual web-tree-sitter build.

wenkokke commented 2 years ago

The error reported above comes from tree-sitter itself, so presumably that doesn’t work on your M1 or Intel either? tree-sitter/tree-sitter:lib/binding_web/exports.json#L8.

wenkokke commented 2 years ago

The build is currently broken on both M1 and Intel for me because make web-tree-sitter does not work:

$ yarn
yarn install v1.22.19
warning ../../package.json: No license field
$ make web-tree-sitter
emcc: error: undefined exported symbol: "__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv" [-Wundefined] [-Werror]
make: *** [vendor/web-tree-sitter/0.20.4/README.md] Error 1
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

It turns out that @pokey's build is working because he has a previously compiled version of web-tree-sitter exists in that directory.

We want to eliminate this dependency (#32) but for now, a quick fix is to check in that precompiled version so that others can build the project in the interim.

$ yarn
yarn install v1.22.19
warning ../../package.json: No license field
$ make web-tree-sitter
make: Nothing to be done for `web-tree-sitter'.
[1/5] πŸ”  Validating package.json...
warning parse-tree@0.21.0: The engine "vscode" appears to be invalid.
[2/5] πŸ”  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] πŸ”—  Linking dependencies...
[5/5] πŸ”¨  Building fresh packages...
success Saved lockfile.
✨  Done in 42.40s.

You probably want to submit this as an error on the tree-sitter repository. Please clone tree-sitter/tree-sitter and run script/build-wasm and see if you get the same error.

wenkokke commented 2 years ago

Possibly related: https://github.com/taglib/taglib/issues/1032#issuecomment-964261133

@phillco Is your system mixing clang and g++?

pokey commented 1 year ago

Closing in favour of https://github.com/cursorless-dev/vscode-parse-tree/pull/68, which works for me on a fresh clone