org-roam / company-org-roam

Company completion backend for Org-roam
GNU General Public License v3.0
57 stars 4 forks source link

Warning (bytecomp): ‘org-roam-sql’ is an obsolete function (as of org-roam 1.0.0) #23

Closed iquabius closed 3 years ago

iquabius commented 3 years ago

I don't use straight.el, so after trying company-org-roam with use-package and the default package manager, package.el, I'm getting the following warning:

Leaving directory ‘/home/iqb/.emacs.d/elpa/company-org-roam-0.1’

Compiling file /home/iqb/.emacs.d/elpa/company-org-roam-0.1/company-org-roam.el at Tue Aug  4 10:27:52 2020
Entering directory ‘/home/iqb/.emacs.d/elpa/company-org-roam-0.1/’

Compiling no file at Tue Aug  4 10:27:52 2020
Warning (bytecomp): ‘org-roam-sql’ is an obsolete function (as of org-roam 1.0.0); use ‘org-roam-db-query’ instead.

And when typing something in a note to autocomplete:

Company: An error occurred in auto-begin
Company: backend company-org-roam error "EmacSQL had an unhandled condition: "near line 17: no such column: titles"" with args (candidates Secon)
Company: An error occurred in auto-begin
Company: backend company-org-roam error "Wrong type argument: hash-table-p, nil" with args (candidates Second)

Or running M-x company-org-roam:

helm-M-x-execute-command: Cannot complete at point
iquabius commented 3 years ago

It took me quite some time to realize, but my current configuration was pulling the package from https://stable.melpa.org, which is version 0.1. So the fix for my configuration wast to use the package from https://melpa.org, which includes the fix in #22:

(use-package company-org-roam
  :ensure t
  :after org-roam company org
  :pin melpa
  :config
  (push 'company-org-roam company-backends))

This is related to #21. I opened another issue just in case anyone hits the same problem as me...

jethrokuan commented 3 years ago

We're also about to phase out this package, but it'll remain working for a while.