From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jackson Ray Hamilton Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master b7d8d3c 9/9: * fixtures/test/: Don't byte-compile Date: Sun, 18 Dec 2016 18:43:53 -0800 Message-ID: References: <20160805013757.31623.20092@vcs.savannah.gnu.org> <20160805013758.9B5BB2201A4@vcs.savannah.gnu.org> <357c3d56-6fe1-fcd1-8403-eaab95ab9af8@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------765C734500D551125727A296" X-Trace: blaine.gmane.org 1482115594 2958 195.159.176.226 (19 Dec 2016 02:46:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2016 02:46:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 19 03:46:30 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIny9-0008Kx-Oa for ged-emacs-devel@m.gmane.org; Mon, 19 Dec 2016 03:46:29 +0100 Original-Received: from localhost ([::1]:42975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cInyD-0002ok-OI for ged-emacs-devel@m.gmane.org; Sun, 18 Dec 2016 21:46:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cInxR-0002nH-8v for emacs-devel@gnu.org; Sun, 18 Dec 2016 21:45:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cInxM-0007WJ-EX for emacs-devel@gnu.org; Sun, 18 Dec 2016 21:45:43 -0500 Original-Received: from mta-10-3.privateemail.com ([198.54.127.62]:57428) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cInxM-0007UG-7r for emacs-devel@gnu.org; Sun, 18 Dec 2016 21:45:40 -0500 Original-Received: from [10.145.8.123] (unknown [10.20.151.203]) by MTA-10.privateemail.com (Postfix) with ESMTPA id 4A5EE60033; Mon, 19 Dec 2016 02:45:34 +0000 (UTC) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.54.127.62 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:210615 Archived-At: This is a multi-part message in MIME format. --------------765C734500D551125727A296 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Would you be amenable to me pushing the attached patch? Jackson On 12/17/2016 07:18 PM, Stefan Monnier wrote: >> Apparently, tar uses gnulib's excluded_file_name function, which appears >> to delegate to fnmatch, which looks pretty complex to me. I'm not aware >> of a "standalone" command providing an interface for this pattern >> matcher, but if one exists, maybe we could utilize that. > > I think we could use sh's "case" patterns for that. > >> Another option might be to generate an archive with tar and then use the >> list of included files to determine what to compile. This command: >> >> $ tar -ch packages/context-coloring/ --exclude-vcs -X \ >> packages/context-coloring/.elpaignore | tar --list >> >> Produces this output: > >> packages/context-coloring/ >> packages/context-coloring/LICENSE >> packages/context-coloring/context-coloring-emacs-lisp.el >> packages/context-coloring/README.md >> packages/context-coloring/context-coloring-javascript.el >> packages/context-coloring/context-coloring.el >> >> We could filter down the ".el" files from there. > > That might work as well, indeed. > > BTW, given the current GNUmakefile, it's easy/natural to only test > .elpaignore matches for those files which end in .el and which don't yet > have a .elc file. I expect this would be an important optimization to > make sure that "make" is fast when there's not much to (re)compile. > > > Stefan > --------------765C734500D551125727A296 Content-Type: text/x-patch; name="0001-Respect-.elpaignore-when-determining-files-to-byte-c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Respect-.elpaignore-when-determining-files-to-byte-c.pa"; filename*1="tch" >From 7670085e197cbf0b966232889acb760e5555f25c Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Sun, 18 Dec 2016 11:53:54 -0800 Subject: [PATCH 1/1] Respect .elpaignore when determining files to byte-compile. --- GNUmakefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7d6d100..ab81163 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -144,9 +144,23 @@ $(foreach al, $(autoloads), $(eval $(call RULE-srcdeps, $(al)))) \"$$(pwd)\")" # Put into elcs the set of elc files we need to keep up-to-date. -# I.e. one for each .el file except for the -pkg.el, the -autoloads.el, and -# the .el files that are marked "no-byte-compile". -els := $(call FILTER-nonsrc, $(wildcard packages/*/*.el)) +# I.e. one for each .el file in each package root, except for the -pkg.el, +# the -autoloads.el, the .el files that are marked "no-byte-compile", and +# files matching patterns in packages' .elpaignore files. +included_els := $(shell \ + for pt in packages/*; do \ + if [ -f "$${pt}/.elpaignore" ]; then \ + ignore="$${pt}/.elpaignore"; \ + else \ + ignore="/dev/null"; \ + fi; \ + if [ -d $$pt ]; then \ + tar -ch $$pt --exclude-vcs -X "$$ignore" \ + | tar --list \ + | grep '^[^/]*/[^/]*/[^/]*\.el$$'; \ + fi; \ + done) +els := $(call FILTER-nonsrc, $(included_els)) naive_elcs := $(patsubst %.el, %.elc, $(els)) current_elcs := $(wildcard packages/*/*.elc) -- 2.1.4 --------------765C734500D551125727A296--