-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Electric-sql #484
base: master
Are you sure you want to change the base?
Add Electric-sql #484
Conversation
I found the source of the error that was thrown from the wa-sqlite library when running the dev server. The project was loading the messages before the users, but the messages reference the users, so it did not want to add messages when the foreign keys referred no non-existent entitites. Reversing the order of the At this point I can see from some logs that the example data users and messages are being added, but the UI is still stuck on the loading spinner after I enter my name, just like all the other projects (besides firebase). |
I've added the electric-sql project with a preliminary implementation of the
LogicInterface
using the electric-sql client.The tests are not passing for electric-sql. It fails at the first attempt to interact with the DOM, saying it can't find the
#own-name-submit
button. When I runnpm run start:electric-sql
I do see the#own-name-submit
button and can submit my name, so I'm not sure why the test can't find it.When I try to run the app I can enter my name, but then it gets stuck on the loading spinner and won't load the example data (every other project besides Firebase also does this. Firebase loads the users but not messges). When I run the project in dev mode and go to
http://localhost:3000/?replication=false&add-example-data=true
it does seem to try to load the example data, but then thewa-sqlite
library throws an error in the web assembly code:Error: cannot rollback - no transaction is active
whenthis.logic.addMessage()
is called. I'm not sure how to debug that. I've asked about it in the Electric-sql discord channel.I've added all the scripts that I believe are necessary to build, serve, and test the electric-sql project. Electric-sql normally expects a backend with which to sync to be a part of the build process (to create the typescript client), but it also has a local-first-only mode that does not require an actual backend, but does require docker to be running during the build process so it can stand up an ephemeral postgres instance to generate the client and then tear it down. I used that strategy to keep things simple, and the docker requirement is mentioned in the README.