Code Monkey home page Code Monkey logo

vscode-anycode's Introduction

Anycode

A Tree-sitter-based language extension that inaccurately implements popular features like "Outline & Breadcrumbs", "Go to Symbol in Workspace", "Document Highlights" and more. This extension should be used when running in enviroments that don't allow for running actual language services, like https://github.dev or https://vscode.dev.


This is the mono-repo for Anycode itself and its languages: the anycode-folder is a LSP client and server that implements basic language features and all anycode-XYZ folders are for the respective XYZ languages.


Development

To compile tree-sitter languages you need docker or emscripten, follow these steps:

  • have emcc on your path or docker running
  • run node ./scripts/all-npm.js i

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

vscode-anycode's People

Contributors

conwnet avatar deepak1556 avatar dependabot[bot] avatar jedieaston avatar joaomoreno avatar joyceerhl avatar jrieken avatar linusu avatar lramos15 avatar lszomoru avatar microsoft-github-operations[bot] avatar microsoftopensource avatar ponyow avatar rzhao271 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-anycode's Issues

Add contribution story to onboard new languages

Today, the set of languages that anycode supports is hardcoded. This should change and we should add some contribution mechanism that allows to

  • add a grammar
  • add query-files for the various features
  • hook into the testing framework

Remove/adjust index size limit of 100 files

By default we cap the file index at 100 files. This is done for performance reasons and to prevent GH.com load. Tho, when using anycode together with remotehub (which is the likely case) we have a tar-based file system. We should make sure that's always used for anycode and remove the file limit. We should also investigate in other fs perf tricks

Allow to disable code folding feature

Currently vscode-anycode enabled the code folding feature for any supported languages.

But some languages (for example c++ or python) only implements folding comment feature but not folding code feature.

It cause VSCode can not folding codes with these languages. See below:

https://github.dev/microsoft/vscode-anycode/blob/main/server/src/test/fixtures/outline.py

(Once VSCode loaded the vscode-anycode extension, you can not fold codes any more.)

Also, VSCode has a native support for code folding with these languages, maybe we can provide an option to disable the code folding feature in vscode-anycode. (and default disable it temporarily may be better because of the problem described above)

ignore this

Type: Bug

ignore ignore

Extension version: 0.0.6
VS Code version: Code - Insiders 1.88.0-insider (b0d975fc6370f15570c380f41015b1ca2cdcb791, 2024-03-25T05:50:48.433Z)
OS version: Darwin arm64 23.4.0
Modes:

System Info
Item Value
CPUs Apple M1 Pro (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 3, 4
Memory (System) 32.00GB (0.06GB free)
Process Argv --log info --crash-reporter-id c8f02c9c-0a89-4cf8-a88c-8204c6be2a75
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256197
vscod805:30301674
vsaa593cf:30376535
py29gd2263:30784851
c4g48928:30535728
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
h48ei257:30992801
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
d6fi2104:30968146
cppperfnew:30980852
8082a590:30961435
fegfb526:30952798
bg6jg535:30979844
ccp1r6:30958151
pythonait:30973460
7ghi1836:30988844

Custom language support

Is anycode open for adding support for languages that does not include in VS code?

For example if i have some language Foo, tree-sitter-foo library and Foo syntax highlight extension, what the best way to add this language to anycode? Thanks.

Question: Simplicity of adding a language

What are the necessary steps to add a new language (given that a grammer already exists for code) to anycode. I do not require to add it to the repo, but just have it work on my machine.

auto integrate with language Service

I have installed anycode in my desktop-vscode.
and could it be disable in some language if those language-service is available:
e.g.

if C/C++ extension is installed or somehow available, anycode for c/c++ will be auto disable.

cannot disable extension

ADD ISSUE DESCRIPTION HERE

Version: 1.87.2
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1
Embedder: vscode.dev

Extension version: 0.0.73

LanguageStatusItem with id 'info' ALREADY exists

  1. Have anycode installed and activated
  2. See the following in dev tools
[2022-08-30 09:12:02.571] [renderer3] [error] LanguageStatusItem with id 'info' ALREADY exists: Error: LanguageStatusItem with id 'info' ALREADY exists
    at w.createLanguageStatusItem (c:\Users\huer\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:86816)
    at Object.createLanguageStatusItem (c:\Users\huer\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:39747)
    at _showStatusAndInfo (c:\Users\huer\.vscode-insiders\extensions\ms-vscode.anycode-0.0.69\dist\anycode.extension.node.js:34958:40)
    at c:\Users\huer\.vscode-insiders\extensions\ms-vscode.anycode-0.0.69\dist\anycode.extension.node.js:35080:5

Fail graceful when indexedDB isn't available

Browser

Brave Browser 1.37.116
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
In https://vscode.dev

What is happening

It seems like anycode extension is dependent on https://vortex.data.microsoft.com/collect/v1 as when this tracker/script is blocked, anycode logs 2 errors upon entering website.
The user denied permission to access the database.
Request initialize failed with message: The user denied permission to access the database.

And upon opening webview, the following error was logged.
The following error is logged everytime the window change.
Error: Could not register service workers: NotSupportedError: Failed to register a ServiceWorker for scope

What should change

This was not the case a few months ago and I believe something changed from then and now.
But it seems like upong entering, opening repo, opening local file e.t.c. in vscode.dev.
Are there any ways to fix this error?
Or maybe supress this error in the future?

Error Message

Message: Request initialize failed with message: The user denied permission to access the database.
Code: -32603 
Message: Request initialize failed with message: The user denied permission to access the database.
Code: -32603 
Error loading webview: Error: Could not register service workers: NotSupportedError: Failed to register a ServiceWorker for scope ('https://11hn10heo6midq2kg6lokmomd3ob1qr0qej5b3uotsfsv2d066p7.vscode-webview.net/stable/dfd34e8260c270da74b5c2d86d61aee4b6d56977/out/vs/workbench/contrib/webview/browser/pre/') with script ('https://11hn10heo6midq2kg6lokmomd3ob1qr0qej5b3uotsfsv2d066p7.vscode-webview.net/stable/dfd34e8260c270da74b5c2d86d61aee4b6d56977/out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-webview.net&remoteAuthority='): The user denied permission to use Service Worker..

Clarification

This error is only logged in Brave Browser when it blocks tracker https://vortex.data.microsoft.com/collect/v1

Give access to the AST and custom TS queries for other extension developpers

Hello,

This is a feature request that could make other extension developers quite happy and solve quite a few issues related to interacting with source code. It would be great if there were API endpoints allowing other developers to make custom queries on the parsed Treesitter tree and thus allow them to navigate the AST more freely.

At the moment if someone decided to do relatively simple things like:

all require extension developers to make their own custom parsers only to reimplement existing VSCode's functionalities. This is probably unnecessary duplication and the end result is often worse than the existing VSCode's implementation. Unfortunately at the moment the VSCode's API does not give a proper access to the AST and tokens produced during parsing (this github issue elaborates on the subject). There is a useful command called vscode.executeDocumentSymbolProvider but it is not enough and does not always categorize symbols properly: see this issue

Treesitter and Anycode could probably solve this problem by parsing the tree once on document changes and then giving it access to other extensions to query on their own. Would this be possible?

Thank you

some question about feature enable

hi, I install the anycode in my desktop vscode
and python and c# are both installed too.

and there is some case I can't understand: should I enable those feature explicitly?
like:

    "[csharp][c][cpp][python]": {
        "anycode.language.features": {
            "completions": true,
            "definitions": true,
            "references": true,
            "workspaceSymbols": true,
            "highlights": false,
            "outline": false,
            "diagnostics": false
        }
    },
  1. by default.
    nothhing while press F12

image

  1. ENABLE THE SETTING explicitly
    press F12 and we could find something.
    image

I notice that the default setting of anycode are:

        "anycode.language.features": {
            "completions": true,
            "definitions": true,
            "references": true,
            "workspaceSymbols": true,
            "highlights": false,
            "outline": false,
            "diagnostics": false
        }

Is it means that we should enable then explicitly

Make anycode a web and desktop extension

On desktop, AnyCode runs in webworker ext host and RemoteHub runs in Node ext host. This means AnyCode cannot acquire RemoteHub's API and this will always use the 500 file mode. RemoteHub runs in Node so that it can be used by GHPRI. These extensions should all run in the same ext host. (cc @alexr00 , @joyceerhl )

cannot disable

ADD ISSUE DESCRIPTION HERE

Version: 1.87.2
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1
Embedder: vscode.dev

Extension version: 0.0.73

Extension doesn't do anything, produces vague error

Every time I try to use anycode with anycode-python, I get the following:

[Error - 12:06:54] Unhandled exception
[Error - 12:06:54] [object Object]

I'm not quite sure where to start debugging this, since the error message is so vague. I guess that this code here needs to be changed so that it produces a more explanatory output message to start with?

I've tried to edit it locally in order to debug the underlying issue, but I can't find a corresponding file in the ~/.vscode/extensions/ms-vscode.anycode-0.0.72/ directory.

This started happening on a very large Python codebase (the reason I'm using anycode in the first place is because this codebase is so large that Pyright's "go to symbol in workspace" is so slow that it's basically non-functional) but I'm able to reproduce this on a much smaller Python project (a single Python file).

Xcode

ADD ISSUE DESCRIPTION HERE

Version: 1.74.3
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Embedder: github.dev

Extension version: 0.0.70

Many anycodes in Output panel

Found while testing microsoft/vscode-jupyter#9768.

This only happened once. I wasn't able to make it happen again.

Requirement: Use insiders.vscode.dev in a browser that can access the local file system.

  1. Open an empty local folder in insiders.vscode.dev
  2. Install the Jupyter extension
  3. Create a new Jupyter notebook
  4. Open the output and see many anycode entries in the drop down.

I opened a couple of the entries and saw that the anycode server had stopped in each one.

default build fails on ubuntu 22.04/wsl-2

I tried to build the repo without any modification with build command node ./scripts/all-npm.js i, but I get the following errors (notably the message: "Cannot install dependencies for this linux distribution!")

RUNNING `npm i` for /home/user/vscode-anycode/anycode

> [email protected] postinstall
> cd client && npm install && cd ../server && npm install && cd .. && node esbuild.js


up to date, audited 208 packages in 931ms

55 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> postinstall
> npx playwright install-deps

Cannot install dependencies for this linux distribution!

up to date, audited 296 packages in 5s

55 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (1 moderate, 2 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
done building

up to date, audited 376 packages in 10s

56 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
RUNNING `npm i` for /home/user/vscode-anycode/anycode/client

up to date, audited 208 packages in 775ms

55 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
RUNNING `npm i` for /home/user/vscode-anycode/anycode/server

> postinstall
> npx playwright install-deps

Cannot install dependencies for this linux distribution!

up to date, audited 296 packages in 1s

55 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (1 moderate, 2 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
RUNNING `npm i` for /home/user/vscode-anycode/anycode-c-sharp
npm ERR! code 1
npm ERR! path /home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp/build'
npm ERR!   CC(target) Release/obj.target/tree_sitter_c_sharp_binding/src/parser.o
npm ERR!   CC(target) Release/obj.target/tree_sitter_c_sharp_binding/src/scanner.o
npm ERR!   CXX(target) Release/obj.target/tree_sitter_c_sharp_binding/bindings/node/binding.o
npm ERR! make: Leaving directory '/home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.11.4 found at "/home/hanan/.pyenv/versions/3.11.4/bin/python3"
npm ERR! gyp info spawn /home/hanan/.pyenv/versions/3.11.4/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/hanan/.cache/node-gyp/20.11.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/hanan/.cache/node-gyp/20.11.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/hanan/.cache/node-gyp/20.11.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/parser.c:1:
npm ERR! ../src/parser.c: In function ‘ts_lex_keywords’:
npm ERR! ../src/tree_sitter/parser.h:135:8: warning: variable ‘eof’ set but not used [-Wunused-but-set-variable]
npm ERR!   135 |   bool eof = false;             \
npm ERR!       |        ^~~
npm ERR! ../src/parser.c:5722:3: note: in expansion of macro ‘START_LEXER’
npm ERR!  5722 |   START_LEXER();
npm ERR!       |   ^~~~~~~~~~~
npm ERR! In file included from ../../nan/nan.h:178,
npm ERR!                  from ../bindings/node/binding.cc:3:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                       ^~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
npm ERR!    55 | typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!       |                                        ^
npm ERR! ../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, GetterCallback, SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, imp::Sig)’:
npm ERR! ../../nan/nan.h:2544:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’
npm ERR!  2544 |   tpl->SetAccessor(
npm ERR!       |   ~~~~~~~~~~~~~~~~^
npm ERR!  2545 |       name
npm ERR!       |       ~~~~
npm ERR!  2546 |     , getter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2547 |     , setter_
npm ERR!       |     ~~~~~~~~~
npm ERR!  2548 |     , obj
npm ERR!       |     ~~~~~
npm ERR!  2549 |     , settings
npm ERR!       |     ~~~~~~~~~~
npm ERR!  2550 |     , attribute
npm ERR!       |     ~~~~~~~~~~~
npm ERR!  2551 |     , signature);
npm ERR!       |     ~~~~~~~~~~~~
npm ERR! In file included from /home/hanan/.cache/node-gyp/20.11.0/include/node/v8-function.h:15,
npm ERR!                  from /home/hanan/.cache/node-gyp/20.11.0/include/node/v8.h:33,
npm ERR!                  from /home/hanan/.cache/node-gyp/20.11.0/include/node/node.h:73,
npm ERR!                  from ../bindings/node/binding.cc:2:
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/v8-template.h:809:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   809 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/v8-template.h:814:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   814 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/v8-template.h:816:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
npm ERR!   816 |   void SetAccessor(
npm ERR!       |        ^~~~~~~~~~~
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/v8-template.h:821:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
npm ERR!   821 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
npm ERR!       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../bindings/node/binding.cc: At global scope:
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/node.h:1172:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!  1172 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/hanan/.cache/node-gyp/20.11.0/include/node/node.h:1206:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!  1206 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../bindings/node/binding.cc:26:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!    26 | NODE_MODULE(tree_sitter_c_sharp_binding, Init)
npm ERR!       | ^~~~~~~~~~~
npm ERR! make: *** [tree_sitter_c_sharp_binding.target.mk:117: Release/obj.target/tree_sitter_c_sharp_binding/bindings/node/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 5.15.146.1-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/user/vscode-anycode/anycode-c-sharp/node_modules/tree-sitter-c-sharp
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/hanan/.npm/_logs/2024-01-31T00_27_07_401Z-debug-0.log
node:child_process:965
    throw err;
    ^

Error: Command failed: npm i
    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at runNpm (/home/user/vscode-anycode/scripts/all-npm.js:14:5)
    at Object.<anonymous> (/home/user/vscode-anycode/scripts/all-npm.js:25:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 23126,
  stdout: null,
  stderr: null
}

Node.js v20.11.0

Anycode does not function on https://github.dev/

Extension always crashes with the following output

[Warn  - 1:01:43 PM] no native wasm support detected
[Error - 1:01:43 PM] Server initialization failed.
  Message: Request initialize failed with message: WebAssembly is not defined
  Code: -32603 
[Error - 1:01:43 PM] anycode client: couldn't create connection to server
  Message: Request initialize failed with message: WebAssembly is not defined
  Code: -32603 

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4863.0 Safari/537.36 Edg/100.0.1163.0

Only work for some languages

Currently, If anycode is installed, it takes precedence over other extensions like Python etc.

Is there a way to use anycode for C++/Rust/Go (languages that I don't use enough to justify a full blown extension) but keep using Python/Pylance for python files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.