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

Adds in simple generic persist interface. #1897

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamharrison
Copy link
Member

Made the renwindow persistence a bit more generic, so that we can use it for other things (like detecting a restart), or possibly for persisting long-running processes like LSPs between restarts.

This way we can easily flag data which should be kept around between restarts so that if we do need to optimize those cases to ensure an optimal experience, we can.

@adamharrison
Copy link
Member Author

This is likely to jank to be put into core; I will probably make this a library.

@takase1121
Copy link
Member

I don't think this is too jank to be in core, we should keep it here. Does this persist values across restarts?

@adamharrison
Copy link
Member Author

Yes; but it does some metatable stuff I feel you really won't like.

@takase1121
Copy link
Member

Not really, copying the data by-value to another lua_State is more or less what I'd expect. I would definitely try to store the Lua state with TLS but I think jgmdev can handle that. I can see how copying userdata can be useful, but I think its better to just not set metatable on the output and leave it for the user to set that.

I would add that its probably good for this to be accessible via C as well, so for instance fonts can be preserved over restarts.

@adamharrison adamharrison marked this pull request as draft October 15, 2024 01:51
@adamharrison
Copy link
Member Author

Okay, well if you're serious about entertaining this, I'm going to experiment with this first to preserve terminal contents and gdb processes; will report back with findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants