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: emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref Date: Thu, 22 Dec 2022 15:30:15 +0000 Message-ID: References: <167170857225.23253.4229481345211602184@vcs2.savannah.gnu.org> <20221222112935.58A32C05F44@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e5550005f06c53cf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 22 16:29:36 2022 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 1p8NVo-00066M-Lw for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Dec 2022 16:29:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8NVI-0000Up-IY; Thu, 22 Dec 2022 10:29:04 -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 1p8NVG-0000UQ-3P for emacs-devel@gnu.org; Thu, 22 Dec 2022 10:29:02 -0500 Original-Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8NVD-0000lw-Mz for emacs-devel@gnu.org; Thu, 22 Dec 2022 10:29:01 -0500 Original-Received: by mail-ot1-x331.google.com with SMTP id x44-20020a05683040ac00b006707c74330eso1225264ott.10 for ; Thu, 22 Dec 2022 07:28:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LV1GgE4gdLk0+OqB6Sg/rZs/hQX+sZRLRlYmzjDKd5M=; b=j7Hsz38fx3VCVAySm7RW5vaNXduCMSe1A1HLOknHHTVD5mDhqdrIcX7+sLfXA0QqiK X9JOaqkeNsiNYBu28C55ANcnV3mGSD33Z520Hq665Cy5ujQFJGG+L+CiEaDk+xx4A8YA 33K66X+FAByDEhDHvacUDPrhTo/lXh+KNMrBUZzoIVSPqaL/PtqqozpHTPKg44ibXAe4 h3Zc9vKZIDyCc/YkEtiJJKv02jTe7+nfUwQN4rsGk3tenA6ugmTqSo4Yts00jy4cHg8F EuJ/swZxrw+1dAfpnJNT9WPlr8CpythwEnKJLBWm3NBcGmua34ctNEwTBVIKfIh1uLBM d3wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=LV1GgE4gdLk0+OqB6Sg/rZs/hQX+sZRLRlYmzjDKd5M=; b=kHiBuVIQYhBEwRG2D9iHZs8/dQMBtKLt6lxlPxPxTlEmeGAMi4L6b8C2LKF3SHBl5O Itpen8hhs/se6kZFqXxubv4XjVx0wFrBlbpTvumuLlFBWXplrD5MHiHvxTUPD9lTppIr UF2sKWDmpnJwshrlfG0DXWH/WPqXcQINSeR8AQTbb1px/pPoqftbz+mU0LStO7UU/ZJo nQPpnZspvu2LkQRCNINUOi12pjB4aU2HZirAsith7exOvMYikrarF7mWvuyuNg2ZOv/V ik+1Yz6Ov6mrqu/W+Ar4HeFb75zFtC8CBTvEmHkjn1lBIWxPlPEeiSpiDXrBdMqLGriG uyhw== X-Gm-Message-State: AFqh2kocCs9AGEg0zG0qir81Ks1DWqonRaiCJmZYJpj8Mhkb8mzxzKlu LmlYSmH+4ozHo24SWlFu0CnGMGMBrhpvLFBVavQ= X-Google-Smtp-Source: AMrXdXtjSaSDYmQlB1gkoEr3opUxAddj6+0dK0ViU3tOkYdpJq8gHjKdOgt8pxoeC+w/oCoCEUAf6I5iI3fd+Jcymxw= X-Received: by 2002:a05:6830:4a3:b0:670:8334:ccf2 with SMTP id l3-20020a05683004a300b006708334ccf2mr352573otd.201.1671722938224; Thu, 22 Dec 2022 07:28:58 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::331; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x331.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:301792 Archived-At: --000000000000e5550005f06c53cf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > A weak-valued hash-table is not enough to guarantee that a referenc= e > > to a zombie server in eglot--servers-by-xrefed-file variable won't > > survive long enough to confuse the next call to eglot--current-server > > in some buffers. > [...] > > +(defvar eglot--servers-by-xrefed-file > > + (make-hash-table :test 'equal :weakness 'value)) > Do we still need it to be weak? Prolly not, if we presume the operations running up to the new cleanup can't throw. Probably a fair assumption. But better be safe? Does value-weakness in a typically small hash table hurt GC significantly somehow? Anyway, feel free to remove. Jo=C3=A3o --000000000000e5550005f06c53cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> > =C2=A0 =C2=A0 A weak-valued hash-table is n= ot enough to guarantee that a reference
> > =C2=A0 =C2=A0 to a zom= bie server in eglot--servers-by-xrefed-file variable won't
> >= =C2=A0 =C2=A0 survive long enough to confuse the next call to eglot--curre= nt-server
> > =C2=A0 =C2=A0 in some buffers.
> [...]
>= > +(defvar eglot--servers-by-xrefed-file
> > + =C2=A0(make-has= h-table :test 'equal :weakness 'value))
> Do we still = need it to be weak?

Prolly not, if we presume the = operations running up to the
new cleanup can't throw.=C2=A0 P= robably a fair assumption.=C2=A0
But better be safe? Does va= lue-weakness in a typically small
hash table hurt GC signifi= cantly somehow?=C2=A0 Anyway, feel free
to remove.
=

Jo=C3=A3o
--000000000000e5550005f06c53cf--