New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
el-get-update doesn't update .loaddefs.el #1352
Comments
Could you try |
I switched to
|
This could be the same issue as #446, it's at least similar; it almost certainly is not related to #453 (which is now fixed in both
My first instinct is to say you should reload/recompile everything to be safe, but looking at the backtrace it appears the trouble is in your autoload file that apparently contains a hash where a timestamp was expected. At any rate, I don't think there is any reason to think this is fixed in |
Emacs' autoload routines insert md5 hashes under some circumstances ( (if secondary-autoloads-file-buf
;; MD5 checksums are much better
...
;; so we use time-stamps for the main autoloads file
;; (loaddefs.el) where we have special ways to
;; circumvent the "random change problem", and MD5
;; checksum in secondary autoload files where we do
;; not need the time-stamp optimization because it is
;; already provided by the primary autoloads file. |
Having trouble reproducing this, I tried: ;;; https://github.com/dimitri/el-get/issues/1352
;;; el-get-update doesn't update autoloads in .loaddefs
(el-get-register-method-alias :test :builtin)
(setq
el-get-verbose t
el-get-default-process-sync t)
(setq
el-get-sources
`((:build
(("sh" "-c"
,(format "echo %s > a.el"
(shell-quote-argument
(mapconcat (lambda (x) (prin1-to-string x t))
`(,(make-symbol ";;;###autoload")
(defun a-utoloaded-func () t)
(defun a-nother-func () t)
(provide 'a))
"\n")))))
:name a :type test :compile "."
:autoloads t)))
(el-get 'sync 'a)
;; sanity check
(assert (and (fboundp 'a-utoloaded-func)
(autoloadp (symbol-function 'a-utoloaded-func))))
;; make a-nother-func also autoloaded
(setq
el-get-sources
`((:build
(("sh" "-c"
,(format "echo %s > a.el"
(shell-quote-argument
(mapconcat (lambda (x) (prin1-to-string x t))
`(,(make-symbol ";;;###autoload")
(defun a-utoloaded-func () t)
,(make-symbol ";;;###autoload")
(defun a-nother-func () t)
(provide 'a))
"\n")))))
:name a :type test :compile "."
:autoloads t)))
(el-get-update "a")
(assert (and (fboundp 'a-nother-func)
(autoloadp (symbol-function 'a-nother-func)))
nil
"autoloads of `a' didn't get updated")
I also tried (el-get-register-method-alias :test :builtin)
(setq
el-get-verbose t
el-get-default-process-sync t)
(setq el-get-sources
'((:name rinari :checkout "6e4ed82632fb469a356fcabdd6c980d95c78e545")))
(el-get 'sync 'rinari)
(find-file el-get-autoload-file)
(debug nil "autoloads before rinari update")
(setq el-get-sources
'((:name rinari :checkout "5dd57827fcb0b1cd456f7f89da281097e9bc6004")))
(el-get-update "rinari")
(find-file el-get-autoload-file)
(debug nil "autoloads after rinari update") But rinari fails to install, |
I can reproduce this via |
This sounds like #446 after all, which should now be fixed in master; what's does |
It says 4.0.7.807a0ca, which already contains the fix for #446. |
I can't reproduce this. Can you reproduce starting from a fresh installation? |
Yes, I can reproduce this in a fresh user account:
|
Doesn't happen here (using Emacs 24.3), I put the contents of What's your Emacs version? (I really should have asked this sooner). |
Hmm, odd. I'm on 24.2.1. |
Right, #446 is still broken on 24.2, it seems |
Oh, it only failed because |
The following test fails about 50% of the time for me with 24.2, I think it depends on how fast the code runs. It seems unlikely that this failure could be triggered when running ;;; https://github.com/dimitri/el-get/issues/1352
;;; el-get-update doesn't update autoloads in .loaddefs
(require 'autoload)
(unless (fboundp 'autoloadp)
(defsubst autoloadp (object)
"Non-nil if OBJECT is an autoload."
(eq 'autoload (car-safe object))))
(defvar el-get-issue1352-time nil)
(defun el-get-test-install (package url post-install-fun)
(let ((pdir (el-get-package-directory package)))
(unless (file-directory-p pdir)
(make-directory pdir))
(let ((default-directory pdir))
(write-region "
;;;###autoload
\(defun a-utoloaded-func () t)
\(defun a-nother-func () t)
\(provide 'a)
" nil "a.el"))
(funcall post-install-fun package)))
(defun el-get-test-update (package url post-install-fun)
(let ((pdir (el-get-package-directory package)))
(unless (file-directory-p pdir)
(make-directory pdir))
(let ((default-directory pdir))
(write-region "
;;;###autoload
\(defun a-utoloaded-func () t)
;;;###autoload
\(defun a-nother-func () t)
\(provide 'a)
" nil "a.el"))
(funcall post-install-fun package)))
(el-get-register-method :test
:install #'el-get-test-install
:update #'el-get-test-update
:remove #'el-get-rmdir
:install-hook #'el-get-builtin-install-hook)
(setq
el-get-sources
`((:name a :type test :compile "." :autoloads t))
el-get-default-process-sync t)
(el-get 'sync 'a)
;; sanity check
(assert (and (fboundp 'a-utoloaded-func)
(autoloadp (symbol-function 'a-utoloaded-func))))
(assert (not (fboundp 'a-nother-func)))
;; make a-nother-func also autoloaded
(el-get-update "a")
(assert (and (fboundp 'a-nother-func)
(autoloadp (symbol-function 'a-nother-func)))
nil
"autoloads of `a' didn't get updated") |
It looks like I face this issue with el-get 5.1.9e4f1fa on Emacs 24.4.1. My .loaddefs.el contains MD5 hashes where time structures seems to be expected by update-directory-autoloads. Here is a snippet of my .loaddefs.el:
Any hint on what can be done do fix or workaround this? |
You can try Have you put things in non-standard places? It looks like more than the normal amount of |
The call to el-get-invalidate-autoloads didn't change the fact that MD5
checksums were set in .loaddefs.el. The amount of "../" is due to my
~/.emacs.d being a symlink to somewhere else.
Sheda
|
Aha. It seems having $ ls -l .emacs.d
lrwxrwxrwx 1 etest etest 8 Mar 9 20:03 .emacs.d -> emacs-d/
$ emacs -batch -Q -L emacs-d/el-get/el-get/ -l el-get --visit=emacs-d/el-get/.loaddefs.el -f el-get-invalidate-autoloads
el-get: updating autoloads for el-get
Wrote /home/etest/.emacs.d/el-get/.loaddefs.el
~/.emacs.d/el-get/.loaddefs.el and /home/etest/emacs-d/el-get/.loaddefs.el are the same file
File .loaddefs.el changed on disk. Reread from disk? (yes or no) yes
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get-autoloading.el...
...
~/.emacs.d/el-get/.loaddefs.el and /home/etest/emacs-d/el-get/.loaddefs.el are the same file
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get-bundle.el...done
...
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get-list-packages.el...
~/.emacs.d/el-get/.loaddefs.el and /home/etest/emacs-d/el-get/.loaddefs.el are the same file
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get-list-packages.el...done
...
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get.el...
~/.emacs.d/el-get/.loaddefs.el and /home/etest/emacs-d/el-get/.loaddefs.el are the same file
Generating autoloads for ../../.emacs.d/el-get/el-get/el-get.el...done
Saving file /home/etest/emacs-d/el-get/.loaddefs.el...
Wrote /home/etest/emacs-d/el-get/.loaddefs.el
(No changes need to be saved)
el-get: byte-compiling autoload file
Wrote /home/etest/.emacs.d/el-get/.loaddefs.elc
$ grep -E '[0-9a-f]{32}' emacs-d/el-get/.loaddefs.el
;;;;;; "08fc70d24fc2dffafa39bf9f7869ccb5")
;;;;;; "5d60bc715094fdbf95965c40aebf6111")
;;;;;; "07f410ec5bb8851a065841ab0d1b9875")
$ emacs -batch -Q -L emacs-d/el-get/el-get/ -l el-get -f el-get-invalidate-autoloads
el-get: updating autoloads for el-get
Wrote /home/etest/.emacs.d/el-get/.loaddefs.el
Generating autoloads for el-get/el-get-autoloading.el...
...
Generating autoloads for el-get/el-get.el...done
Saving file /home/etest/.emacs.d/el-get/.loaddefs.el...
Wrote /home/etest/.emacs.d/el-get/.loaddefs.el
(No changes need to be saved)
el-get: byte-compiling autoload file
Wrote /home/etest/.emacs.d/el-get/.loaddefs.elc
$ grep -E '[0-9a-f]{32}' emacs-d/el-get/.loaddefs.el |
And when I run el-get-invalidate-autoloads from my standard session (i.e., What did I miss? |
Dang, thought we'd found it. The only remaining difference I can see is packages installed. Can you try that test again with a fresh doc.emacs.d, installing only el-get? |
Here is what I've done: $ ls -ld .t_-emacs_ Then, from emacs, evaluated the elisp necessary to install el-get: And (el-get-invalidate-autoloads). The resulting .loaddefs.el do not $ grep -E '[0-9a-f]{32}' ~/.t-emacs.d/el-get/.loaddefs.el ;;;### (autoloads (el-get el-get-self-checksum el-get-checksum (autoload 'el-get-version "el-get/el-get" " (fn)" t nil) (autoload 'el-get-install "el-get/el-get" " So, in itself, the use of symlinks don't seems to trigger the use of MD5 Sheda |
Hmm, I tried also with a more deeply nested emacs-d, but that doesn't seem to trigger it either. Can you post your .status.el? |
Here it is.
|
It doesn't seem to have shown up. |
The attachment was probably stripped. Here it is (inline): ((apel status "installed" recipe (el-get-package-features (el-get-elpa-package-directory 'el-get))))) '(".(md|mdown|markdown)'" . markdown-mode)))) (el-get-load-path pkg))) (el-get-package-exists-p "bbdb") (el-get-print-to-string On Fri, Mar 13, 2015 at 2:35 PM, Noam Postavsky notifications@github.com
|
So I'm still not able to reproduce your results. #2125 should fix the visited-via-truename-problem I found earlier. If that doesn't also solve your problem, post the (require 'trace)
(mapc #'trace-function-background
'( ;;make-autoload
autoload-find-generated-file
autoload-generated-file
autoload-read-section-header
;;autoload-print-form
autoload-rubric
autoload-ensure-default-file
autoload-insert-section-header
autoload-find-file
autoload-file-load-name
generate-file-autoloads
autoload--setup-output
autoload--print-cookie-text
autoload-generate-file-autoloads
autoload-save-buffers
update-file-autoloads
autoload-find-destination
autoload-remove-section
update-directory-autoloads
update-autoloads-from-directories
batch-update-autoloads))
(el-get-invalidate-autoloads) |
I replaced el-get-autoloading.el with the on found here: https://raw.githubusercontent.com/npostavs/el-get/a9ad872de9218d02a4d56970eea11b14ab4368c1/el-get-autoloading.el It doesn't solve my problem. Here is the requested trace output: http://s000.tinyupload.com/?file_id=90641875488802788668 |
Thanks, I think can see the problem. Do you have Although, maybe there's also something else because you reported problems even with
Did you also take care of the stale elc? $ emacs -batch -Q -L a/b/c/emacs-d/el-get/el-get/ -l el-get --eval '(setq find-file-visit-truename t)' -f el-get-invalidate-autoloads
el-get: updating autoloads for apel
...
~/.emacs.d/el-get/.loaddefs.el and /home/etest/a/b/c/emacs-d/el-get/.loaddefs.el are the same file
Wrong type argument: listp, "8e5644b079ecfef02aa1caf5969e29f8" |
I've merge #2125, hopefully this fixes all problems, please report if otherwise. |
If I do
M-x el-get-update rinari
, therinari
components of~/.emacs.d/el-get/.loaddefs.el
don't get updated. #446, #453, and #543 all look like they might be related, but I'm not sure if this is a duplicate or a separate issue.The text was updated successfully, but these errors were encountered: