all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Damien Cassou <damien@cassou.me>,
	48598@debbugs.gnu.org, Ted Zlatanov <tzz@lifelogs.com>,
	emacs-erc@gnu.org, Sam Steingold <sds@gnu.org>
Subject: bug#48598: 28.0.50; buffer-naming collisions involving bouncers in ERC
Date: Mon, 25 Apr 2022 05:05:25 -0700	[thread overview]
Message-ID: <87czh5z7ui.fsf__41716.8437897757$1650888425$gmane$org@neverwas.me> (raw)
In-Reply-To: <87bkws2ksn.fsf@gmx.de> (Michael Albinus's message of "Sat, 23 Apr 2022 11:47:36 +0200")

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> 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-path)))
>                       (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/
  ├── erc-tests.el
  ...
  └── erc-scenarios/
      ├── erc-scenarios-<foo>.el
      ├── erc-scenarios-meta.el
      ...
      └── resources/
          ├── <foo>/...
          ...
          ├── erc-d/
          │   ├── erc-d.el
          │   ...
          │   ├── erc-d-self.el
          │   └── erc-d-self-resources/...
          └── 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.





  parent reply	other threads:[~2022-04-25 12:05 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23  1:22 28.0.50; buffer-naming collisions involving bouncers in ERC J.P.
2021-06-02 11:19 ` bug#48598: " J.P.
2021-06-09 14:36 ` Olivier Certner
2021-06-10 14:36   ` bug#48598: " J.P.
2021-06-19  3:04 ` J.P.
2021-06-25 13:18 ` J.P.
     [not found] ` <87r1gqaxqf.fsf@neverwas.me>
2021-06-28  7:58   ` Olivier Certner
2021-10-16 21:15   ` Daniel Fleischer
2021-10-16 23:21     ` J.P.
     [not found]     ` <87o87ofte1.fsf@neverwas.me>
2021-11-11  5:24       ` Lars Ingebrigtsen
     [not found]       ` <8735o39sdg.fsf@gnus.org>
2021-11-11 10:27         ` J.P.
     [not found]         ` <87pmr77zsa.fsf@neverwas.me>
2021-11-11 12:08           ` Lars Ingebrigtsen
     [not found]           ` <87a6ia7v47.fsf@gnus.org>
2021-11-11 15:13             ` J.P.
2021-09-04 16:46 ` bug#48598: Strange ERC/ZNC Bug/Problem acdw
2021-09-07 21:38 ` J.P.
2021-09-10 12:43 ` bug#48598: Duplicate messages from bouncers on 27 and earlier J.P.
2021-11-11 15:15 ` bug#48598: 28.0.50; buffer-naming collisions involving bouncers in ERC J.P.
2022-03-14 13:08 ` J.P.
2022-04-09 21:14 ` bug#48598: Questions regarding layout and composition of tests (bug#48598) J.P.
2022-04-09 21:22 ` bug#48598: Questions regarding auth-source integration (bug#48598) J.P.
     [not found] ` <87leweez89.fsf@neverwas.me>
2022-04-10 12:49   ` bug#48598: Questions regarding layout and composition of tests (bug#48598) Lars Ingebrigtsen
     [not found]   ` <87fsmlp0gy.fsf@gnus.org>
2022-04-11  7:59     ` bug#48598: 28.0.50; buffer-naming collisions involving bouncers in ERC Michael Albinus
     [not found]     ` <878rsc2gp5.fsf_-_@gmx.de>
2022-04-11 10:21       ` Lars Ingebrigtsen
     [not found]       ` <878rsbdipd.fsf@gnus.org>
2022-04-11 13:29         ` J.P.
2022-04-11 15:34           ` Lars Ingebrigtsen
2022-04-12  7:50           ` Michael Albinus
     [not found]           ` <87sfqi2119.fsf@gmx.de>
2022-04-15 13:02             ` J.P.
     [not found]             ` <87v8vah54l.fsf@neverwas.me>
2022-04-15 15:05               ` Michael Albinus
     [not found]               ` <87h76ucrq4.fsf@gmx.de>
2022-04-16  1:12                 ` J.P.
     [not found]                 ` <87h76tde5k.fsf@neverwas.me>
2022-04-17  8:25                   ` Michael Albinus
     [not found]                   ` <87czhgce1s.fsf@gmx.de>
2022-04-18 14:30                     ` J.P.
     [not found]                     ` <871qxucvls.fsf@neverwas.me>
2022-04-18 16:43                       ` Michael Albinus
     [not found]                       ` <87o80ybauv.fsf@gmx.de>
2022-04-21 13:28                         ` J.P.
     [not found]                         ` <87pmlao9ax.fsf@neverwas.me>
2022-04-22  8:54                           ` Michael Albinus
     [not found] ` <87bkxaeyuw.fsf@neverwas.me>
2022-04-18 13:26   ` bug#48598: Questions regarding auth-source integration (bug#48598) Damien Cassou
2022-04-18 14:24     ` J.P.
     [not found]     ` <87ee1ucvv3.fsf@neverwas.me>
2022-04-18 15:24       ` Damien Cassou
2022-04-18 16:52         ` Michael Albinus
     [not found]         ` <87k0bmbage.fsf@gmx.de>
2022-04-20 14:12           ` J.P.
     [not found]           ` <878rrz268v.fsf@neverwas.me>
2022-04-21  7:08             ` bug#48598: 28.0.50; buffer-naming collisions involving bouncers in ERC Michael Albinus
     [not found]             ` <87czha3oc5.fsf_-_@gmx.de>
2022-04-21 13:21               ` J.P.
     [not found]               ` <87v8v2o9l4.fsf@neverwas.me>
2022-04-22  9:29                 ` Michael Albinus
     [not found]                 ` <87k0bh31pt.fsf@gmx.de>
2022-04-22 14:24                   ` J.P.
     [not found]                   ` <8735i5nql8.fsf@neverwas.me>
2022-04-23  9:47                     ` Michael Albinus
     [not found]                     ` <87bkws2ksn.fsf@gmx.de>
2022-04-25 12:05                       ` J.P. [this message]
     [not found]                       ` <87czh5z7ui.fsf@neverwas.me>
2022-04-27 12:28                         ` Michael Albinus
     [not found]                         ` <874k2epv5n.fsf@gmx.de>
2022-04-28  8:08                           ` Michael Albinus
     [not found]                           ` <87levpmxz1.fsf@gmx.de>
2022-04-28  8:13                             ` Michael Albinus
2022-04-29 13:03                           ` J.P.
2022-05-25 19:29 ` J.P.
2022-05-26  5:17   ` J.P.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87czh5z7ui.fsf__41716.8437897757$1650888425$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=48598@debbugs.gnu.org \
    --cc=damien@cassou.me \
    --cc=emacs-erc@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=sds@gnu.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.