You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using FileBackedHistory. I frequently use a lot of time and very frequently close them with Ctrl + W or Alt + F4. The problem is that this history type (contrary to SqliteBackedHistory) only syncs when reedline asks to. And this only happens when the program exits normally.
I think it would be to force sync after each insert - after all that's what the SQLite backend does and it works perfectly fine. I'd argue that it would even be a good thing to entirely remove the .sync() method, force history to synchronize with existing data on startup, and save after each insert. This could be done as a part of the history API rewrite.
What do you think?
The text was updated successfully, but these errors were encountered:
Splitting out the sync was the initial way to provide history session isolation for FileBackedHistory. In effect by only syncing on close, disk access can be limited and you only get shown the history for the current window. The SqliteBackedHistory goes a completely different route by having to keep unique session IDs.
So just syncing on every transaction would break either the isolation behavior or require the dreaded breaking change to the text format.
For the Nushell side we should coalesce history.sync_on_enter and history.isolation into one singular option.
I'm currently using
FileBackedHistory
. I frequently use a lot of time and very frequently close them with Ctrl + W or Alt + F4. The problem is that this history type (contrary toSqliteBackedHistory
) only syncs when reedline asks to. And this only happens when the program exits normally.I think it would be to force sync after each insert - after all that's what the SQLite backend does and it works perfectly fine. I'd argue that it would even be a good thing to entirely remove the
.sync()
method, force history to synchronize with existing data on startup, and save after each insert. This could be done as a part of the history API rewrite.What do you think?
The text was updated successfully, but these errors were encountered: