all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: daniel sutton <danielsutton01@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Fixing compilation and byte-compilation warnings before 25.1
Date: Mon, 16 Nov 2015 08:15:59 -0600	[thread overview]
Message-ID: <CAOLS0DPoKZEmVvkCKJtFprQwsUMJyb8nRoeremNqaCPjVDJ35g@mail.gmail.com> (raw)
In-Reply-To: <87ziyfsadz.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]

There could be some value to that. My thinking is that the declaration that
there should be only one argument passed is kinda like a keep off the grass
sign, but then the compiler is throwing a warning that the keep off the
grass sign is actually on the grass. The consumers of this should have a
warning, but since we are handling legacy behavior (of passing two
arguments) there should be no warning inside of this function. When things
change, ie, if we remove the optional argument, then we would immediately
know if we forgot to change things because then this would be an error, as
the argument mismatch was very obvious.

I certainly agree that blindly suppressing all warnings is not a good call.
I'm investigating the way that the compiler works, as I'm very new to this.
My thinking is that we may have local definitions of
byte-compile-enable-warnings that include (not callargs) *only* when
compiling a function that contains a (declare
(advertised-calling-convention (newArgs) "version")). This would make sure
that others that hit this would be warned about the api shift but allow
"bad" calls to it to still work. Then, when the optional argument is
finally removed, if someone forgot to remove the old call, again, inside of
the original defun, it would be a compiler error and not warning. But
presumably, if you are changing the function signature like this you would
be responsible for the entire body of the function.

Again, this is a proposal only for this specific type of warning, and not
just suppressing warnings inside of the core. I want warnings to be
informative and a cause of action, not to be ignored. This warning is
superfluous and should be removed. If the best case is just a
(with-no-warnings ...) so be it, but I think there is a more clever
solution here, and one that actually fits the nature of what is being done
with a advertised-calling-convention change.

On Sun, Nov 15, 2015 at 6:41 AM, Michael Heerdegen <michael_heerdegen@web.de
> wrote:

> daniel sutton <danielsutton01@gmail.com> writes:
>
> > Ah thank you. Someone responded and made a new thread and were super
> > helpful as well. It seems like this warning needs to go to new
> > consumers but not in the core. Would it be appropriate for the declare
> > statement to somehow tell the compiler that we are in the core and
> > therefore to suppress warnings of this type?
>
> I don't think that suppressing blindly all warnings of any particular
> type is a good idea.  Some of them might indicate problems.
>
> > One suggestion was to add the recursive call into a (with-no-warnings
> > ...) call, but this could get tedious and invasive.
>
> Why not just leave this one particular warning?  It reminds us we still
> have something to change there in the future.
>
>
> Michael.
>
>
>

[-- Attachment #2: Type: text/html, Size: 3415 bytes --]

  reply	other threads:[~2015-11-16 14:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  1:47 Fixing compilation and byte-compilation warnings before 25.1 John Wiegley
2015-11-13 12:18 ` Juanma Barranquero
2015-11-13 14:40 ` Andreas Röhler
2015-11-13 15:37   ` Artur Malabarba
2015-11-14  8:34     ` Andreas Röhler
2015-11-13 15:46   ` John Wiegley
2015-11-13 16:22     ` Paul Eggert
2015-11-13 23:00       ` John Wiegley
2015-11-14  5:54         ` daniel sutton
2015-11-14 10:58           ` Michael Heerdegen
2015-11-14 18:22             ` daniel sutton
2015-11-15 12:41               ` Michael Heerdegen
2015-11-16 14:15                 ` daniel sutton [this message]
2015-11-16 23:24                   ` Artur Malabarba
2015-11-15 16:07               ` sea-level rise of byte-compilation warnings [was: Fixing...byte-compilation warnings...] Drew Adams
2015-11-15 16:42                 ` daniel sutton
2015-11-15 17:38                   ` Drew Adams
2015-11-15 17:47                     ` daniel sutton
2015-11-15 22:39                       ` Drew Adams
2015-11-16 23:48                 ` Artur Malabarba
2015-11-16 23:52                   ` Drew Adams
2015-11-17  0:09                     ` Artur Malabarba
2015-11-17 15:45                       ` Drew Adams
2015-11-17  3:59                   ` Ivan Andrus
2015-11-14 15:23           ` Fixing compilation and byte-compilation warnings before 25.1 Andy Moreton
2015-11-14 10:55 ` Stephen Leake
2015-11-14 16:00   ` John Wiegley
2015-11-14 18:01     ` Stephen Leake
2015-11-15  9:08     ` David Engster

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=CAOLS0DPoKZEmVvkCKJtFprQwsUMJyb8nRoeremNqaCPjVDJ35g@mail.gmail.com \
    --to=danielsutton01@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.