YouCompleteMe/python/ycm
zzbot 0d495578b5
Auto merge of #2863 - puremourning:java-async-diagnostics, r=micbou
[READY] Java support with asynchronous diagnostics and messages

# PR Prelude

Thank you for working on YCM! :)

**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**

- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [x] I have included tests for the changes in my PR. If not, I have included a
  rationale for why I haven't.
- [x] **I understand my PR may be closed if it becomes obvious I didn't
  actually perform all of these steps.**

# Why this change is necessary and useful

This change is required for a better user experience when using native
java support

This implements an asynchronous message system using a long-poll request
to the server.

The server provides an endpoint /receive_messages which blocks until
either a timeout occurs or we receive a batch of asynchronous messages.
We send this request asynchronously and poll it 4 times a second to see
if we have received any messages.

The messages may either be simply for display (such as startup progress)
or diagnostics, which override the diagnostics returned by
OnFileReqdyToParse.

In the former case, we simply display the message, accepting that this
might be overwritten by any other message (indeed, requiring this), and
for the latter we fan out diagnostics to any open buffer for the file in
question.

Unfortunately, Vim has bugs related to timers when there is something
displayed (such as a "confirm" prompt or other), so we suspend
background timers when doing subcommands to avoid vim bugs. NOTE: This
requires a new version of Vim (detected by the presence of the
particular functions used).

NOT_READY because:

- the submodule commit points at my repo and requires https://github.com/Valloric/ycmd/pull/857 to be merged
- my spider sense suggest i have more testing to do...

Notes:

- Part 3 (I think) of the Java support PRs. This one actually adds the minimal changes for working java support
- There are about 2 or 3 other PRs to come to add things like automatic module imports, etc.

[Please explain **in detail** why the changes in this PR are needed.]

[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2863)
<!-- Reviewable:end -->
2018-02-10 12:37:57 -08:00
..
client Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00
tests Auto merge of #2863 - puremourning:java-async-diagnostics, r=micbou 2018-02-10 12:37:57 -08:00
__init__.py Fixing python tests broken in rename 2013-05-19 20:06:14 -07:00
base.py Rewrite completion system 2017-06-21 02:32:57 +02:00
buffer.py Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00
diagnostic_filter.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
diagnostic_interface.py Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00
omni_completer.py Add omnifunc tests 2017-07-07 22:45:05 +02:00
paths.py Drop Python 2.6 and Python 3.3 2018-01-30 18:34:50 +01:00
setup.py Add error messages when ycmd crashed 2016-05-02 23:08:32 +02:00
syntax_parse.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
unsafe_thread_pool_executor.py Update flake8 config 2016-03-06 17:39:55 +00:00
vimsupport.py Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00
youcompleteme.py Auto merge of #2863 - puremourning:java-async-diagnostics, r=micbou 2018-02-10 12:37:57 -08:00