Re: CEDET, future and Emacs

Eric Ludlam <[email protected]> Sat, 24 Apr 2021 16:58:51 -0400
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
First, thank you Fermin for stepping forward to maintain CEDET!  It will 
be great to have someone moving it forward again.

On 3/28/21 2:17 PM, Fermin wrote:
>> I think that you can also look into reusing LSP if it's available, but 
>> expand on the "traditional" IDE features - refactoring (maybe starting 
>> with simple rename, method extract, etc.), more templates for code, 
>> etc. - for these things we may not need to have full-blown parsers.
 >
> The thing is that, there is already a GNU Emacs LSP client (eglot) that 
> is probably going to be merge into Emacs, so I'm not a big fan of 
> overlapping functionalities, and giving that LSP doesn't expose the AST, 
> I don't think it can be THAT usefull.

One of the powerful things CEDET does is it provides an abstract way to 
think about the contents of a buffer, which is the tags that it produces 
through the parsers, saves between sessions, and uses to decorate the 
buffer, provide navigation ,completion, etc.  A whole host of tools 
relies on those tags, and the simplicity & speed of getting them, and 
navigating with them.

I think Alex's suggestion is less about "should someone write a bunch of 
code to integrate LSP into CEDET", and more about "Can we get LSP 
generated tags behind the CEDET tag model", thus magically enabling a 
host of new languages to work with the tag system.

Another way to think of it is, if eglot is how lsp will be pulled into 
Emacs, then can eglot produce semantic tags?  Or can eglot provide the 
underpinnings of other parts of CEDET that are over loadable, such as 
database backends, etc.  I think this is important because the current 
system does not scale.  It does not take too big a project to make 
Emacs' memory footprint just too big with all the saved meta-data form 
CEDET.  Optionally delegating database functionality elsewhere would be 
a boon.

My opinion is that the more sources of data are available, such as lisp 
based parsers and optional 3rd party tools, the more likely it is that 
someone's language will be supported, and that a tag based tool can be 
used.  If more languages supported CEDET tags via eglot or other 
cheap-to-develop 3rd party tools, then more tool writers may choose to 
use the CEDET tag system instead of something that is bound to a 
specific tool like eglot.

I also think it is important to provide more semantic based parsers for 
more languages, obscure or otherwise.  They provide a distinct editing 
advantage over external parsers, and are often needed to fully resolve 
context for advanced tools like srecode that 3rd party tools can't provide.

Hope this helps explain some of the philosophy of where I was trying to 
get to before I ran out of time to work on CEDET.  It's a big project, 
and it will take many hands.

Eric