magit / forge

Work with Git forges from the comfort of Magit
GNU General Public License v3.0
1.3k stars 113 forks source link

"SQL logic error" "no such column: sparse_p" #656

Closed benthamite closed 5 months ago

benthamite commented 5 months ago
  1. With point in a Git repository, forge-add-repository RET <url>.
  2. "EmacSQL had an unhandled condition: nil, nil, nil, ("SQL logic error" "no such column: sparse_p" 1 1)."

Backtrace:

Debugger entered--Lisp error: (emacsql-error nil nil nil ("SQL logic error" "no such column: sparse_p" 1 1))
  signal(emacsql-error (nil nil nil ("SQL logic error" "no such column: sparse_p" 1 1)))
  #f(compiled-function (connection message) #<bytecode 0x21dd434ea77c11c>)(#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> "UPDATE repository SET sparse_p = NULL WHERE id = '\"Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=\"';")
  apply(#f(compiled-function (connection message) #<bytecode 0x21dd434ea77c11c>) (#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> "UPDATE repository SET sparse_p = NULL WHERE id = '\"Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=\"';"))
  #f(compiled-function (&rest args) #<bytecode 0x3f3dd7f3ce7ad>)(#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> "UPDATE repository SET sparse_p = NULL WHERE id = '\"Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=\"';")
  apply(#f(compiled-function (&rest args) #<bytecode 0x3f3dd7f3ce7ad>) #<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> "UPDATE repository SET sparse_p = NULL WHERE id = '\"Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=\"';")
  emacsql-send-message(#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> "UPDATE repository SET sparse_p = NULL WHERE id = '\"Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=\"';")
  #f(compiled-function (connection sql &rest args) #<bytecode 0x185719a3862f8eaa>)(#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> [:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=")
  apply(#f(compiled-function (connection sql &rest args) #<bytecode 0x185719a3862f8eaa>) #<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> ([:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE="))
  emacsql(#<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> [:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=")
  apply(emacsql #<emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection-aa32145e> [:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] (repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE="))
  #f(compiled-function (db sql &rest args) #<bytecode 0x16fb267b8ab6ff54>)(#<forge-database forge-database-aa3222f4> [:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=")
  apply(#f(compiled-function (db sql &rest args) #<bytecode 0x16fb267b8ab6ff54>) #<forge-database forge-database-aa3222f4> ([:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE="))
  emacsql(#<forge-database forge-database-aa3222f4> [:update $i1 :set (= $i2 $s3) :where (= $i4 $s5)] repository sparse-p nil id "Z2l0aHViLmNvbTpSX2tnRE9LSGdCTlE=")
  closql--dset(#<forge-database forge-database-aa3222f4> #<forge-github-repository forge-github-repository-b3ea5c80> sparse-p nil)
  closql-oset(#<forge-github-repository forge-github-repository-b3ea5c80> sparse-p nil)
  eieio-oset--closql-oset(#<subr eieio-oset> #<forge-github-repository forge-github-repository-b3ea5c80> sparse-p nil)
  apply(eieio-oset--closql-oset #<subr eieio-oset> (#<forge-github-repository forge-github-repository-b3ea5c80> sparse-p nil))
  eieio-oset(#<forge-github-repository forge-github-repository-b3ea5c80> sparse-p nil)
  forge-add-repository("https://github.com/tlon-team/babel-core")
  funcall-interactively(forge-add-repository "https://github.com/tlon-team/babel-core")
  command-execute(forge-add-repository record)
  execute-extended-command(nil "forge-add-repository" nil)
  funcall-interactively(execute-extended-command nil "forge-add-repository" nil)
  command-execute(execute-extended-command)

GNU Emacs 29.2 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-03-19 macOS Sonoma Version 14.2.1

benthamite commented 5 months ago

Mmh, it looks like this resulted simply because of a change in the value of forge-database-file, which ceased to point to the standard location of the Forge db under var/forge. Perhaps some weird behavior by no-littering. Sorry for the inappropriate bug report.