Rely on emacsql-sqlite-open to pick the best available back-end#2486
Rely on emacsql-sqlite-open to pick the best available back-end#2486dustinfarris merged 5 commits intoorg-roam:mainfrom
Conversation
|
Re #2485. |
Signed-off-by: Burgess Chang <bsc@brsvh.org>
|
Unfortunately this implementation of Here's the updated version that works: |
|
I.e., we have to give up on using the SETUP argument, which means that Org-Roam doesn't follow the (refined) conventions. Alternatively the problematic functions could be changed to take the database as an optional argument, but I don't understand enough about what Org-Roam is doing here (and why), so it would be too risky for me to do it. |
|
I've pushed an additional commit to address the compiler warning (which are unrelated to the changes in the other commits). Normally that should be done in a separate pull-request, but due to the radio silence, I have chosen to append that here, so I don't have to juggle with two branches when/if I decide to play with Org-Roam. |
|
I think that |
That function was added two years ago and the first release that provided it was v4.0.0. It automatically picks the best available back-end, `emacsql-sqlite-builtin' or `emacsql-sqlite-module'. In v4.0.0 it could also fall back to the legacy `emacsql-sqlite'. The inferior third-party back-ends are no longer supported. Emacsql v4.1.0, which will be releases in early December, removes the legacy `emacsql-sqlite' back-end (which used a custom binary).
Starting with EmacSQL v4.1.0, `emacsql-sqlite-open' takes care of that.
To avoid having to create a wrapper function and silence the byte- compiler for both when using a pre-rename and post-rename Org, keep it simple and just depend on Org 9.6.
Depend on Org 9.6 for `org-fold-show-context'.
|
I've rebased, but note that I have not tested, since I don't use this package. |
|
It is working well for me locally. Thank you so much for this thorough PR! ❤️ |
|
Thanks for reviving this package! |
Now that emacsql handles choosing an appropriate backend/connector, we
do not need to provide these instructions. If there are issues, emacsql
has good error messages that tell the user what they need to do to get
things working.
In general:
- If the user is on Emacs >= 29, emacsql will use the built-in sqlite
functionality that comes with Emacs.
- If the user is on Emacs < 29, emacsql will use a module-based
connector that requires the user to have certain libraries available
on their machine. emacsql will tell the user what is needed if they
do not have it already.
Ref: #2486
Close: #2502
Close: #2415
That function was added two years ago and the first release that
provided it was v4.0.0. It automatically picks the best available
back-end,
emacsql-sqlite-builtinoremacsql-sqlite-module.In v4.0.0 it could also fall back to the legacy
emacsql-sqlite.The inferior third-party back-ends are no longer supported.
Emacsql v4.1.0, which will be releases in early December, removes
the legacy
emacsql-sqliteback-end (which used a custom binary).This means that we now require an Emacs that was built with SQLite
and/or module support.
Motivation for this change
EmacSQL now takes care of picking the best back-end itself. Let's
use that.
By removing an option that offers no longer valid choices, we make
sure users cannot pick an invalid choice.