-
-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include better-sqlite
within each release
#3291
Comments
To be clear (as it doesn't seem so after hitting "open"), I am requesting a new feature in the long term. |
I hate to think how many developer hours have been wasted trying to get a standard |
So... I checked again over at the better-sqlite Electron Help Thread, where none of their suggestions were working with the last release. But suddenly, After trying it after updating electron (and not the whole forge project), I found it working! Tested on an empty install. Fully working on vanilla Used
Triggered the expected crash (reproduction). Added the following line to my scripts in the electron-forge project and ran it:
Ran it as a script, though Fully working on Node.js LTS (currently 18.12.0) on Windows 11. Can anyone else confirm this as working on other platforms? Seems to be working on my Ubuntu VBox. If we can get a confirmation on at least 2 other kernel flavours (Ubuntu's core is GNU/Linux) and a Mac, should we request a pull of that line into the |
Unfortunately, the Electron Forge maintainers don't have the bandwidth to maintain a sqlite3 native module. Ultimately, it's up to the community to either enhance the existing solutions or create a new solution. |
The beauty of this script is that if |
Pre-flight checklist
Problem description
Lots of people keep wanting to add the functionality of
sqlite3
to theirelectron
andelectron-forge
builds.The top error I keep finding mentioned is that the prebuilt executables were created with a different version of
nodejs
and/orwebpack
(which is several point releases ahead of the version included withelectron-forge
). Attempts at rebuilding the varioussqlite3
packages will fail because of this unresolvable disparity, and any successes that anyone seems to have are either short-lived (breaking with the next release ofnode
orwebpack
orelectron-forge
) or they are platform-dependent (and also short-lived, breaking with the next release, etc.).This complex issue has no great solution that continues to work for any length of time.
Proposed solution
This isn't the fault of
electron-forge
at all. But a potential solution is to include some flavour of SQLite sources and rebuild against the installed release from source, so that it has some basic included functionality and doesn't continually run into the version disparity that plagues the currentelectron
ecosphere as a whole.I think perhaps there may even need to be
@electron-forge/sqlite3
or some such package, based on source from an existing project (such asbetter-sqlite3
which seems to have the best maintenance of the packages to date). This would keep the source code on a slower release than the official package, but it would offer some degree of consistency with regard to prebuilt executables and inclusion in packages and makes.And it might even be simply a snapshot of that existing package/source, so that the devs don't have to fiddle with it too much and can simply help project developers make use of the functionality as needed.
This is, of course, entirely in the purview of the devs.
Alternatives considered
I have given thought to several alternatives:
webpack
needs its own template).sqlite
packages to conform to the needs ofelectron-forge
seems like a non-starter (i.e., that it would never move forward and at least one side of it would fail to participate).In all cases, the real solution seems to be that the
electron-forge
team is in the best position to do anything about it.Additional information
However, rather than racing to the finish line, this is something that's going to take a great deal of study and time.
I mean, I certainly don't have the skill set (never mind the time or salient understand of the inner workings of
electron-forge
) needed to do this kind of integration.It will need to be updated for the LTS versions of
nodejs
, rather than for every major release, just for the sake of sanity.It will need to be updated with major releases of
webpack
and should at least be rebuilt annually.But the sheer complexity of the
electron-forge
package (rather than the resulting ease-of-use that is a major hallmark of the project) means that at best this should be on a lower priority development tangent if it's even pursued.The text was updated successfully, but these errors were encountered: