From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#48598: 28.0.50; buffer-naming collisions involving bouncers in ERC Date: Mon, 25 Apr 2022 05:05:25 -0700 Message-ID: <87czh5z7ui.fsf__41716.8437897757$1650888425$gmane$org@neverwas.me> References: <875yzakzvi.fsf@neverwas.me> <87bkxaeyuw.fsf@neverwas.me> <87zgkisetn.fsf@cassou.me> <87ee1ucvv3.fsf@neverwas.me> <87tuaqs9br.fsf__15054.4815858424$1650295523$gmane$org@cassou.me> <87k0bmbage.fsf@gmx.de> <878rrz268v.fsf@neverwas.me> <87czha3oc5.fsf_-_@gmx.de> <87v8v2o9l4.fsf@neverwas.me> <87k0bh31pt.fsf@gmx.de> <8735i5nql8.fsf@neverwas.me> <87bkws2ksn.fsf@gmx.de> 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="37235"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Damien Cassou , 48598@debbugs.gnu.org, Ted Zlatanov , emacs-erc@gnu.org, Sam Steingold To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 25 14:06:59 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nixUZ-0009UP-1u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Apr 2022 14:06:59 +0200 Original-Received: from localhost ([::1]:43992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nixUX-0000zN-QK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Apr 2022 08:06:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nixTo-0000xV-6E for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 08:06:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nixTe-0004rY-9q for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 08:06:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nixTd-0006ef-Tk for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 08:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Apr 2022 12:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48598 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48598-submit@debbugs.gnu.org id=B48598.165088834325557 (code B ref 48598); Mon, 25 Apr 2022 12:06:01 +0000 Original-Received: (at 48598) by debbugs.gnu.org; 25 Apr 2022 12:05:43 +0000 Original-Received: from localhost ([127.0.0.1]:33443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nixTK-0006e9-Hy for submit@debbugs.gnu.org; Mon, 25 Apr 2022 08:05:43 -0400 Original-Received: from mail-108-mta79.mxroute.com ([136.175.108.79]:43709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nixTI-0006dv-06 for 48598@debbugs.gnu.org; Mon, 25 Apr 2022 08:05:40 -0400 Original-Received: from filter006.mxroute.com ([140.82.40.27] 140.82.40.27.vultrusercontent.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta79.mxroute.com (ZoneMTA) with ESMTPSA id 180609ccfcc000fe85.002 for <48598@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 25 Apr 2022 12:05:31 +0000 X-Zone-Loop: 0322b01a318d96d6920660c70216b43dae02a550555d X-Originating-IP: [140.82.40.27] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a8HYddk82H2K+DekQKgapc1v/Hfl0DCdEl4ZS2GuWXo=; b=H1Af2itcoah6TkJMLrOb+9fOc2 mTeBWcAJWgq8zWd0D0dD5kjFP6u6UJ+M43aABoIrz7Fpsw9UOCoDhyDDa+gZYZYQxvyMKrBfW7oe/ 1Igix2JsoZ4SqDU5WEWs0yqYP2E/ybRLThOnHEzLBDN+xAfEWmYqhe/Mf6+y+grB1YAq88WvLIf0q 7T5J5wG2uZvS6plGkfvpvN2/WNxbNsteIeiVVgz/8ddWLy+5fp3kSQupZmQwXpFLhbiuN4vTU8VCy TLTUwaqHRj+7AjHRRg6nfK06IWkZfg9Z/L9Fws4qVEUwJwbrdhPFR53lkH06FgalsUPABCEIkYJ48 Gl9tUQHQ==; In-Reply-To: <87bkws2ksn.fsf@gmx.de> (Michael Albinus's message of "Sat, 23 Apr 2022 11:47:36 +0200") X-AuthUser: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230635 Archived-At: Hi Michael, Michael Albinus writes: > Starting slowly, just some first comments. It would be great to > distinguish in your package the same way as between the lisp/erc/ and > test/lisp/erc directories in the Emacs git repo. In your package, you > might use a test/ subdirectory, which contains evrything located in > test/lisp/erc of the Emacs git repo. I spotted this just before receiving your email and was panicking to fix it but was obviously way too late. It was all indeed meant to live under a top-level test/ subdirectory, but I messed up the ELPA recipe royally, which resulted in the terrible crime scene at hand. Apologies for the sloppiness. > I'm not sure about the erc-d/ subdirectory. Is it something which is > also in the lisp/erc Emacs directory, or is it only in test/lisp/erc/? > In the latter case, I believe the directory shall contain just a file > test/lisp/erc/erc-d/erc-d-tests.el (currently called erc-d-self.el), and > *all* other files shall be located at test/lisp/erc/erc-d/erc-d-resources= /. Even without the aforementioned packaging snafu, the erc-d/ situation is definitely confusing. That subdir is supposed to house the fake IRC server that all the "erc-scenarios"-based tests depend on. I initially tried going with erc-d-tests.el instead of erc-d-self.el for the server's own tests but hit a Make error because a corresponding library didn't exist under lisp/erc/. Perhaps I should have tinkered further. And while moving erc-d/ (minus the tests) under lisp/erc/ would make things easier in terms of the layout, I'd rather not add more bulk to Emacs proper without good reason, even though adding it wouldn't really cause any problems (assuming the symbols are renamed using the internal "--" convention). For now, I've moved it to test/lisp/erc/erc-scenarios/resources/erc-d/ and am artificially piggybacking on check-lisp-erc-erc-scenarios via test/lisp/erc/erc-scenarios/erc-scenarios-meta.el, which does nothing but load erc-d-self.el (as convoluted as that sounds). > Loading the related resource files, you use a pattern like > > (eval-and-compile (let ((dir (getenv "EMACS_TEST_DIRECTORY"))) > (when dir > (load (concat dir "/lisp/erc/erc-d/erc-d") nil t) > (load (concat dir "/lisp/erc/erc-d/erc-d-t") nil t)= ))) > > > That looks too complicate. There are the functions ert-resource-directory > and ert-resource-file. You could use something like (untested) > > (eval-and-compile (let ((load-path (cons (ert-resource-directory) load-pa= th))) > (load "erc-d" nil t) > (load "erc-d-t" nil t))) That environment variable stuff has been driving me bananas! Yours is much nicer (thanks) and has magically nudged me toward adopting what's hopefully a less offensive layout, which currently looks like this: test/lisp/erc/ =E2=94=9C=E2=94=80=E2=94=80 erc-tests.el ... =E2=94=94=E2=94=80=E2=94=80 erc-scenarios/ =E2=94=9C=E2=94=80=E2=94=80 erc-scenarios-.el =E2=94=9C=E2=94=80=E2=94=80 erc-scenarios-meta.el ... =E2=94=94=E2=94=80=E2=94=80 resources/ =E2=94=9C=E2=94=80=E2=94=80 /... ... =E2=94=9C=E2=94=80=E2=94=80 erc-d/ =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 erc-d.el =E2=94=82=C2=A0=C2=A0 ... =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 erc-d-self.el =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 erc-d-self-reso= urces/... =E2=94=94=E2=94=80=E2=94=80 erc-scenarios-common.el > In erc-services-tests.el, I would call the tests > erc--auth-source-search--{standard,announced,overrides} > erc--auth-source-search--netrc-{standard,announced,overrides}, because > they are about this backend. The body of these functions is almost the > same for the different backends; perhaps you can factor it out. Done, thanks. (My ego says I'd have realized this eventually, but that's probably a lie!) > I would mark the tests erc--auth-source-search--pass-* with > ":tags '(:unstable)" until the problems in auth-source-pass are solved. Oh, I was going to remove those tests completely because they depend on hacks from lisp/erc/erc-compat.el that I've since deleted. IOW, they're guaranteed to fail (and so have been disabled). But I left them hanging around for now in case you had something else in mind. > Again, all of this is just cursory reading, I haven't started yet to > read the real code. Oh, wow! I'm quite floored by the "yet" part (though no expectations, of course). If you do happen to take a deeper look, please take your time, and don't sweat the IRC protocol stuff if it gets too annoying. Unlike, say, dbus, much of IRC is dizzyingly nonsensical and is no longer bound by any relevant specification (although work is underway in this area). Sorry again for the packaging snafu. Despite all appearances, I really do value your time, so please don't let this interfere (too much) with whatever else is on your plate. You've already helped me so much, and I owe you a ton! J.P.