Migrate Startup Scripts to SQLite #55
Replies: 3 comments
-
We've already started playing with the idea of a sqlite databse: My main concern is the added complexity to the user experience. Right now it's very simple to get started (just setup zoxide and the sessions will start coming in as you cd into projects). So there's a bit of work to be done before we have something stable and useful. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I have already seen that PR, but my discussion is very different than the PR. It's for ideas to replace the scripts in the config file. Currently we are using the config file as a DB. |
Beta Was this translation helpful? Give feedback.
-
Also expanding on what you said on stream. We could have a table to sqlite to register some basic commands. Maybe a workflow like: Register common scripts once sesh startup -register go ~/.config/sesh/bin/go.sh Now the sqlite table looks like this Name | Path Now I sesh connect to a go project folder Adds the startup script to the current workspace sesh startup -add go Now we check if Now we finally add this to the startup table in sqlite Workspace | Script If this happens it would be a big PR for sure, maybe not suitable for now ... And as you have said, currently the test suite is important for sure 💯 |
Beta Was this translation helpful? Give feedback.
-
Since the project is in the early phase of development, it would be easier to switch now than later.
Using a file as a db could be unreliable and also not future proof.
Unreliable as in:
Note
I am purposefully using the term workspace settings instead of just startup script here .. keeping in mind there could be more settings in future.
Also using SQLite is time tested for such things and used by many editors like vscode (.vscdb file) for example for the exact same use case.
Consequently, after migration we will have to expose a command to do basic operations:
Both these commands implicitly use cwd as session path.
Beta Was this translation helpful? Give feedback.
All reactions