reedline icon indicating copy to clipboard operation
reedline copied to clipboard

Confusions with session IDs

Open ClementNerma opened this issue 1 year ago • 2 comments

I've looked into the code and found that session IDs for the history was defined in two places: the History trait which provides a session method, as well as the Reedline struct iself.

These two interact more or less directly, but I struggle to understand the design of this feature. Why isn't there only a single place (e.g. Reedline) defining a session ID?

This leads to very weird behaviour: if I create a Reedline instance and then a SqliteBackedHistory with a given session ID, it won't be stored in the new history entries, and will only be used for specific actions.

ClementNerma avatar Feb 09 '24 16:02 ClementNerma

No idea. You'd have to go back and look at the PRs. I wrote one of them and don't remember myself. Seems logical to me that it should be only in one place.

fdncred avatar Feb 09 '24 17:02 fdncred

I think it would be nice that, after merging the API redesign PR (#747), we talk about new breaking changes as there are several areas where I think there could be room for improvement - this being one example.

I'll let the issue open if you're ok with it, and I'll get back to it when the time comes.

ClementNerma avatar Feb 09 '24 18:02 ClementNerma

Given #747 won't be merged, I think it's safe to close this issue.

ClementNerma avatar Nov 12 '24 15:11 ClementNerma