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

Persist history of flowR REPL sessions #641

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

Ellpeck
Copy link
Member

@Ellpeck Ellpeck commented Feb 5, 2024

persistory

@Ellpeck Ellpeck linked an issue Feb 5, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d69018e) 71.34% compared to head (e890221) 71.34%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/cli/repl/core.ts 72.72% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
- Coverage   71.34%   71.34%   -0.01%     
==========================================
  Files         217      217              
  Lines        7005     7015      +10     
  Branches     1085     1087       +2     
==========================================
+ Hits         4998     5005       +7     
- Misses       1720     1722       +2     
- Partials      287      288       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

in case someone uses a different file
Copy link
Member

@EagleoutIce EagleoutIce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wuhuuu!

@EagleoutIce
Copy link
Member

Theoretically, we have a problem when someone runs multiple repls at the same time which overwrite each other but hey... we live only once!

@EagleoutIce EagleoutIce merged commit 2a72e25 into main Feb 5, 2024
19 checks passed
@EagleoutIce EagleoutIce deleted the 606-persist-history-of-flowr-repl-sessions branch February 5, 2024 15:15
@Ellpeck
Copy link
Member Author

Ellpeck commented Feb 5, 2024

Theoretically, we have a problem when someone runs multiple repls at the same time which overwrite each other but hey... we live only once!

Thoretically, we could keep a stream to the history file open while repl is active and store the history into the file that way. Then, we could just print a warning and skip storing the history for any sessions that are started on top of the original one.

@EagleoutIce
Copy link
Member

Yes, or we could keep a History-Tree but I think the current handling is sufficient as the most frequent use case will be the restart of the repl after compilation

@EagleoutIce
Copy link
Member

This pull request is included in v1.4.2 (see Release v1.4.2 (Dropping xmlparsedata, Benchmark Re-Runs, and Repl Fixes)).

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.

Persist history of flowR REPL sessions
2 participants