public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Introducing the Systemtap Language-server
@ 2023-02-03 20:06 Ryan Goldberg
  2023-02-06  9:47 ` Martin Cermak
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Goldberg @ 2023-02-03 20:06 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

Hi all,

A new language-server [0] mode has recently been added to systemtap. The
language-server, which runs as a child of an lsp-client [1], serves up
code-completion suggestions.

The language-server-protocol uses jsonrpc [2] and we developed our own C++
SDK which both implements jsonrpc and allows for the creation of
language-servers.

We use systemtap's pass 1 machinery in order to lex and parse
code-completion requests and then use the termination state to determine
the completion results as well as some metadata (such as the result type).
Further deriving these allows us to provide additional context-specific
completion results such as context variables within applicable probe
statement blocks or string completions within probe components. The server
also provides completions for globals, functions and macros from both
within the script and from the tapsets.

The language server can be run with "stap --language-server" and should be
started by a language-server client as the data is currently transferred
via stdin/stdout. We have currently been testing with vim, emacs, vscode,
jupyter and eclipse. Take a look at language-server/README.md for client
specific usage instructions.

For more information I'll be releasing a blog post later this year
describing the jupyter-notebook use case of the language-server. If you
have any feedback, I'd be happy to hear it.

All the best,

Ryan (rgoldber)

[0] -
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/

[1] -
https://microsoft.github.io/language-server-protocol/implementors/tools/

[2] - https://www.jsonrpc.org/specification

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Introducing the Systemtap Language-server
  2023-02-03 20:06 Introducing the Systemtap Language-server Ryan Goldberg
@ 2023-02-06  9:47 ` Martin Cermak
  2023-02-14  7:42   ` Martin Cermak
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Cermak @ 2023-02-06  9:47 UTC (permalink / raw)
  To: Ryan Goldberg; +Cc: systemtap

On  Fri  2023-02-03  15:06 , Ryan Goldberg via Systemtap wrote:
> Hi all,
> 
> A new language-server [0] mode has recently been added to systemtap. The
> language-server, which runs as a child of an lsp-client [1], serves up
> code-completion suggestions.
> 
> The language-server-protocol uses jsonrpc [2] and we developed our own C++
> SDK which both implements jsonrpc and allows for the creation of
> language-servers.
> 
> We use systemtap's pass 1 machinery in order to lex and parse
> code-completion requests and then use the termination state to determine
> the completion results as well as some metadata (such as the result type).
> Further deriving these allows us to provide additional context-specific
> completion results such as context variables within applicable probe
> statement blocks or string completions within probe components. The server
> also provides completions for globals, functions and macros from both
> within the script and from the tapsets.
> 
> The language server can be run with "stap --language-server" and should be
> started by a language-server client as the data is currently transferred
> via stdin/stdout. We have currently been testing with vim, emacs, vscode,
> jupyter and eclipse. Take a look at language-server/README.md for client
> specific usage instructions.
> 
> For more information I'll be releasing a blog post later this year
> describing the jupyter-notebook use case of the language-server. If you
> have any feedback, I'd be happy to hear it.

Hi Ryan, the source doesn't compile on RHEL.  RHEL9 currently only
has json-c-devel-0.14 which doesn't provide json_object_new_array_ext().
It only las json_object_new_array()  This seems to be the only
compilation problem on RHEL9.

However, systemtap is also supposed to work with RHEL8, where I
seem to see more compile time issues.  Please, check.  I'm happy
to provide a test box for you if interested.

Thanks,
Martin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Introducing the Systemtap Language-server
  2023-02-06  9:47 ` Martin Cermak
@ 2023-02-14  7:42   ` Martin Cermak
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Cermak @ 2023-02-14  7:42 UTC (permalink / raw)
  To: Ryan Goldberg; +Cc: systemtap

On  Mon  2023-02-06  10:47 , Martin Cermak wrote:
> On  Fri  2023-02-03  15:06 , Ryan Goldberg via Systemtap wrote:
> > Hi all,
> > 
> > A new language-server [0] mode has recently been added to systemtap. The
> > language-server, which runs as a child of an lsp-client [1], serves up
> > code-completion suggestions.
> > 
> > The language-server-protocol uses jsonrpc [2] and we developed our own C++
> > SDK which both implements jsonrpc and allows for the creation of
> > language-servers.
> > 
> > We use systemtap's pass 1 machinery in order to lex and parse
> > code-completion requests and then use the termination state to determine
> > the completion results as well as some metadata (such as the result type).
> > Further deriving these allows us to provide additional context-specific
> > completion results such as context variables within applicable probe
> > statement blocks or string completions within probe components. The server
> > also provides completions for globals, functions and macros from both
> > within the script and from the tapsets.
> > 
> > The language server can be run with "stap --language-server" and should be
> > started by a language-server client as the data is currently transferred
> > via stdin/stdout. We have currently been testing with vim, emacs, vscode,
> > jupyter and eclipse. Take a look at language-server/README.md for client
> > specific usage instructions.
> > 
> > For more information I'll be releasing a blog post later this year
> > describing the jupyter-notebook use case of the language-server. If you
> > have any feedback, I'd be happy to hear it.
> 
> Hi Ryan, the source doesn't compile on RHEL.  RHEL9 currently only
> has json-c-devel-0.14 which doesn't provide json_object_new_array_ext().
> It only las json_object_new_array()  This seems to be the only
> compilation problem on RHEL9.
> 
> However, systemtap is also supposed to work with RHEL8, where I
> seem to see more compile time issues.  Please, check.  I'm happy
> to provide a test box for you if interested.

... thanks, for the fixes;  Works great for me now!

Martin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-14  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 20:06 Introducing the Systemtap Language-server Ryan Goldberg
2023-02-06  9:47 ` Martin Cermak
2023-02-14  7:42   ` Martin Cermak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).