sigma / magit-gh-pulls

Magit plugin for dealing with GitHub pull requests
254 stars 48 forks source link

Warning (magit): Magit no longer uses Magit-Popup. #126

Open raxod502 opened 5 years ago

raxod502 commented 5 years ago

With latest Magit I get the following warning:

Warning (magit): Magit no longer uses Magit-Popup.
It now uses Transient.
See https://emacsair.me/2019/02/14/transient-0.1.

However your configuration and/or some third-party package that
you use still depends on the `magit-popup' package.  But because
`magit' no longer depends on that, `package' has removed it from
your system.

If some package that you use still depends on `magit-popup' but
does not declare it as a dependency, then please contact its
maintainer about that and install `magit-popup' explicitly.

If you yourself use functions that are defined in `magit-popup'
in your configuration, then the next step depends on what you use
that for.

* If you use `magit-popup' to define your own popups but do not
  modify any of Magit's old popups, then you have to install
  `magit-popup' explicitly.  (You can also migrate to Transient,
  but there is no need to rush that.)

* If you add additional arguments and/or actions to Magit's popups,
  then you have to port that to modify the new "transients" instead.
  See https://github.com/magit/magit/wiki/Converting-popup-modifications-to-transient-modifications

Based on the backtrace it seems the culprit is magit-gh-pulls:

Debugger entered--Lisp error: (error "Foo")
  signal(error ("Foo"))
  error("Foo")
  magit--magit-popup-warning()
  magit-define-popup-keys-deferred(magit-gh-pulls-popup)
  byte-code("\300\301!\210\302\303\304\305\306\307\310\311&\7\207" [magit-define-popup-keys-deferred magit-gh-pulls-popup custom-declare-variable magit-gh-pulls-arguments (plist-get magit-gh-pulls-popup :default-arguments) "" :group magit-commands :type (repeat (string :tag "Argument"))] 8)
  require(magit-gh-pulls nil t)
  (not (require 'magit-gh-pulls nil t))
  (if (not (require 'magit-gh-pulls nil t)) (display-warning 'use-package (format "Cannot load %s" 'magit-gh-pulls) :error) (condition-case err (progn (add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls) (progn (defalias 'radian--advice-hide-magit-gh-pulls-when-not-cached #'(lambda nil "Hide the \"Pull Requests\" section when the list is ..." (let* ... ...))) (advice-add 'magit-gh-pulls-insert-gh-pulls ':before-while #'radian--advice-hide-magit-gh-pulls-when-not-cached) 'radian--advice-hide-magit-gh-pulls-when-not-cached) (blackout 'magit-gh-pulls-mode nil) t) ((debug error) (funcall use-package--warning114 :config err))))
  (closure (bootstrap-version straight-current-profile t) nil (if (not (require 'magit-gh-pulls nil t)) (display-warning 'use-package (format "Cannot load %s" 'magit-gh-pulls) :error) (condition-case err (progn (add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls) (progn (defalias 'radian--advice-hide-magit-gh-pulls-when-not-cached #'(lambda nil "Hide the \"Pull Requests\" section when the list is ..." ...)) (advice-add 'magit-gh-pulls-insert-gh-pulls ':before-while #'radian--advice-hide-magit-gh-pulls-when-not-cached) 'radian--advice-hide-magit-gh-pulls-when-not-cached) (blackout 'magit-gh-pulls-mode nil) t) ((debug error) (funcall use-package--warning114 :config err)))))()
  eval-after-load(magit (closure (bootstrap-version straight-current-profile t) nil (if (not (require 'magit-gh-pulls nil t)) (display-warning 'use-package (format "Cannot load %s" 'magit-gh-pulls) :error) (condition-case err (progn (add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls) (progn (defalias 'radian--advice-hide-magit-gh-pulls-when-not-cached #'...) (advice-add 'magit-gh-pulls-insert-gh-pulls ':before-while #'radian--advice-hide-magit-gh-pulls-when-not-cached) 'radian--advice-hide-magit-gh-pulls-when-not-cached) (blackout 'magit-gh-pulls-mode nil) t) ((debug error) (funcall use-package--warning114 :config err))))))
  (condition-case err (eval-after-load 'magit #'(lambda nil (if (not (require 'magit-gh-pulls nil t)) (display-warning 'use-package (format "Cannot load %s" 'magit-gh-pulls) :error) (condition-case err (progn (add-hook ... ...) (progn ... ... ...) (blackout ... nil) t) ((debug error) (funcall use-package--warning114 :config err)))))) ((debug error) (funcall use-package--warning114 :catch err)))
  eval-buffer(#<buffer  *load*-561276> nil "/Users/raxod502/files/control/radian/emacs/radian...." nil t)  ; Reading at buffer position 167635
  load-with-code-conversion("/Users/raxod502/files/control/radian/emacs/radian...." "/Users/raxod502/files/control/radian/emacs/radian...." nil t)
  load("/Users/raxod502/files/control/radian/emacs/radian...." nil nomessage)
  (unwind-protect (load radian-lib-file nil 'nomessage) (run-hooks 'radian--finalize-init-hook))
  (let ((link-target (file-symlink-p user-init-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist")) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (unwind-protect (load radian-lib-file nil 'nomessage) (run-hooks 'radian--finalize-init-hook)))
  (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let ((link-target (file-symlink-p user-init-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist")) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (unwind-protect (load radian-lib-file nil 'nomessage) (run-hooks 'radian--finalize-init-hook))))
  (if alternate-user-emacs-directory (progn (setq alternate-user-emacs-directory (file-name-as-directory alternate-user-emacs-directory)) (setq user-emacs-directory alternate-user-emacs-directory) (setq user-init-file (expand-file-name "init.el" user-emacs-directory)) (load user-init-file 'noerror 'nomessage)) (defvar radian-minimum-emacs-version "26.1" "Radian Emacs does not support any Emacs version be...") (defvar radian-local-init-file "~/.emacs.d/init.local.el" "File for local customizations of Radian.") (setq package-enable-at-startup nil) (setq custom-file (expand-file-name (format "custom-%d-%d.el" (emacs-pid) (random)) temporary-file-directory)) (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let ((link-target (file-symlink-p user-init-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist")) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (unwind-protect (load radian-lib-file nil 'nomessage) (run-hooks 'radian--finalize-init-hook)))))
  (let ((alternate-user-emacs-directory (getenv "USER_EMACS_DIRECTORY"))) (if alternate-user-emacs-directory (progn (setq alternate-user-emacs-directory (file-name-as-directory alternate-user-emacs-directory)) (setq user-emacs-directory alternate-user-emacs-directory) (setq user-init-file (expand-file-name "init.el" user-emacs-directory)) (load user-init-file 'noerror 'nomessage)) (defvar radian-minimum-emacs-version "26.1" "Radian Emacs does not support any Emacs version be...") (defvar radian-local-init-file "~/.emacs.d/init.local.el" "File for local customizations of Radian.") (setq package-enable-at-startup nil) (setq custom-file (expand-file-name (format "custom-%d-%d.el" (emacs-pid) (random)) temporary-file-directory)) (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let ((link-target (file-symlink-p user-init-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist")) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (unwind-protect (load radian-lib-file nil 'nomessage) (run-hooks 'radian--finalize-init-hook))))))
  eval-buffer(#<buffer  *load*> nil "/Users/raxod502/.emacs.d/init.el" nil t)  ; Reading at buffer position 2707
  load-with-code-conversion("/Users/raxod502/.emacs.d/init.el" "/Users/raxod502/.emacs.d/init.el" t t)
  load("/Users/raxod502/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x41b0be21>) #f(compiled-function () #<bytecode 0x41b0bdf1>) t)
  command-line()
  normal-top-level()
glasser commented 5 years ago

FWIW looks like the new magit has its own GitHub integration library, Forge: https://emacsair.me/2018/12/19/forge-0.1/

sambrightman commented 4 years ago

The fix seems to be adding (require 'magit-popup) at the top of the file (and presumably adding the dependency too). However, I'm not convinced a PR will be merged...

raxod502 commented 4 years ago

I have since migrated entirely to Forge; it's categorically superior in my opinion.

glasser commented 4 years ago

Forge is quite nice, though I don't really want to use its "track what comments I've read locally" feature and that makes sync operations quite slow.