From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pacifying "might not be defined at runtime" warning Date: Mon, 09 May 2016 08:20:29 -0400 Message-ID: References: <573031FB.8090709@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462797626 13612 80.91.229.3 (9 May 2016 12:40:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 May 2016 12:40:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 09 14:40:18 2016 Return-path: Envelope-to: ged-emacs-devel@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 1azkIm-0005hE-Ek for ged-emacs-devel@m.gmane.org; Mon, 09 May 2016 14:28:45 +0200 Original-Received: from localhost ([::1]:41005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azkIl-00035A-Qu for ged-emacs-devel@m.gmane.org; Mon, 09 May 2016 08:28:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azkIh-000322-Ef for emacs-devel@gnu.org; Mon, 09 May 2016 08:28:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azkIc-0000HJ-B9 for emacs-devel@gnu.org; Mon, 09 May 2016 08:28:38 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azkIc-0000H9-0Y for emacs-devel@gnu.org; Mon, 09 May 2016 08:28:34 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1azkDK-00009l-14 for emacs-devel@gnu.org; Mon, 09 May 2016 14:23:06 +0200 Original-Received: from 192-171-43-150.cpe.pppoe.ca ([192.171.43.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 May 2016 14:23:05 +0200 Original-Received: from monnier by 192-171-43-150.cpe.pppoe.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 May 2016 14:23:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 192-171-43-150.cpe.pppoe.ca User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:S+RH4BweNSFyLANTV3+L6XxIDPw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:203703 Archived-At: > "cd lisp; make compile-always" generates several "might not be defined at > runtime" warnings in the master branch. For example, it generates the attached > warnings in lisp/vc. [ Note: when I say "vc.el" below, it includes generic VC files other than vc-hooks.el, such as vc-dispatch.el. ] The vc-.el files provide implementations for the functions used in vc-hooks.el as well as for those used in vc.el. In the parts that implement the vc.el functionality, it's "perfectly safe" to call functions provided by vc.el, since they're supposed to only be used *from* vc.el (i.e. when vc.el is already loaded). > Is there some reason we shouldn't add directives like > (require 'vc) to pacify the byte compiler here? (See the 2nd attachment.) The reason is that vc-.el is autoloaded as soon as you visit a file that's managed by , even if you never have and never will use VC, so a (require 'vc) in those files would load VC too eagerly. Stefan