Commit Graph

41 Commits

Author SHA1 Message Date
Strahinja Val Markovic
b56858d2b0 Error handler now also sets HMAC header. 2014-04-25 12:03:39 -07:00
Strahinja Val Markovic
e965e02847 Client/server communication now uses HMAC for auth
This is to prevent a convoluted exploit that can trigger remote code execution.
2014-04-25 11:07:08 -07:00
Strahinja Val Markovic
479ad62555 Prevent setsid() failure from taking down ycmd 2014-04-10 13:02:49 -07:00
Marc Burns
6df96fcccf Use OnWindows from utils instead of ad-hoc platform check. 2014-04-01 20:29:20 -04:00
Marc Burns
8f116b849a Detach from controlling terminal to avoid receiving SIGINT. 2014-04-01 04:18:22 -04:00
unknown
b4728f3f93 fixed some comments and opened the logfiles in ascii rather than binary mode 2014-03-04 22:59:34 -06:00
unknown
875d6cf282 fix Travis-CI failures 2014-03-03 20:18:44 -06:00
unknown
404c167525 Removed communicate call. Moved log file handling to the server daemon 2014-03-02 00:14:14 -06:00
Strahinja Val Markovic
18be5c254a Increasing worker thread count to 30
If it takes a while to compile the user's C++ file, the YCM client/server may
run out of threads. Vim gets laggy then.

This is a stopgap measure until I think of something better.
2014-02-07 12:46:45 -08:00
Strahinja Val Markovic
b1bba2e201 Changing copyright headers from me to Google
When I initially released this project, I released it under my own copyright. I
have since then worked on it in my 20% time at Google (and want to continue
doing this) and my life becomes much simpler if the copyright is Google's.

From the perspective of how this project is run and managed, **NOTHING**
changes. YCM is not a Google product, merely a project run by someone who just
happens to work for Google.

Please note that the license of the project is **NOT** changing.

People sending in future pull requests will have to sign the Google
[CLA](https://developers.google.com/open-source/cla/individual) (you can sign
online at the bottom of that page) before those pull requests could be merged
in. People who sent in pull requests that were merged in the past will get an
email from me asking them to sign the CLA as well.
2014-01-13 11:08:43 -08:00
Strahinja Val Markovic
17d149e899 ycmd loads default options when none provided 2013-10-25 13:26:33 -07:00
Strahinja Val Markovic
2b8ee37bf5 ycmd uses a random free port when running vim-free
Previously the default was 6666, which was temporary.
2013-10-25 13:11:13 -07:00
Strahinja Val Markovic
4af2ba0faa Option "shutdown_secs" is now "suicide_secs"
Calling the option server_idle_suicide_seconds should be easier to understand.
2013-10-23 12:33:27 -07:00
Strahinja Val Markovic
262d8aad03 New ycmd watchdog kills server when idle too long
Defaults are kill server after 12 hours of inactivity; the reason why it's 12
hours and not less is because we don't want to kill the server when the user
just left his machine (and Vim) on during the night.
2013-10-23 12:21:33 -07:00
Strahinja Val Markovic
f6ca040cf7 Nth attempt at correct shutdown procedure.
If we install an explicit signal handler for SIGTERM and SIGINT and then call
sys.exit ourselves, atexit handlers are run. If we don't call sys.exit from the
handler, ycmd never shuts down. So fixed... I think. We'll see.

Fixes #577... again.
2013-10-17 22:15:17 -07:00
Strahinja Val Markovic
a5fb6b7509 Removing unsupported signal() calls on Windows
SIGQUIT and SIGHUP are not supported.

For details, see Python docs: http://docs.python.org/2/library/signal.html#signal.signal
2013-10-17 20:16:44 -07:00
Strahinja Val Markovic
6e9a16e90e Signal handler must take 2 params
Otherwise we get a TypeError
2013-10-17 20:14:56 -07:00
Strahinja Val Markovic
5070835d01 Ensuring server cleanup on OS signals
atexit won't run registered functions for SIGTERM which we send to the server.
This prevents clean shutdown.

Also making sure that the server logfiles are deleted as well.
2013-10-17 12:21:59 -07:00
Strahinja Val Markovic
436017bd4d Now using new ycm_client_support shared lib
This means we can now load just ycm_client_support (which is a much smaller
library) into Vim and ycm_core into ycmd. Since ycm_client_support never depends
on libclang.so, we never have to load that into Vim which makes things much,
much easier.
2013-10-15 14:15:04 -07:00
Strahinja Val Markovic
b903867cdd ycm_core now imported after extra conf preload 2013-10-14 15:29:00 -07:00
Strahinja Val Markovic
a04ae37ead Client & server threads increased from 4 to 10 2013-10-11 20:12:04 -07:00
Strahinja Val Markovic
3d55748400 Correctly handling ycm_extra_conf files now
The user is asked about loading unknown extra conf files, as they were before.
2013-10-08 16:21:43 -07:00
Strahinja Val Markovic
f0650ddc7f Minor style fixes 2013-10-07 16:53:41 -07:00
Strahinja Val Markovic
ebb1627f2e Resolving a minor TODO
/filetype_completion_available handler renamed to /semantic_completion_available
2013-10-07 16:28:40 -07:00
Strahinja Val Markovic
915d092364 Prefixing clang version with "Clang version"
It's easier to know what that magic string is actually referring to.
2013-10-07 11:03:30 -07:00
Strahinja Val Markovic
88a260d448 ycmd now uses Waitress instead of CherryPy 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
c43327d176 YcmShowDetailedDiagnostic works again 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
c274b7d4f8 Fixing the diagnostic-related race conditions
Now, every FileReadyToParse event returns diagnostics, if any. This is instead
of the previous system where the diagnostics were being fetched in a different
request (this caused race conditions).
2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
b9bb788a2a Diagnostics work again... somewhat.
There appear to be timing issues for the diag requests. Somehow, we're sending
out-of-date diagnostics and then not updating the UI when things change.

That needs to be fixed.
2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
9742302cbd 'get_completions' handler is now 'completions' 2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
9d0a6c96d7 Event and completion request are now async
This results in a much snappier Vim.
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
6c53bad58f No more threading in completers!
The server is multi-threaded and will spawn a new thread for each new request.
Thus, the completers need not manage their own threads or even provide async
APIs; we _want_ them to block because now were implementing the request-response
networking API.

The client gets the async API through the network (i.e., it can do something
else while the request is pending).
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
e38d145a47 Added debug info about the server
Location where running + logfiles location
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
3ca758a581 Getting debug info works again 2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
1027de73fb Using a constant for server error instead of 500 2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
446d02f66e Subcommand name completion works again 2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
fe0c0a1607 GoTo commands work again 2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
13b86563f0 Minor code formatting changes 2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
5b4b3ed281 LOGGER now set to None by default
Init happens in test setup func or Main
2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
4c6a69b432 The UltiSnips completer works again 2013-10-07 11:03:27 -07:00
Strahinja Val Markovic
4ac5466d80 Renaming server.py to ycmd.py 2013-10-07 11:03:27 -07:00