-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use sqlite #124
base: canon
Are you sure you want to change the base?
Use sqlite #124
Commits on Apr 19, 2024
-
fix(shell.nix): explicitly use rust tools from rustup
It’s just a better environment that way … sigh
Configuration menu - View commit details
-
Copy full SHA for 6046cac - Browse repository at this point
Copy the full SHA 6046cacView commit details -
refact(ops/stream_events): directly construct json value
Instead of having complex generic types internally that we map over, just create the json in a macro. Removes `ProjectAdded` from `Reason`, because it was not used anywhere. Changes the daemon format, so make sure to run the daemon with this new lorri version or you get serialization errors.
Configuration menu - View commit details
-
Copy full SHA for adfc561 - Browse repository at this point
Copy the full SHA adfc561View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba27237 - Browse repository at this point
Copy the full SHA ba27237View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6630b36 - Browse repository at this point
Copy the full SHA 6630b36View commit details -
refact(ops/shell): Rephrase Arc code in terms of
thread::race()
This new function makes it easy to race two threads, instead of syncing on shared state. This also simplifies the duration code, since all we are doing is waiting on timeouts and the stop channel.
Configuration menu - View commit details
-
Copy full SHA for d6f7d49 - Browse repository at this point
Copy the full SHA d6f7d49View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfe2f6c - Browse repository at this point
Copy the full SHA cfe2f6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e6aad7a - Browse repository at this point
Copy the full SHA e6aad7aView commit details -
refact(ops/gc): generate json via macro
Instead of using serde, defining a clear API boundary (preventing breakage on refactors).
Configuration menu - View commit details
-
Copy full SHA for 47b1f91 - Browse repository at this point
Copy the full SHA 47b1f91View commit details -
refact(*): Remove ContentAddressable from Project & pass manually
We only pass the `cas` through the `Project` constructor, never actually using it in the project `impl`!. This means we don’t need to burden `Project` with the cas, since it’s only used by the builder in the end. Insead, put it on the build loop for now. Funnily enough, `StartUserShell` does not need the project init anymore, cause it only wanted the `cas` from it.
Configuration menu - View commit details
-
Copy full SHA for 2208ddc - Browse repository at this point
Copy the full SHA 2208ddcView commit details -
refact(ops/op_gc): don’t quit on first error for non-json
Collect errors and continue deleting when json is not on.
Configuration menu - View commit details
-
Copy full SHA for 3258e3e - Browse repository at this point
Copy the full SHA 3258e3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e001762 - Browse repository at this point
Copy the full SHA e001762View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9249133 - Browse repository at this point
Copy the full SHA 9249133View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd33b50 - Browse repository at this point
Copy the full SHA dd33b50View commit details -
feat(sqlite): start importing the gcroots data
This is super crappy at the moment, but we want to ideally save most of the data in the database instead of indirectly in the filesystem. This gives us better leverage for storing other fun things, like which files we last watched for a project, or how long changes to the files took.
Configuration menu - View commit details
-
Copy full SHA for c3a4945 - Browse repository at this point
Copy the full SHA c3a4945View commit details -
fix: allow dead code for structs we only use for lifetimes
These two structs are only used for preventing automatic cleaning of these resources, so their content is never used. Newer rust will warn about that for structs as well.
Configuration menu - View commit details
-
Copy full SHA for 846e3fa - Browse repository at this point
Copy the full SHA 846e3faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fda515 - Browse repository at this point
Copy the full SHA 0fda515View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43b3c7d - Browse repository at this point
Copy the full SHA 43b3c7dView commit details -
refact(builder): hide shell_gc_path, add better interface
Yay, information hiding!
Configuration menu - View commit details
-
Copy full SHA for 93902ba - Browse repository at this point
Copy the full SHA 93902baView commit details -
fix(thread): slightly increase message timeout
The 5ms difference would sometimes trigger this channel first, so let’s give it 20ms difference.
Configuration menu - View commit details
-
Copy full SHA for 486f474 - Browse repository at this point
Copy the full SHA 486f474View commit details -
feat(ops/shell): print a nice warning for unsupported shells
We’ve only really used `shell` for the first few months, then expected people to switch to `direnv`. So we only have real support for `bash` and `zsh`. We should note that. By not shadowing `project` in the main function, I uncovered that we missed out on using the nested logger for `Info`.
Configuration menu - View commit details
-
Copy full SHA for 2c1cb9b - Browse repository at this point
Copy the full SHA 2c1cb9bView commit details -
refact(tests/gc): repair the gc integration test
What an amazing piece of code. Apparently it wasn’t even worth the work to remove all `dbg!` macros before submitting it upstream. Get rid of adding `stderr` to the checked output. I have a very trigger-happy finger that was very close to simply deleting this whole file without a second thought, but I suppose having some kind of integration test for this is at least a little useful.
Configuration menu - View commit details
-
Copy full SHA for 483683d - Browse repository at this point
Copy the full SHA 483683dView commit details -
refact(ops,project): move list_roots to project
Every thing related to roots should be in that module.
Configuration menu - View commit details
-
Copy full SHA for ecb1ee9 - Browse repository at this point
Copy the full SHA ecb1ee9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3179439 - Browse repository at this point
Copy the full SHA 3179439View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ca377d - Browse repository at this point
Copy the full SHA 7ca377dView commit details -
Configuration menu - View commit details
-
Copy full SHA for edecd77 - Browse repository at this point
Copy the full SHA edecd77View commit details -
fix(project): create project for each gc root
Instead of manually listing the files and doing some ad-hoc reading of files to list every gc dir, use our existing project setup to fetch this information. This switches around the logic a bit, because I couldn’t be bothered to keep it all the same. Especially around the liveness of nix files. Basically there might be a nix_file symlink file, but there might also not. And if it’s there, there might be a nix_file behind it or not. Same for the timestamp and the gc root symlink.
Configuration menu - View commit details
-
Copy full SHA for 98696a6 - Browse repository at this point
Copy the full SHA 98696a6View commit details -
refact(op/gc,project): move gc_deletion into project
We create a function which consumes the project and deletes its GC root.
Configuration menu - View commit details
-
Copy full SHA for 525eb58 - Browse repository at this point
Copy the full SHA 525eb58View commit details
Commits on Apr 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d8e2514 - Browse repository at this point
Copy the full SHA d8e2514View commit details -
feat(ops/gc): print the “time ago” down to the second
Previously it would say “0 days” for anything that’s younger than one day, now it will use the smallest unit that’s not 0.
Configuration menu - View commit details
-
Copy full SHA for eaf9cb9 - Browse repository at this point
Copy the full SHA eaf9cb9View commit details -
feat(project): start saving nix_file in database
In addition to updating the backlink to nix_file, we also update the gc_roots table in our database to contain the same info. The next step is to read everything from the database instead of from the symlinks. Currently, the gc_roots table is deleted at every start (to make changes to the schema easier), after everything works through the database, we have to set up a one-time migration (and write a test for it …) and clean up the symlinks.
Configuration menu - View commit details
-
Copy full SHA for d44b6fc - Browse repository at this point
Copy the full SHA d44b6fcView commit details -
refact(project): add connection to struct
This was a lot more complicated than I expected, because you cannot share a rusqlite `Connection` object across unwrap boundaries (you can share it across threads, but our `Async` does automatic unwrapping …). So what I do here is that whenever we want to clone a `Project`, I create something I call “skeleton”, which is a clone of the project without the connection object (just the sqlite file path), then on the other side of the boundary I turn the skeleton back into a Project by connecting to the database again. I think this is quite an okay solution.
Configuration menu - View commit details
-
Copy full SHA for 3db14ab - Browse repository at this point
Copy the full SHA 3db14abView commit details