pekingduck / emacs-sqlite3-api

SQLite3 API for GNU Emacs 25+
GNU General Public License v3.0
62 stars 5 forks source link

Load the sqlite3-api module after compilation #11

Closed ikappaki closed 11 months ago

ikappaki commented 11 months ago

Hi,

could you please consider patch to load the sqlite3-api module after compilation so that it is immediately available to the environment. It addresses #10.

The main change is in the first commit in sqlite3.el where the sqlite3-api is required just after successful compilation. The documentation is also updated to reflect that it is not needed any more to reload the package. It is not obvious to me why this was omitted in the first place (I might be missing something).

I took the liberty of creating a GitHub action with the second commit to run the existing tests in CI across all main architectures (MS-Windows, macos and ubuntu) so as to confirm everything is working as expected, in the hope that this will be generally useful. I can split it to a separate PR if required.

The CI change includes:

  1. The use of https://github.com/emacs-eldev/eldev build tool to simplify testing as a package (it compiles and install the package locally for testing). It uses the Eldev file to configure which files to package.
  2. The customization of the module build command via the SQLITE3_API_BUILD_COMMAND environment variable so that it can be build with nix in CI. This is required because the version of Emacs installed is built with nix and the module needs to be compatible with that.
  3. An update in tests/consts.el to test the availability of sqlite-ioerr-data based on the SQLite version the module was build with.

Eldev is a very capable and simple to use build tool to manage the development of elisp packages. We are only use it here to simplify the testing (more info).

Thanks