sigma / magit-gh-pulls

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

Unbound slot: gh-pulls-api #90

Closed manuel-uberti closed 8 years ago

manuel-uberti commented 8 years ago

Hi,

first of all thanks for this package. This how it is setup in my config:

(use-package magit-gh-pulls             ; Show Github PRs in Magit
  :ensure t
  :defer t
  :init (add-hook 'magit-mode-hook #'turn-on-magit-gh-pulls))

I am on Debian Jessie, GNU Emacs 25.0.93.1 (x86_64-debian-linux-gnu, GTK+ Version 3.14.5) of 2016-04-30.

This is what I do:

This message appears:

Unbound slot: gh-pulls-api, "#<gh-pulls-api gh-pulls-api>", :base, oref

This is the backtrace:

Debugger entered--Lisp error: (unbound-slot gh-pulls-api "#<gh-pulls-api gh-pulls-api>" :base oref)
  signal(unbound-slot (gh-pulls-api "#<gh-pulls-api gh-pulls-api>" :base oref))
  #[1028 "\300\301\302!\303!F\"\207" [signal unbound-slot eieio-class-name eieio-object-name] 10 "Slot unbound is invoked during an attempt to reference an unbound slot.\nOBJECT is the instance of the object being reference.  CLASS is the\nclass of OBJECT, and SLOT-NAME is the offending slot.  This function\nthrows the signal `unbound-slot'.  You can overload this function and\nreturn the value to use in place of the unbound value.\nArgument FN is the function signaling this error.\nUse `slot-boundp' to determine if a slot is bound or not.\n\nIn CLOS, the argument list is (CLASS OBJECT SLOT-NAME), but\nEIEIO can only dispatch on the first argument, so the first two are swapped.\n\n(fn OBJECT CLASS SLOT-NAME FN)"]([eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache unbound "cache" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1462002635.2606587 300] unbound unbound nil :json 1 nil] [cl-struct-eieio--class gh-pulls-api "Git pull requests API" ([cl-struct-eieio--class gh-api-v3 "Github API v3" ([cl-struct-eieio--class gh-api "Github API" nil [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format unbound t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-api-v3) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api t nil unbound unbound nil unbound 0 nil] (:custom-groups nil :documentation "Github API")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-users-api gh-issues-api gh-pulls-api gh-repos-api gh-gist-api gh-oauth-api) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api-v3 t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Github API v3")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) nil ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor req-cls gh-pulls-request t nil] [cl-struct-cl-slot-descriptor cache-cls gh-pulls-cache t nil]] [gh-pulls-request gh-pulls-cache] [eieio-class-tag--gh-pulls-api t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Git pull requests API")] :base oref)
  apply(#[1028 "\300\301\302!\303!F\"\207" [signal unbound-slot eieio-class-name eieio-object-name] 10 "Slot unbound is invoked during an attempt to reference an unbound slot.\nOBJECT is the instance of the object being reference.  CLASS is the\nclass of OBJECT, and SLOT-NAME is the offending slot.  This function\nthrows the signal `unbound-slot'.  You can overload this function and\nreturn the value to use in place of the unbound value.\nArgument FN is the function signaling this error.\nUse `slot-boundp' to determine if a slot is bound or not.\n\nIn CLOS, the argument list is (CLASS OBJECT SLOT-NAME), but\nEIEIO can only dispatch on the first argument, so the first two are swapped.\n\n(fn OBJECT CLASS SLOT-NAME FN)"] [eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache unbound "cache" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1462002635.2606587 300] unbound unbound nil :json 1 nil] ([cl-struct-eieio--class gh-pulls-api "Git pull requests API" ([cl-struct-eieio--class gh-api-v3 "Github API v3" ([cl-struct-eieio--class gh-api "Github API" nil [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format unbound t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-api-v3) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api t nil unbound unbound nil unbound 0 nil] (:custom-groups nil :documentation "Github API")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-users-api gh-issues-api gh-pulls-api gh-repos-api gh-gist-api gh-oauth-api) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api-v3 t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Github API v3")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) nil ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor req-cls gh-pulls-request t nil] [cl-struct-cl-slot-descriptor cache-cls gh-pulls-cache t nil]] [gh-pulls-request gh-pulls-cache] [eieio-class-tag--gh-pulls-api t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Git pull requests API")] :base oref))
  slot-unbound([eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache unbound "cache" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1462002635.2606587 300] unbound unbound nil :json 1 nil] [cl-struct-eieio--class gh-pulls-api "Git pull requests API" ([cl-struct-eieio--class gh-api-v3 "Github API v3" ([cl-struct-eieio--class gh-api "Github API" nil [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format unbound t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-api-v3) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api t nil unbound unbound nil unbound 0 nil] (:custom-groups nil :documentation "Github API")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-users-api gh-issues-api gh-pulls-api gh-repos-api gh-gist-api gh-oauth-api) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api-v3 t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Github API v3")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) nil ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor req-cls gh-pulls-request t nil] [cl-struct-cl-slot-descriptor cache-cls gh-pulls-cache t nil]] [gh-pulls-request gh-pulls-cache] [eieio-class-tag--gh-pulls-api t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Git pull requests API")] :base oref)
  eieio-barf-if-slot-unbound(unbound [eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache unbound "cache" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1462002635.2606587 300] unbound unbound nil :json 1 nil] :base oref)
  eieio-oref([eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache unbound "cache" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1462002635.2606587 300] unbound unbound nil :json 1 nil] :base)
  #[(api transformer method resource &optional data params) "\306\307\"\211\310=\203

After I setup my profile via Customize, this is what I get:

eieio--validate-slot-value: Invalid slot type: gh-pulls-api, :base, string, nil

Backtrace:

Debugger entered--Lisp error: (invalid-slot-type gh-pulls-api :base string nil)
  signal(invalid-slot-type (gh-pulls-api :base string nil))
  eieio--validate-slot-value([cl-struct-eieio--class gh-pulls-api "Git pull requests API" ([cl-struct-eieio--class gh-api-v3 "Github API v3" ([cl-struct-eieio--class gh-api "Github API" nil [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format unbound t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-api-v3) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api t nil unbound unbound nil unbound 0 nil] (:custom-groups nil :documentation "Github API")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) (gh-users-api gh-issues-api gh-pulls-api gh-repos-api gh-gist-api gh-oauth-api) ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor cache-cls gh-cache t nil]] [gh-cache] [eieio-class-tag--gh-api-v3 t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Github API v3")]) [[cl-struct-cl-slot-descriptor sync t t nil] [cl-struct-cl-slot-descriptor cache nil t nil] [cl-struct-cl-slot-descriptor base unbound string nil] [cl-struct-cl-slot-descriptor profile unbound string nil] [cl-struct-cl-slot-descriptor auth nil t nil] [cl-struct-cl-slot-descriptor data-format :json t nil] [cl-struct-cl-slot-descriptor num-retries 0 t nil] [cl-struct-cl-slot-descriptor log nil t nil]] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (sync 0 cache 1 base 2 profile 3 auth 4 data-format 5 num-retries 6 log 7 ...)) nil ((:sync . sync) (:cache . cache) (:base . base) (:profile . profile) (:auth . auth) (:data-format . data-format) (:num-retries . num-retries) (:log . log)) [[cl-struct-cl-slot-descriptor req-cls gh-pulls-request t nil] [cl-struct-cl-slot-descriptor cache-cls gh-pulls-cache t nil]] [gh-pulls-request gh-pulls-cache] [eieio-class-tag--gh-pulls-api t nil unbound unbound nil :json 0 nil] (:custom-groups nil :documentation "Git pull requests API")] 3 nil :base)
  eieio-oset([eieio-class-tag--gh-pulls-api t [eieio-class-tag--gh-cache "~/.emacs.d/var/pcache/cache" "cache" "0.3/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1461947362.796303 300] unbound "manuel-uberti" nil :json 1 nil] :base nil)
  #[(api &rest args) "\303 \300 \304  \305\300 #\210\304  \306\307 #\210\310  \311    \312\"\206 
alexander-yakushev commented 8 years ago

There are problems with Emacs 25 (also see #43 and sigma/gh.el#54). I plan to investigate this when Emacs 25 actually appears in the repos.

manuel-uberti commented 8 years ago

Ok, thank you. Ignore this issue then.

alexander-yakushev commented 8 years ago

Thanks for reporting!

giuseppe commented 8 years ago

I had a similar problem, but

$ find .emacs.d/ -iname '*.elc' -exec rm \{ \} \;

and restarting emacs seems to have fixed them.

alexander-yakushev commented 7 years ago

Now that I switched to Emacs 25, removing precompiled files fixed the issues for me too. Thanks, @giuseppe!