From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14551: compiler fails to track eval-when-compile in required files Date: Mon, 03 Jun 2013 16:59:07 -0400 Message-ID: References: <6m8v2r6ios.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1370293228 25176 80.91.229.3 (3 Jun 2013 21:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Jun 2013 21:00:28 +0000 (UTC) Cc: 14551@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 03 23:00:25 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ujbra-00018h-RU for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 23:00:22 +0200 Original-Received: from localhost ([::1]:46728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujbra-0002S5-Ei for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 17:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjbrS-0002Rl-4m for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2013 17:00:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjbrN-00063s-IJ for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2013 17:00:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjbrN-00063o-Ft for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2013 17:00:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UjbtC-0001hF-JJ for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2013 17:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jun 2013 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14551 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14551-submit@debbugs.gnu.org id=B14551.13702932706387 (code B ref 14551); Mon, 03 Jun 2013 21:02:02 +0000 Original-Received: (at 14551) by debbugs.gnu.org; 3 Jun 2013 21:01:10 +0000 Original-Received: from localhost ([127.0.0.1]:49433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjbsL-0001ey-Q3 for submit@debbugs.gnu.org; Mon, 03 Jun 2013 17:01:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:21266) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjbsJ-0001eg-RF for 14551@debbugs.gnu.org; Mon, 03 Jun 2013 17:01:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15541920" Original-Received: from 69-165-139-76.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.76]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Jun 2013 16:59:03 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9012463332; Mon, 3 Jun 2013 16:59:07 -0400 (EDT) In-Reply-To: <6m8v2r6ios.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 03 Jun 2013 16:30:27 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74794 Archived-At: > foo.el: > (require 'lib) > (defun foo () > (lib2-func)) [...] > lib.el: > (eval-when-compile > (require 'lib2)) > (provide 'lib) [...] > rm lib*.elc > emacs -Q -L . -batch -f batch-byte-compile foo.el > produces no warnings. Yes, that's a long standing bug. Fixing it right is likely to be pretty tricky/difficult because it means we need to disregard some of the packages already loaded somehow. In the general case, you have the same problem even without eval-when-compile, e.g. if you have in lib.el a call to an autoloaded macro, in which case the autoloaded package will be loaded if lib.el is not yet compiled but not if it is. The "noruntime" warnings are implemented with a pile of hacks, and I'd rather not add to them. So, given that a proper fix looks pretty difficult, I wouldn't hold my breath. Stefan