From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build Date: Mon, 27 May 2019 19:03:56 -0400 Message-ID: References: <831s0xd3z1.fsf@gnu.org> <83pnohbhny.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="269012"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , Stefan Monnier , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 01:05:05 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVOfx-0017qw-6y for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 01:05:05 +0200 Original-Received: from localhost ([127.0.0.1]:54296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVOfw-0004Qi-90 for ged-emacs-devel@m.gmane.org; Mon, 27 May 2019 19:05:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVOfE-0004PT-9b for emacs-devel@gnu.org; Mon, 27 May 2019 19:04:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVOfC-0005p0-58 for emacs-devel@gnu.org; Mon, 27 May 2019 19:04:20 -0400 Original-Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:41931) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVOf8-0005mx-H9; Mon, 27 May 2019 19:04:14 -0400 Original-Received: by mail-ot1-x330.google.com with SMTP id l25so16009398otp.8; Mon, 27 May 2019 16:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XLnEUQOHg3VzviocAA+y90HQZVmVYJY90uQLw3s5chk=; b=kvMdu0so3PYYgg4rkrvdBDhzbImFzLxWUdY9Xf8h0mMSIFb2jukgZ/OrvZdvhDO7PO O9ElNOM0Gt20wcsudyrp5OuAZ6c98iWE8fITDtvCRh/2Z6Hlia3i9RzbfowGipp2QzIo 46uBj/qFzTALRnh+87gv9axHyI52nS0Yf5VJvVMhwCCpARyyVy8S7vjqStrqukHtJcnK MU7HqZZgq7F16o6X7L7juWPVg8C+nHg2zJUDcBuHG6r9yE2NZrSjvJJv4hTcPFD54kn6 m0KsuhFuLYZe5e1KU1sNMIrIXQAIk4YmzI7kUdTTaA981CO2WVcu69qwbvhTIZMiXmvP MQTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XLnEUQOHg3VzviocAA+y90HQZVmVYJY90uQLw3s5chk=; b=redrNSx9ZqSeq8QHUhgzcgLB5lbOW+wC5KPT/7L4FDfLCcytz9YK6LQyc5equtXFKm cBDkP9WVGEGZGaG/oWS67sON+J9e2Zx00neBS1zEgflAtqt2WF6RrLMxewgdBFYbpuaA qp00D/wHkCbQaWLGK2cRofQtcQ1rPNqhQ055S0h0V57QBO0sCYwzaCoYeIdasAem5aF2 FNZ+++6KZQZ1Aq1nBJXyNvzqDQf8wxTgpBcclHc7hqkhc2PmvrWBfQ4A0N+rT2oz5T2W ZE8uQXB2AesX7vxvX76clgxWTypKXD1hbh1xk8NXfkXnDDnUt8dE6A+vZff/7O/XFrol Im3Q== X-Gm-Message-State: APjAAAU2Kyje1iL4fDC6ZOERiBQiAL6lIh2FJYiu0cPrQ8UauK+TMs5G VQBdBqBU8S3/FbJzpIS5wflTL1fB6Sndx5jBoqI= X-Google-Smtp-Source: APXvYqxKS8QQUzfn4dI+oIjKa1ptYiWF+yaSpCiPKcdOWCbJp1vZSbIEeOOctGTJ5Z0LYpJ812dU5sUPCIQXokZCrYc= X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr41315662otr.99.1558998252817; Mon, 27 May 2019 16:04:12 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::330 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237063 Archived-At: On Fri, 17 May 2019 at 10:37, Lars Ingebrigtsen wrote: > > I just went ahead and finished up the two "automatic" warning > suppression things that Noam mentioned: With the following patch, a > function that has an advertised calling convention that calls itself > will check the real arglist when issuing warnings, and obsolete > functions that calls other obsolete functions won't issue any warnings. > > I've built an Emacs (after rm-ing lisp/*.elc) and things seem to work > @@ -92,6 +92,11 @@ defun-declarations-alist > (list 'quote f) (list 'quote arglist) (list 'quote when)))) > (list 'obsolete > #'(lambda (f _args new-name when) > + ;; Record obsolete info immediately so that we know that > + ;; we're compiling an obsolete function and can avoid > + ;; giving warnings about calls to obsolete functions from > + ;; this function. > + (make-obsolete f new-name when) > (list 'make-obsolete > (list 'quote f) (list 'quote new-name) (list 'quote when)))) I think this could have the unwanted side-effect of "polluting" the Emacs session which runs the compiler with the obsolete function info from the files it's compiling. If we have with-suppressed-warnings then this auto suppression could be implemented in a more obvious way by wrapping the output code in (with-suppressed-warnings ...). And perhaps as Stefan suggests, we'll find the automation isn't really worth the trouble anyway.