Add separate interactive function to refresh project autoloader
ci/woodpecker/push/woodpecker Pipeline failed Details

WIP-cache
Hugo Thunnissen 9 months ago
parent e9d547af07
commit 5eae689f09

@ -344,13 +344,11 @@ before the search is executed."
(phpinspect-current-project-root)))) (phpinspect-current-project-root))))
(phpinspect-project-get-type-filepath project class index-new))) (phpinspect-project-get-type-filepath project class index-new)))
(defun phpinspect-index-current-project () (defun phpinspect-project-refresh-autoloader (project)
"Index all available FQNs in the current project." (interactive (list (phpinspect--cache-get-project-create
(interactive) (phpinspect--get-or-create-global-cache)
(let* ((project (phpinspect--cache-get-project-create (phpinspect-current-project-root))))
(phpinspect--get-or-create-global-cache) (let* ((autoloader (phpinspect-project-autoload project)))
(phpinspect-current-project-root)))
(autoloader (phpinspect-project-autoload project)))
;; Update display so that it is clear to the user that emacs is ;; Update display so that it is clear to the user that emacs is
;; responsive. Otherwise the autoloader refresh thread hogging the cpu will ;; responsive. Otherwise the autoloader refresh thread hogging the cpu will
;; make it look like emacs is not responsive, especially when M-x uses some ;; make it look like emacs is not responsive, especially when M-x uses some
@ -358,9 +356,16 @@ before the search is executed."
;; appear frozen while the thread is executing. ;; appear frozen while the thread is executing.
(redisplay) (redisplay)
(phpinspect-autoloader-refresh autoloader) (phpinspect-autoloader-refresh autoloader)))
(phpinspect-project-enqueue-include-dirs project)))
(defun phpinspect-index-current-project ()
"Index all available FQNs in the current project."
(interactive)
(let* ((project (phpinspect--cache-get-project-create
(phpinspect--get-or-create-global-cache)
(phpinspect-current-project-root))))
(phpinspect-project-refresh-autoloader project)
(phpinspect-project-enqueue-include-dirs project)))
(provide 'phpinspect) (provide 'phpinspect)
;;; phpinspect.el ends here ;;; phpinspect.el ends here

Loading…
Cancel
Save