-
I'm trying to use forge for the first time with gitlab, but seeing this error: (invalid-slot-name "#<forge-database forge-database-1fe2b4e7c280>" :file) Here's how I initialise forge in my init.el: (with-eval-after-load 'magit
(require 'forge))
(setq auth-sources '("~/.authinfo")) My full config is here: https://github.com/EdwardIII/emacs-dotfiles/blob/main/init.el I've populated ~/.authinfo with this:
Here's a stacktrace (I've just done a search/replace on the project name, but everything else is the same): Debugger entered--Lisp error: (invalid-slot-name "#<forge-database forge-database-1fe2b4e7c280>" :file)
signal(invalid-slot-name ("#<forge-database forge-database-1fe2b4e7c280>" :file))
slot-missing(#<forge-database forge-database-1fe2b4e7c280> :file oset "/Users/edward/.emacs.d/forge-database.sqlite")
#f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode 0x1fe2b4c1b9fd>)(#<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
apply(#f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode 0x1fe2b4c1b9fd>) #<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
shared-initialize(#<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
#f(compiled-function (this &optional slots) "Construct the new object THIS based on SLOTS.\nSLOTS is a tagged list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from SLOTS." #<bytecode 0x1fe2b4c1ba29>)(#<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
apply(#f(compiled-function (this &optional slots) "Construct the new object THIS based on SLOTS.\nSLOTS is a tagged list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically. If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from SLOTS." #<bytecode 0x1fe2b4c1ba29>) #<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
initialize-instance(#<forge-database forge-database-1fe2b4e7c280> (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-scompanyerclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode 0x1fe2b4a041d1>)(forge-database :file "/Users/edward/.emacs.d/forge-database.sqlite")
apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-scompanyerclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode 0x1fe2b4a041d1>) forge-database (:file "/Users/edward/.emacs.d/forge-database.sqlite"))
make-instance(forge-database :file "/Users/edward/.emacs.d/forge-database.sqlite")
#f(compiled-function (class &optional variable file debug) #<bytecode 0x1fe2b6f2c665>)(forge-database forge--db-connection "/Users/edward/.emacs.d/forge-database.sqlite" t)
apply(#f(compiled-function (class &optional variable file debug) #<bytecode 0x1fe2b6f2c665>) forge-database (forge--db-connection "/Users/edward/.emacs.d/forge-database.sqlite" t))
closql-db(forge-database forge--db-connection "/Users/edward/.emacs.d/forge-database.sqlite" t)
forge-db()
forge-sql([:select * :from repository :where (and (= forge $s1) (= owner $s2) (= name $s3))] "gitlab.com" "company-agency" "company-app-server")
#f(compiled-function (&rest rest) "((host owner name) &optional remote demand)\n\nReturn the repository identified by HOST, OWNER and NAME." #<bytecode 0x1fe2b6f25065>)(("gitlab.com" "company-agency" "company-app-server") "origin" full)
apply(#f(compiled-function (&rest rest) "((host owner name) &optional remote demand)\n\nReturn the repository identified by HOST, OWNER and NAME." #<bytecode 0x1fe2b6f25065>) ("gitlab.com" "company-agency" "company-app-server") ("origin" full))
forge-get-repository(("gitlab.com" "company-agency" "company-app-server") "origin" full)
#f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x1fe2b6f26569>)("[email protected]:company-agency/company-app-server.git" "origin" full)
apply(#f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode 0x1fe2b6f26569>) "[email protected]:company-agency/company-app-server.git" ("origin" full))
forge-get-repository("[email protected]:company-agency/company-app-server.git" "origin" full)
#f(compiled-function (demand &optional remote) "Return the current forge repository.\n\nIf the `forge-buffer-repository' is non-nil, then return that.\nOtherwise if `forge-buffer-topic' is non-nil, then return the\nrepository for that. Finally if both variables are nil, then\nreturn the forge repository corresponding to the current Git\nrepository, if any." #<bytecode 0x1fe2b6f26551>)(full)
apply(#f(compiled-function (demand &optional remote) "Return the current forge repository.\n\nIf the `forge-buffer-repository' is non-nil, then return that.\nOtherwise if `forge-buffer-topic' is non-nil, then return the\nrepository for that. Finally if both variables are nil, then\nreturn the forge repository corresponding to the current Git\nrepository, if any." #<bytecode 0x1fe2b6f26551>) full nil)
forge-get-repository(full)
forge-bug-reference-setcompany()
run-hooks(change-major-mode-after-body-hook special-mode-hook magit-section-mode-hook magit-mode-hook magit-status-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook special-mode-hook magit-section-mode-hook magit-mode-hook magit-status-mode-hook))
run-mode-hooks(magit-status-mode-hook)
magit-status-mode()
magit-setcompany-buffer-internal(magit-status-mode nil ((magit-buffer-diff-args ("--no-ext-diff")) (magit-buffer-diff-files nil) (magit-buffer-log-args ("-n256" "--decorate")) (magit-buffer-log-files nil)))
magit-status-setcompany-buffer("~/Projects/company/server/server/src/")
magit-status(nil ((3 . 7) (("/Users/edward/Projects/company/server/" "remote" "get-url" "origin") . "[email protected]:company-agency/company-app-server.git") (("~/Projects/company/server/server/src/" . magit-toplevel) . "/Users/edward/Projects/company/server/") (("/Users/edward/Projects/company/server/" "rev-parse" "--show-toplevel") . "/Users/edward/Projects/company/server") (("/Users/edward/Projects/company/server/" "rev-parse" "--show-cdcompany") . "") (("/Users/edward/Projects/company/server/server/src/" "rev-parse" "--show-cdcompany") . "../../") (("/Users/edward/Projects/company/server/server/src/" "rev-parse" "--show-toplevel") . "/Users/edward/Projects/company/server")))
funcall-interactively(magit-status nil ((3 . 7) (("/Users/edward/Projects/company/server/" "remote" "get-url" "origin") . "[email protected]:company-agency/company-app-server.git") (("~/Projects/company/server/server/src/" . magit-toplevel) . "/Users/edward/Projects/company/server/") (("/Users/edward/Projects/company/server/" "rev-parse" "--show-toplevel") . "/Users/edward/Projects/company/server") (("/Users/edward/Projects/company/server/" "rev-parse" "--show-cdcompany") . "") (("/Users/edward/Projects/company/server/server/src/" "rev-parse" "--show-cdcompany") . "../../") (("/Users/edward/Projects/company/server/server/src/" "rev-parse" "--show-toplevel") . "/Users/edward/Projects/company/server")))
call-interactively(magit-status nil nil)
command-execute(magit-status) I can't really grasp where the issue is coming from in the stacktrace, I can't see it ever inserting anything into the DB. Could someone point me in the right direction to diagnose further? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Do you use Doom Emacs? They use a library that monkey patches |
Beta Was this translation helpful? Give feedback.
Do you use Doom Emacs? They use a library that monkey patches
closql
andemacsql
and I recently made some incompatible changes but forgot to inform them.