From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0DABF3858C52 for ; Fri, 3 Feb 2023 20:07:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0DABF3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675454831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=IBSkXU8W3tGvfZf2hmKH1AL0D692vmw30OybseZrfWo=; b=UI4jHVyfZcWlbnnpD+MqSEIzqWcQ13Aio0t1Eyp26OFRIXb+Z+HXo6jAnsOBO4N6n2Uusg Q/4rUEGDjZ9ofi9ySpxUFBLkHz9zZZCNWGYndqPV7aRnwR2yGOUR4dEPVDow0LChxXtugQ CtW+z2k0XuNhh/25BwF5dfkBYVfiszY= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-417-CUiIC72qPoCT1vwGVGPd9A-1; Fri, 03 Feb 2023 15:07:05 -0500 X-MC-Unique: CUiIC72qPoCT1vwGVGPd9A-1 Received: by mail-ej1-f70.google.com with SMTP id 21-20020a170906225500b0088b953a6df6so4690349ejr.20 for ; Fri, 03 Feb 2023 12:07:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IBSkXU8W3tGvfZf2hmKH1AL0D692vmw30OybseZrfWo=; b=g4kEb+lj/2mPCiYEHGQ0a+yKi8XUaXz7nsV4Y5om3l+Mx8A4DT0fheycKRrxPoTwdr wl2OaBAIF4Kl15NxZ83vV6uilg/yRk7KMeP0bWwvutRX7RuyMlfk0D/f1h9w/HCqpwxa 2ix7s63dKzfXWbXcMHTUtOfRKPvigGXSN3p/P94VfSwi7+y2CSPsvP96fV6knyd0+vNL 5FfsjDL0VmYXevaaK8034rMPcVfKilugpQsr7u1xHOM+JCVIVwRoXj7AT+WnwaLAYyxX xTdDwBRAC6S5Y41jwBOZxqpBZfLzQmvIkAbI/LOfwrHEYoqCm7SxUPmWmA11+WqBB0ce b5hw== X-Gm-Message-State: AO0yUKVMfNvNUDPRb4Z16BfRbVRgdR49L6I/AiXt8J+yDz07HUBqlcbN K1wsXyuFlvB8vjNtrpfprz/ana1Q07/l7BSXvGgOrFev8XbWAaD9bEWEaOQ+ZxvpnIlg6XR8KWR Y1V5/pXCc5Fw+5dU5mXdf7N7D7wB/uYfPazE= X-Received: by 2002:a17:906:3ac9:b0:88f:13f0:455e with SMTP id z9-20020a1709063ac900b0088f13f0455emr2550403ejd.137.1675454823666; Fri, 03 Feb 2023 12:07:03 -0800 (PST) X-Google-Smtp-Source: AK7set8mgWtnTabKqP9ucEkThTeJ+KOQw61NW+gfjwlVuVsoc6oMdSa8rOsG6QQVmicODjkMMQuBXd6y6Q3fWdBxT4U= X-Received: by 2002:a17:906:3ac9:b0:88f:13f0:455e with SMTP id z9-20020a1709063ac900b0088f13f0455emr2550399ejd.137.1675454823407; Fri, 03 Feb 2023 12:07:03 -0800 (PST) MIME-Version: 1.0 From: Ryan Goldberg Date: Fri, 3 Feb 2023 15:06:52 -0500 Message-ID: Subject: Introducing the Systemtap Language-server To: systemtap@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="0000000000009635cc05f3d13971" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_50,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_KAM_HTML_FONT_INVALID autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000009635cc05f3d13971 Content-Type: text/plain; charset="UTF-8" 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 --0000000000009635cc05f3d13971--