<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/event, branch mix</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>refactor: replace char_u with char</title>
<updated>2022-08-31T11:47:18+00:00</updated>
<author>
<name>Dundar Göc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-08-26T21:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=fb1edb2f5728d74ae811c6ab32395598cea5609b'/>
<id>fb1edb2f5728d74ae811c6ab32395598cea5609b</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/459
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/459
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(jobs): deadlock in channel.c:exit_event #19082</title>
<updated>2022-07-02T16:14:08+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2022-07-02T16:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e11f3655fb3bbedc29e496db26a25e6c83d25baf'/>
<id>e11f3655fb3bbedc29e496db26a25e6c83d25baf</id>
<content type='text'>
In the rare case that exit_event is called from process_close_handles,
it stalls waiting for the process to exit (the routine is currently
underway to do just that). This causes `job_spec.lua` to sometimes
stall.

REJECTED IDEAS:
==============================================================
1. Currently `exit_event` is placed on `main_loop.fast_events`. Would the problem
   be solved by using `main_loop.events` instead?
    - A: Maybe, but it will cause other problems, such as queuing exit_event()
      during "Press Enter..." prompt which may result in the event not being
      processed, leading to another stall.
2. Can we avoid the timer?
    - A: Using a timer is just the easiest way to queue a delayed event without
      causing an infinite loop in the queue currently being processed.
3. Can we avoid the new `exit_need_delay` global...
    1. by using `process_is_tearing_down` instead?
        - A: Can't use `process_is_tearing_down` because its semantics are different.
    2. by checking a similar condition as `process_teardown`? https://github.com/neovim/neovim/blob/f50135a32e11c535e1dc3a8e9460c5b4e640ee86/src/nvim/event/process.c#L141-L142
       ```
       if (!process_is_tearing_down || (kl_empty(main_loop.children) &amp;&amp; multiqueue_empty(main_loop.events))) {
         uv_timer_start(&amp;main_loop.exit_delay_timer, exit_delay_cb, 0, 0);
         return;
       }
       ```
        - A: Tried but it did not work (other stalls occurred). Maybe
          exit_event() is called from a source other than
          process_close_handles() and is delayed, the delayed exit_event() will
          be executed before main_loop.events is processed, resulting in an
          infinite loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the rare case that exit_event is called from process_close_handles,
it stalls waiting for the process to exit (the routine is currently
underway to do just that). This causes `job_spec.lua` to sometimes
stall.

REJECTED IDEAS:
==============================================================
1. Currently `exit_event` is placed on `main_loop.fast_events`. Would the problem
   be solved by using `main_loop.events` instead?
    - A: Maybe, but it will cause other problems, such as queuing exit_event()
      during "Press Enter..." prompt which may result in the event not being
      processed, leading to another stall.
2. Can we avoid the timer?
    - A: Using a timer is just the easiest way to queue a delayed event without
      causing an infinite loop in the queue currently being processed.
3. Can we avoid the new `exit_need_delay` global...
    1. by using `process_is_tearing_down` instead?
        - A: Can't use `process_is_tearing_down` because its semantics are different.
    2. by checking a similar condition as `process_teardown`? https://github.com/neovim/neovim/blob/f50135a32e11c535e1dc3a8e9460c5b4e640ee86/src/nvim/event/process.c#L141-L142
       ```
       if (!process_is_tearing_down || (kl_empty(main_loop.children) &amp;&amp; multiqueue_empty(main_loop.events))) {
         uv_timer_start(&amp;main_loop.exit_delay_timer, exit_delay_cb, 0, 0);
         return;
       }
       ```
        - A: Tried but it did not work (other stalls occurred). Maybe
          exit_event() is called from a source other than
          process_close_handles() and is delayed, the delayed exit_event() will
          be executed before main_loop.events is processed, resulting in an
          infinite loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: replace char_u #18429</title>
<updated>2022-06-28T09:31:54+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-06-28T09:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=014a88799a1d175ad121c520c9cc5bd0bb2d8813'/>
<id>014a88799a1d175ad121c520c9cc5bd0bb2d8813</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/459</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/459</pre>
</div>
</content>
</entry>
<entry>
<title>feat(logging): include test-id in log messages</title>
<updated>2022-06-16T02:23:10+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2022-05-24T04:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=8f065205946844d87f00d6c55517521e3809f821'/>
<id>8f065205946844d87f00d6c55517521e3809f821</id>
<content type='text'>
Problem:
1. Log messages (especially in CI) are hard to correlate with tests.
2. Since b353a5c05f02 #11886, dumplog() prints the logs next to test
   failures. This is noisy and gets in the way of the test results.

Solution:
1. Associate an incrementing id with each test and include it in log
   messages.
    - FUTURE: add v:name so Nvim instances can be formally "named"?
2. Mention "child" in log messages if the current Nvim is a child (based
   on the presence of $NVIM).

BEFORE:

    DBG … 12345      UI: event
    DBG … 12345      log_server_msg:722: RPC -&gt;ch 1: …
    DBG … 12345      UI: flush
    DBG … 12345      inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … 23454      UI: stop
    INF … 23454      os_exit:594: Nvim exit: 0

AFTER:

    DBG … T57        UI: event
    DBG … T57        log_server_msg:722: RPC -&gt;ch 1: …
    DBG … T57        UI: flush
    DBG … T57        inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … T57/child  UI: stop
    INF … T57/child  os_exit:594: Nvim exit: 0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
1. Log messages (especially in CI) are hard to correlate with tests.
2. Since b353a5c05f02 #11886, dumplog() prints the logs next to test
   failures. This is noisy and gets in the way of the test results.

Solution:
1. Associate an incrementing id with each test and include it in log
   messages.
    - FUTURE: add v:name so Nvim instances can be formally "named"?
2. Mention "child" in log messages if the current Nvim is a child (based
   on the presence of $NVIM).

BEFORE:

    DBG … 12345      UI: event
    DBG … 12345      log_server_msg:722: RPC -&gt;ch 1: …
    DBG … 12345      UI: flush
    DBG … 12345      inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … 23454      UI: stop
    INF … 23454      os_exit:594: Nvim exit: 0

AFTER:

    DBG … T57        UI: event
    DBG … T57        log_server_msg:722: RPC -&gt;ch 1: …
    DBG … T57        UI: flush
    DBG … T57        inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … T57/child  UI: stop
    INF … T57/child  os_exit:594: Nvim exit: 0
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)</title>
<updated>2022-05-25T18:31:14+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-05-25T18:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e'/>
<id>9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(PVS/V547): "expression is always false"</title>
<updated>2022-05-17T20:26:25+00:00</updated>
<author>
<name>Dundar Goc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-05-17T11:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=65f585ce9b68b7d16e8efd70c3c05d453359c1e0'/>
<id>65f585ce9b68b7d16e8efd70c3c05d453359c1e0</id>
<content type='text'>
Suppress warning in loop.c, the expression can be true if EXITFREE isn't
defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suppress warning in loop.c, the expression can be true if EXITFREE isn't
defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: replace char_u variables and functions with char</title>
<updated>2022-05-11T21:19:57+00:00</updated>
<author>
<name>Dundar Goc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-05-08T12:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=85aae12a6dea48621ea2d24a946b3e7b86f9014d'/>
<id>85aae12a6dea48621ea2d24a946b3e7b86f9014d</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/459
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/459
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(uncrustify): change rules to better align with the style guide</title>
<updated>2022-04-29T12:13:06+00:00</updated>
<author>
<name>Dundar Goc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-04-29T11:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=eef8de4df0247157e57f306062b1b86e01a41454'/>
<id>eef8de4df0247157e57f306062b1b86e01a41454</id>
<content type='text'>
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: convert macros to all-caps (#17895)</title>
<updated>2022-04-25T02:18:43+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-04-25T02:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=0648100fed65cbe8efe774ae997ab841cae01872'/>
<id>0648100fed65cbe8efe774ae997ab841cae01872</id>
<content type='text'>
Closes https://github.com/neovim/neovim/issues/6297</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/neovim/neovim/issues/6297</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: convert function comments to doxygen format (#17710)</title>
<updated>2022-03-24T11:17:21+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-03-24T11:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=534f5a419d2ef1c2ad78204a4de48388cc2d7fa2'/>
<id>534f5a419d2ef1c2ad78204a4de48388cc2d7fa2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
