ternjs / tern

A JavaScript code analyzer for deep, cross-editor language support
https://ternjs.net/
MIT License
4.25k stars 378 forks source link

Is Tern.js library in active development/support? #1051

Open abose opened 2 years ago

abose commented 2 years ago

Hi All,

I see that that last commit made to this library is in 2019, Just wanted to confirm if this library is actively supported or on any deprecation path?

@marijnh

Brackets Editor heavily relies on Tern.js and as we add more workflows involving tern, just wanted to ensure that the library is recommended/supported.

https://github.com/ternjs/tern/issues/1050 https://github.com/ternjs/tern/issues/1049

Thanks, Arun.

marijnh commented 2 years ago

@othree took over maintenance. But I'd recommend going with TypeScript (even if just running it on plain JavaScript) nowadays.

othree commented 2 years ago

Hi @abose, sorry for any inconvenience. I don't have very much time like before. So the current policy is: I will fix critical issues which caused the tern client/server crash. And for other issues, I can't give any word. And about your reports issues. I am looking at 1049 now. I think 1050 will be much more complex(which is related to the parser and AST). So I won't spend much time on it at the moment.

BTW PR is always welcome. If I can reproduce the issue. I will help the PR to get merged.

abose commented 2 years ago

Thanks for the reply @othree . Even brackets community is very short of devs, so I can understand. Thanks for helping!

Ill try a bit to see if I can help in dev to implement some of our required functions. Can you give some pointers on tern development.

othree commented 2 years ago

@abose Not yet dive into seeing how brackets integrate with tern. But for me, working with Vim editor. The first step is to start a standalone, foreground tern server. ref. Then make sure your editor's plugin connects to that server. Then you can easier to see what is happening behind the scene.

abose commented 2 years ago

Brackets currently uses a webwoker to host tern and directly uses the is API.

abose commented 2 years ago

How are the definition files generated? The plugins also seems to have lots of auto generated api descriptions.

othree commented 2 years ago

@abose You mean the tern server is running inside a webworker? or the webworker process is the middleman between bracket and tern server?

The def files in https://github.com/ternjs/tern/tree/master/defs are manually maintained. But for some use cases, you can use bin/condense to generate the def file. https://ternjs.net/doc/manual.html#utils

abose commented 2 years ago

The tern server runs direcrly inside a webworker. Brackets doesn't use node based tern server.

othree commented 2 years ago

I will suggest testing the Tern in a different editor. You can use the Brackets editor to edit the code. But to verify the change and see the debug log. Use a different browser to do so.