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

Add support for acme dump file #15

Open
fhs opened this issue Aug 26, 2019 · 2 comments
Open

Add support for acme dump file #15

fhs opened this issue Aug 26, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@fhs
Copy link
Collaborator

fhs commented Aug 26, 2019

acme-lsp should make use of the dump ctl message to set the command to restart acme-lsp from a dump file.

It's not clear whether we should keep a persistent window open for dumping purposes, or "/LSP/Diagnostics" window should become persistent, or something else.

@lobre
Copy link

lobre commented Nov 3, 2023

Can you briefly explain how such a thing would be done? I don't understand the mechanism.

I see this in acme(4). I guess you are referring to it, but I struggle to understand what it means, and how to use it.

...
ctl    Text messages may be written to ctl to affect the window.

       dump command
           Set the command string to recreate the window from a dump file.
    ...

So apparently, one can write to the ctl file of an acme window to affect this window. And one of the possible writeable messages is dump <command>.

But what is the "command string" in that context? What would acme do exactly when such a message is posted? And when should acme-lsp write to that file?

Help to understand would be appreciated! Thanks.

@fhs
Copy link
Collaborator Author

fhs commented Dec 29, 2023

@lobre The "command string" is just the acme-lsp command line arguments. Acme-lsp should write to this file when it starts up. This will tell acme that it should save the "command string" in the dump file, so that acme can restart acme-lsp later when loading from the dump file.

You can look at some examples, such as the Watch command here: https://github.com/9fans/go/blob/fab41a57aacc9863ab73fde7d3a76dfe9aaafada/acme/Watch/main.go#L77
It should be a simple change I think, unless I'm forgetting something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants