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 580a1b6: Respect .elpaignore when compiling and optimize compilation. Date: Mon, 26 Dec 2016 11:57:22 -0800 Message-ID: <318da984-8e21-fece-3d61-2e3846a1cef6@jacksonrayhamilton.com> References: <20161223195027.29384.58430@vcs.savannah.gnu.org> <20161223195027.7C9E52201BC@vcs.savannah.gnu.org> <064dad34-c8c4-9135-2cbd-0ccd452de2cc@jacksonrayhamilton.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E2405BBBCF13CF2C0C2B1541" X-Trace: blaine.gmane.org 1482782274 32454 195.159.176.226 (26 Dec 2016 19:57:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Dec 2016 19:57:54 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 26 20:57:50 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 1cLbOt-0006nT-Qi for ged-emacs-devel@m.gmane.org; Mon, 26 Dec 2016 20:57:39 +0100 Original-Received: from localhost ([::1]:51527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLbOy-0005ez-FE for ged-emacs-devel@m.gmane.org; Mon, 26 Dec 2016 14:57:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLbOr-0005et-KQ for emacs-devel@gnu.org; Mon, 26 Dec 2016 14:57:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLbOm-00004s-QL for emacs-devel@gnu.org; Mon, 26 Dec 2016 14:57:37 -0500 Original-Received: from mta-05-3.privateemail.com ([68.65.122.15]:60658) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cLbOm-0008VL-Ee for emacs-devel@gnu.org; Mon, 26 Dec 2016 14:57:32 -0500 Original-Received: from [10.145.8.123] (unknown [10.20.151.222]) by MTA-05.privateemail.com (Postfix) with ESMTPA id 852D760030; Mon, 26 Dec 2016 19:57:23 +0000 (UTC) X-Enigmail-Draft-Status: N1110 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 68.65.122.15 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:210823 Archived-At: This is a multi-part message in MIME format. --------------E2405BBBCF13CF2C0C2B1541 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable > I haven't looked at the performance side of this. It just seemed simpl= er. I say we keep it as-is, as my reading of the current commands is simpler than the way I read this alternative. Compare the way I read it: "Make a tar archive and list its contents." Versus: "Execute tar with verbose output, which happens to only include the files packaged, also that output needs to be redirected from stderr to stdout for make to process it, also bury the archive contents in /dev/null so as not to interfere with the redirected verbose output." > No, I was rather wondering if this behavior is documented or just accid= ental. Although I do not see an example of an explicitly mentioned file argument used with an exclusion flag in the tar manual, the language of the manual suggests that this should work: > `--exclude-from=3Dfile' > `-X file' >=20 > Causes tar to ignore files that match the patterns listed in file.=20 "Files" ought to include explicitly mentioned files. Also, I've attached a patch for the "pwd-based exclusions" issue I mentioned in my last email. I checked the timing on it, and it only reduces the speed of "make" with nothing to do by about 50ms. Does it look good to you? Jackson On 12/25/2016 08:16 PM, Stefan Monnier wrote: >>> I think we can skip the second tar with something like >>> "tar -cvhf /dev/null 2>&1". >> I tried this before, and again just now, but it does not cause make to >> execute at a significantly different speed on my machine. Is the effe= ct >> more noticeable on yours? >=20 > I haven't looked at the performance side of this. It just seemed simpl= er. >=20 >> $ cd a >> $ tar -ch *.el --no-recursion --exclude-vcs -X .elpaignore | tar --lis= t >> >> The above command correctly yields "b.el". >> >> Did you have any other cases in mind? >=20 > No, I was rather wondering if this behavior is documented or just accid= ental. >=20 >=20 > Stefan >=20 --------------E2405BBBCF13CF2C0C2B1541 Content-Type: text/x-patch; name="0001-Change-to-package-directory-before-checking-.elpaign.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Change-to-package-directory-before-checking-.elpaign.pa"; filename*1="tch" =46rom e05054c3f9b6cf6ee0dbeafd0438b562f06afc64 Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Mon, 26 Dec 2016 11:25:21 -0800 Subject: [PATCH] Change to package directory before checking .elpaignore exclusions. If we don't do this, the package's directory's name is included in the fi= le names that are checked for .elpaignore matches. .elpaignore matches shou= ld be assumed to occur inside the package's directory. --- GNUmakefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 6d57fae..8edb2f8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -150,13 +150,18 @@ $(foreach al, $(autoloads), $(eval $(call RULE-srcd= eps, $(al)))) included_els :=3D $(shell \ for pt in packages/*; do \ if [ -d $$pt ]; then \ - if [ -f "$${pt}/.elpaignore" ]; then \ - tar -ch $$pt/*.el --no-recursion \ - --exclude-vcs -X "$${pt}/.elpaignore" \ + prev=3D$$(pwd); \ + cd $$pt; \ + if [ -f .elpaignore ]; then \ + tar -ch *.el --no-recursion \ + --exclude-vcs -X .elpaignore \ | tar --list; \ else \ - ls -1 $$pt/*.el; \ - fi; \ + ls -1 *.el; \ + fi | while read line; \ + do echo "$${pt}/$${line}"; \ + done; \ + cd $$prev; \ fi; \ done) els :=3D $(call FILTER-nonsrc, $(included_els)) --=20 2.1.4 --------------E2405BBBCF13CF2C0C2B1541--