From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: dape Date: Tue, 7 Nov 2023 10:40:53 +0000 Message-ID: References: <46ea1ab1-e447-4c83-9c81-2f9bd149fe91@alphapapa.net> <6964ff20-921e-beff-43a0-9570ea79aa7d@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , John Yates , Krister Schuchardt , Adam Porter , emacs-devel@gnu.org, philipk@posteo.net To: Daniel Pettersson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 07 11:41:49 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r0JWn-000AIh-2M for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Nov 2023 11:41:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0JWA-0005jZ-Q8; Tue, 07 Nov 2023 05:41:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0JWA-0005if-2t for emacs-devel@gnu.org; Tue, 07 Nov 2023 05:41:10 -0500 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0JW8-0000El-Fa for emacs-devel@gnu.org; Tue, 07 Nov 2023 05:41:09 -0500 Original-Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507bd644a96so7898292e87.3 for ; Tue, 07 Nov 2023 02:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699353666; x=1699958466; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=U77kkrEijfMjpG8JvxVbyf/U+g2ipkxSdjTVflkdatU=; b=gCbNmdKOwoOhwuyQB+8Sen48k7P0zYJ5RQuF8neHnA0+zlrn7ZktogF8JhPziCLS75 zzXb00LaCzpaOoBJfiaprutsPOucH7yriCYhYX6ewjqxnhwNP1nUgp3k+rF2oQO8mcfK pxi91LIUXGY/NAxyXwfxQr6/Lkbg0NA7mfokYbwXBjD79nYv0hwkne0/sqdLwllKdtBG Y/W1GThqbTbqiZU9tt5rJ/O1b5kmAuQfpNZkDd202LU7kfgSWznxzOrpbwIr20EHC4w3 wecDwQfUVFIg99qiEkXDulKbqloZoJs74xynBzn9rXXNEcAlUsWaxq1Eb8vbbLZ55GWA yBnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699353666; x=1699958466; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U77kkrEijfMjpG8JvxVbyf/U+g2ipkxSdjTVflkdatU=; b=YggT77aQaspnQYnjzTc/LVvELR3Fl3QdmYb+0SjQPpo2bOcbzI2HmM1FNXPGyNBnY0 sIvf+tcfqF3pKZT01pWptRwf2lGy/+1Rh09+c6FOiDcmabs6dpMqeoUpiPOxYa4Gy/fr 5qZfANBMAyhDABfQ8ZnR2xuNLu8Q1uY0fz/wBiWIHJwTR0RSIqy9gz8d1dR3gRbyjO4D fs/bZ1BVlHY6zWhmlZuaENiaqOeHN27trw9cd4hfKCAWWYwsjdAJWhqy7u2PITwIh+tz EV91QOr0QYYvfSfnAG/0Ej0mQjtNidhm7mIpfPl3dpzVKNSMNhAIl9oGxKZIgh1dYbcW k3oQ== X-Gm-Message-State: AOJu0YyDGK/qio0wIb1PA9o8ibsp3LcLn4nLbubFD5IdbVO2WD23LdKi oSzHaNzEGKjmcJbdZtgg88SQzqzwtVSVtEllWYA= X-Google-Smtp-Source: AGHT+IFH4iWLP3DTsLfmqzaYMY3CI7oddw9fhA4KBybnTNMHVdWjytTVVVd2DuqBbQ2LJJwQP6/X17RXFM4OguH/4hY= X-Received: by 2002:a05:6512:3195:b0:508:269d:1342 with SMTP id i21-20020a056512319500b00508269d1342mr29736081lfe.35.1699353665622; Tue, 07 Nov 2023 02:41:05 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312293 Archived-At: On Tue, Nov 7, 2023 at 10:19=E2=80=AFAM Daniel Pettersson wrote: > > > > On Thu, Nov 2, 2023 at 5:24=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > > Do you know of any other significant/fundamental differences (say, such= as a > > message type which is neither a request, nor a response, nor a notifica= tion)? > > Notification, request and response maps to events, request and > response. The biggest difference might be the reverse request > but that could be implemented as an notification/event in a pinch. If I understand correctly, reverse requests _are_ supported in JSONRPC. Can you give a short example transcript illustrating such a conversation? > There are two things that can be a bit of a challenge, maybe: > - DAP servers are not that well behaved in general, with a pipe > connection they like to use std out as they please (none DAP > messages). Meaning they put non-JSON cruft in the stdout as well? Not great, but not dramatic, I guess as long as they don't do it in the middle of the message right? Again, helpful if you could attach a stdout dump of a conversation where some of this takes place. > - I don't know its a dape problem or not but it's not that hard to > provoke some servers to send broken messages if they user chooses to > continue the execution while the server is in the middle of responding OK. Then in your opinion what is the easiest (and or most representative) DAP server to start playing with? Hopefully some C/C++ one, but feel free to suggest another. > This means that the parsing needs to do some cleanup during. > > > If I were to try to do these jsonrpc.el changes to accomodate DAP proto= cols, > > would you accept a PR to dape.el adding jsonrpc.el as a dependency to > > dape.el? > > More then happy to offload some of the work ;) I think that would > greatly improve the performance and stability of dape to reuse some > well tested software. I also thin that dape might be able to reuse > some parts of eglot, the repl completion for example, I don't know > what the way forward would be for that. Extract parts of eglot.el into a reusable library, I guess. But yes, I would be very glad to see DAP dape.el become the DAP coutnerpart to LSP eglot.el, with most analogous abstractions having analogous interfaces. Happy to change eglot.el significantly to make that happen (backward-compatibility permitting, of course). Jo=C3=A3o