* Re: [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file.
[not found] <E1Wobcl-000254-5a@vcs.savannah.gnu.org>
@ 2014-05-25 20:29 ` Stefan Monnier
2014-05-26 8:41 ` Thien-Thi Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-05-25 20:29 UTC (permalink / raw)
To: Thien-Thi Nguyen; +Cc: emacs-devel
> + ";;; -*- no-byte-compile: t -*-\n"
Sadly that doesn't help for the packages downloaded as tarballs which
already come with their own foo-pkg.el. We really should instead call
`byte-recompile-directory' telling it to skip the foo-pkg.el.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file.
2014-05-25 20:29 ` [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file Stefan Monnier
@ 2014-05-26 8:41 ` Thien-Thi Nguyen
2014-05-26 18:17 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2014-05-26 8:41 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]
() Stefan Monnier <monnier@iro.umontreal.ca>
() Sun, 25 May 2014 16:29:32 -0400
Sadly that doesn't help for the packages downloaded as tarballs
which already come with their own foo-pkg.el. We really should
instead call `byte-recompile-directory' telling it to skip the
foo-pkg.el.
I see the ‘byte-recompile-directory’ guard expression:
;; It is an ordinary file. Decide whether to compile it.
(if (and (string-match emacs-lisp-file-regexp source)
;; The next 2 tests avoid compiling lock files
(file-readable-p source)
(not (string-match "\\`\\.#" file))
(not (auto-save-file-name-p source))
(not (string-equal dir-locals-file
(file-name-nondirectory source))))
;; do it
)
affords us only ‘auto-save-file-name-p’ and ‘dir-locals-file’ as
possible ways to exclude -pkg.el files, the latter probably a bit
easier since it's a variable, w/o modifying the filesystem. If
modifying the filesystem is OK, i suppose another way is to make
the file temporarily unreadable around the
‘byte-recompile-directory’ call.
All of these strike me as inelegant. Maybe now is good time to
address another issue of ‘byte-recompile-directory’, namely that
caller has no control over the order of the files processed. As
author of ELPA package ‘xpm’, i would like this control and would
be willing to work a bit (i.e., manually specifying the desired
order) to get it. I imagine others might desire similarly.
Support for explicit ordering (and thus, inclusion) in package.el
naturally lends itself to support for -pkg.el (or other
user-specified globbing / wildcards, for example) exclusion, a
nice (non-)coincidence, no?
Would such redesign be compatible w/ the package.el vision?
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file.
2014-05-26 8:41 ` Thien-Thi Nguyen
@ 2014-05-26 18:17 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-05-26 18:17 UTC (permalink / raw)
To: emacs-devel
> affords us only ‘auto-save-file-name-p’ and ‘dir-locals-file’ as
> possible ways to exclude -pkg.el files, the latter probably a bit
> easier since it's a variable, w/o modifying the filesystem.
Indeed, the reason why *-pkg.el is currently recompiled is that the fix
wasn't as simple as let-binding a variable telling
byte-recompile-directory to ignore that file.
This said, it should be fairly easy to add a variable
(e.g. `byte-compile-ignored-files') for that purpose.
> If modifying the filesystem is OK,
Yuck!
> All of these strike me as inelegant. Maybe now is good time to
> address another issue of ‘byte-recompile-directory’, namely that
> caller has no control over the order of the files processed. As
> author of ELPA package ‘xpm’, i would like this control and would
> be willing to work a bit (i.e., manually specifying the desired
> order) to get it. I imagine others might desire similarly.
I think this is ill-advised. AFAIK the only kind of dependency that
might deserve such a treatment is the one where foo.el is newer than
foo.elc and where byte-compiling bar.el should not use the older
foo.elc. But in the case of package.el there are no old elc files to
avoid, so there's no need for dependencies.
If you have another example where you think ordering of compilation
matters, feel free to post it, so I can try to shoot it down ;-)
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-26 18:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1Wobcl-000254-5a@vcs.savannah.gnu.org>
2014-05-25 20:29 ` [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file Stefan Monnier
2014-05-26 8:41 ` Thien-Thi Nguyen
2014-05-26 18:17 ` Stefan Monnier
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).