Skip to content
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

Introduce History trait #604

Merged
merged 28 commits into from
Jan 15, 2023
Merged

Introduce History trait #604

merged 28 commits into from
Jan 15, 2023

Conversation

gwenn
Copy link
Collaborator

@gwenn gwenn commented Feb 23, 2022

Fix #127
Fix #442

TODO

Breaking changes:

  • Editor impacted (new generic type parameter I)
  • History renamed to FileHistory
  • History API impacted (to make trait object safe)

Fix kkawakam#127
Fix kkawakam#442

TODO
- [ ] check if `History::add` and `History::add_owned` can be fused
- [ ] put old / default `FileHistory` behind a feature
- [ ] SQLite based implementation behind a feature
- [ ] timestamped history ? Implementation detail ?
- [ ] editable entry ? later ?

Breaking changes:
* `Editor` impacted (new generic type parameter `I`)
* `History` renamed to `FileHistory`
* History API impacted (to make trait object safe)
@gwenn gwenn mentioned this pull request Apr 20, 2022
@gwenn gwenn changed the title [WIP] Introduce History trait Introduce History trait Nov 19, 2022
@gwenn gwenn marked this pull request as ready for review November 19, 2022 15:06
@gwenn
Copy link
Collaborator Author

gwenn commented Nov 19, 2022

If anyone is interested, I would like a code review.
Mainly on the History trait.
And on the SQLiteHistory implementation.
Which differs from reedline:

  • all entries are kept in the SQLite database.
  • and so entries may be added concurrently by different sessions.

@gwenn gwenn merged commit c54601d into kkawakam:master Jan 15, 2023
@gwenn gwenn deleted the history_trait branch January 15, 2023 15:30
fsktom referenced this pull request in fsktom/rusty-endsong-parser Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save lines in history file with a Unix timestamp More flexible history save/load
1 participant