-
Notifications
You must be signed in to change notification settings - Fork 33
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
race between coqtail#start and CoqToLine #364
Comments
I worried something like that might be possible. Is this something you came across accidentally during normal use or did you trigger it intentionally by spamming |
I think I accidentally pressed my mappings for CoqUndo ( |
whonore
added a commit
that referenced
this issue
Aug 23, 2024
As described in #364, now that `coqtail#start` calls `start` asynchronously, calling a command during `CoqStart` (e.g., `:CoqToLine | CoqToLine`) can cause a race that often results in a fatal error. The solution implemented here is to have `coqtail#start` check if Coqtail is initialized (`s:initted()`) but not yet running (`s:running()`) and, if so, drop the command with a warning. The only difference between `s:initted()` and `s:running()` is whether `b:coqtail_started` is set, so I believe this should ensure that no other commands can run until `coqtail#after_startCB` completes. Since I expect it should be pretty rare in practice for someone to try to run commands before `CoqStart` completes, I think just ignoring them is reasonable. This should not affect commands that are called before `CoqStart`, those will still be queued to run by `coqtail#after_startCB`. Fixes #364.
whonore
added a commit
that referenced
this issue
Aug 23, 2024
As described in #364, now that `coqtail#start` calls `start` asynchronously, calling a command during `CoqStart` (e.g., `:CoqToLine | CoqToLine`) can cause a race that often results in a fatal error. The solution implemented here is to have `coqtail#start` check if Coqtail is initialized (`s:initted()`) but not yet running (`s:running()`) and, if so, drop the command with a warning. The only difference between `s:initted()` and `s:running()` is whether `b:coqtail_started` is set, so I believe this should ensure that no other commands can run until `coqtail#after_startCB` completes. Since I expect it should be pretty rare in practice for someone to try to run commands before `CoqStart` completes, I think just ignoring them is reasonable. This should not affect commands that are called before `CoqStart`, those will still be queued to run by `coqtail#after_startCB`. Fixes #364.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After ac6e91f, in both vim (9.1) and neovim (0.11-dev), I get the following error when I run :CoqToLine while coqtail is initializing.
This can be consistently reproduced by running
:CoqToLine|CoqToLine
on a coq buffer that has not:CoqStart
ed yet.The text was updated successfully, but these errors were encountered: