tern icon indicating copy to clipboard operation
tern copied to clipboard

Is Tern.js library in active development/support?

Open abose opened this issue 2 years ago • 9 comments

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.

abose avatar Aug 10 '22 07:08 abose

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

marijnh avatar Aug 10 '22 11:08 marijnh

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.

othree avatar Aug 10 '22 12:08 othree

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.

abose avatar Aug 10 '22 12:08 abose

@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.

othree avatar Aug 11 '22 03:08 othree

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

abose avatar Aug 11 '22 04:08 abose

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

abose avatar Aug 11 '22 04:08 abose

@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

othree avatar Aug 11 '22 04:08 othree

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

abose avatar Aug 11 '22 05:08 abose

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.

othree avatar Aug 11 '22 07:08 othree