all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: dick.r.chiang@gmail.com
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	56340@debbugs.gnu.org, Amin Bandali <bandali@gnu.org>,
	emacs-erc@gnu.org
Subject: bug#56340: Change erc dependencies
Date: Mon, 04 Jul 2022 23:39:07 -0700	[thread overview]
Message-ID: <87sfng83n8.fsf_-___1125.08073668636$1657003262$gmane$org@neverwas.me> (raw)
In-Reply-To: <87czekcuxj.fsf@neverwas.me> (J. P.'s message of "Mon, 04 Jul 2022 16:36:08 -0700")

"J.P." <jp@neverwas.me> writes:

>> +(declare-function erc-nickname-in-use "erc")
>>  (define-erc-response-handler (433)
>> -  "Login-time \"nick in use\"." nil
>> -  (erc-nickname-in-use (cadr (erc-response.command-args parsed))
>> -                       "already in use"))
>> +                             "Login-time \"nick in use\"." nil
>> +                             (erc-nickname-in-use (cadr (erc-response.command-args parsed))
>> +                                                  "already in use"))
>
> Indentation thing aside, I wasn't aware we were allowed to forgo
> including signatures in these `declare-function' forms. But if that's
> the deal, I guess it makes for a cleaner, less cluttered look overall.
>
> [...]
>
>       Which gets me wondering (not for the first time): all these
> `defvar's and `declare-function's seem a bit litter-prone, no? Not sure
> if any diagnostic tooling already catches extraneous ones orphaned by
> refactoring, but I for one could use such a feature.

Hmm, now I'm thinking there's likely some benefit to always including a
lambda list in these `declare-function's because it seems

1. byte compiling only warns of a mismatch between the call site
   and the declaration but doesn't actually validate the latter

2. check-declare makes up for that by emitting an "arglist mismatch"
   when necessary, which diagnostic tools, like flymake, can pick up on

Not saying you need to comply, but someone should probably at least
append a (t t) to the following declarations because, at present, with
your patch applied, running `check-declare-directory' on lisp/erc gives:

  lisp/erc/erc-networks.el:1099:Warning (check-declare): said
      ‘erc--target-channel-local-p’ was defined in lisp/erc/erc.el:
      function not found
  lisp/erc/erc-networks.el:1100:Warning (check-declare): said
      ‘erc--target-symbol’ was defined in lisp/erc/erc.el:
      function not found
  lisp/erc/erc-networks.el:1101:Warning (check-declare): said
      ‘erc--target-string’ was defined in lisp/erc/erc.el:
      function not found
  lisp/erc/erc-goodies.el:201:Warning (check-declare): said
      ‘erc-input-string’ was defined in lisp/erc/erc.el: function not
      found
  lisp/erc/erc-goodies.el:356:Warning (check-declare): said ‘erc-log’ was
      defined in lisp/erc/erc.el: function not found
  lisp/erc/erc-backend.el:613:Warning (check-declare): said
      ‘erc-networks--id-given’ was defined in lisp/erc/erc.el:
      function not found
  lisp/erc/erc-backend.el:647:Warning (check-declare): said ‘erc-log’ was
      defined in lisp/erc/erc.el:
      function not found
  lisp/erc/erc-backend.el:1705:Warning (check-declare): said
      ‘erc-get-channel-user’ was defined in lisp/erc/erc.el:
      function not found

Perhaps the definitions of these irregulars should all eventually be
moved to erc-backend.el, as you did with `erc-input'.

In the meantime, I'm going to extract the non-forward-declaration hunks
from your patch into a standalone commit (attributed to you, unless you
object relatively soonish) and install that along with some other,
unrelated fixes. That way, we can let the rest steep until others weigh
in or at least until there's some clear indication of your willingness
to iterate further on this bug thread (apart from related activity on
your fork). Thanks.





  parent reply	other threads:[~2022-07-05  6:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 15:23 bug#56340: 29.0.50; [PATCH] Don't ask people to order requires dick.r.chiang
2022-07-02 12:32 ` Lars Ingebrigtsen
2022-07-04 23:36   ` J.P.
     [not found]   ` <87czekcuxj.fsf@neverwas.me>
2022-07-05  1:59     ` dick
2022-07-05  6:39     ` J.P. [this message]
     [not found]     ` <87sfng83n8.fsf_-_@neverwas.me>
2022-07-16 14:17       ` bug#56340: Change erc dependencies J.P.
     [not found]       ` <877d4d9m6c.fsf@neverwas.me>
2022-09-05 19:33         ` Lars Ingebrigtsen
     [not found]         ` <875yi1zkdu.fsf@gnus.org>
2022-09-06 13:54           ` J.P.
2022-09-06 14:03             ` Lars Ingebrigtsen
     [not found]             ` <87tu5kr45x.fsf@gnus.org>
2022-10-12  2:52               ` bug#56340: Change erc dependencies (ELPA question) J.P.
     [not found]               ` <875ygp3g9j.fsf_-_@neverwas.me>
2022-10-12 17:45                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                 ` <jwv4jw9lz5z.fsf-monnier+emacs@gnu.org>
2022-10-13  2:49                   ` 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='87sfng83n8.fsf_-___1125.08073668636$1657003262$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=56340@debbugs.gnu.org \
    --cc=bandali@gnu.org \
    --cc=dick.r.chiang@gmail.com \
    --cc=emacs-erc@gnu.org \
    --cc=larsi@gnus.org \
    /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.