unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [elpa] master b7d8d3c 9/9: * fixtures/test/: Don't byte-compile
Date: Sun, 18 Dec 2016 18:43:53 -0800	[thread overview]
Message-ID: <cc198833-e2ea-83b4-220c-24b9bea80c2c@jacksonrayhamilton.com> (raw)
In-Reply-To: <jwvlgvehr3p.fsf-monnier+emacsdiffs@gnu.org>

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

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
> 

[-- Attachment #2: 0001-Respect-.elpaignore-when-determining-files-to-byte-c.patch --]
[-- Type: text/x-patch, Size: 1634 bytes --]

From 7670085e197cbf0b966232889acb760e5555f25c Mon Sep 17 00:00:00 2001
From: Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
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


  reply	other threads:[~2016-12-19  2:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160805013757.31623.20092@vcs.savannah.gnu.org>
     [not found] ` <20160805013758.9B5BB2201A4@vcs.savannah.gnu.org>
2016-08-06 17:42   ` [elpa] master b7d8d3c 9/9: * fixtures/test/: Don't byte-compile Jackson Hamilton
2016-08-06 18:29     ` Stefan Monnier
2016-12-18  0:06       ` Jackson Ray Hamilton
2016-12-18  3:18         ` Stefan Monnier
2016-12-19  2:43           ` Jackson Ray Hamilton [this message]
2016-12-19 14:49             ` Stefan Monnier
2016-12-20  6:04               ` Jackson Ray Hamilton
2016-12-20 14:53                 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc198833-e2ea-83b4-220c-24b9bea80c2c@jacksonrayhamilton.com \
    --to=jackson@jacksonrayhamilton.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).