YouCompleteMe/python/ycm/tests
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
testdata Tests for checking that extra_conf_data sended to server from :DebugInfo and :YcmCompleter commands. 2017-03-12 19:03:07 +03:00
__init__.py Echo diagnostic asynchronously 2017-10-04 16:59:47 +02:00
base_test.py Use codepoint offsets in identifier functions 2017-06-18 20:41:30 +02:00
command_test.py Avoid traceback when computing extra conf data 2018-02-10 15:27:27 +01:00
completion_test.py Rewrite completion system 2017-06-21 02:32:57 +02:00
diagnostic_filter_test.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
event_notification_test.py Optimize request building 2018-01-09 01:40:07 +01:00
mock_utils.py Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00
omni_completer_test.py Use fake filetype for omni completion test 2017-12-23 15:41:14 +00:00
paths_test.py Drop Python 2.6 and Python 3.3 2018-01-30 18:34:50 +01:00
postcomplete_test.py Clean C# inserting namespace code 2017-05-17 19:44:02 +02:00
syntax_parse_test.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
test_utils.py Avoid traceback when computing extra conf data 2018-02-10 15:27:27 +01:00
vimsupport_test.py Auto merge of #2863 - puremourning:java-async-diagnostics, r=micbou 2018-02-10 12:37:57 -08:00
youcompleteme_test.py Add support for Java diagnostics and asynchronous messages 2018-02-10 16:29:27 +00:00