Commit Graph

71 Commits

Author SHA1 Message Date
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
7a4f5a4a53 Minor var naming changes 2014-03-19 10:27:34 -07:00
unknown
404c167525 Removed communicate call. Moved log file handling to the server daemon 2014-03-02 00:14:14 -06:00
unknown
a4e28157c4 Added call to communicate() after terminating server 2014-02-26 22:23:29 -06:00
Strahinja Val Markovic
825b3055e5 Force ignoring of SIGINT for YCM client
This reduces fallout of pressing ctrl-c in Vim.
2014-01-29 10:18:07 -08:00
rxwen
62949c42ed flush the options_file before start the ycmd server
- There are cases on windows that the ycmd will read an empty options
  file. So, flush the options file before start the ycmd server
2014-01-14 22:05:03 +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
8090373afd Now can populate the loclist like Syntastic 2014-01-08 19:09:40 -08:00
Strahinja Val Markovic
cb359c0b6a New options for controlling the diag ui 2014-01-08 18:43:17 -08:00
Strahinja Val Markovic
209d22cfdb DiagnosticInterface now uses server diag objects 2014-01-06 15:24:06 -08:00
Strahinja Val Markovic
c9e9a640ac Echoing diag text on when cursor on diag line 2014-01-06 15:24:05 -08:00
Strahinja Val Markovic
6c01881e1a Replaced Syntastic support with YCM-native code
Currently, the only supported Syntastic features are the error signs in the
gutter. Other features will be added in the future.
2014-01-06 15:24:05 -08:00
Strahinja Val Markovic
7fac081bea Merge branch 'fix-omnisharp-launch' of https://github.com/nop00/YouCompleteMe into nop00-fix-omnisharp-launch 2013-12-24 18:47:45 -08:00
Strahinja Val Markovic
1edf22357f Try to cleanup files only if they stil exist
Fixes #738
2013-12-20 13:01:48 -08:00
nop
bc9a283be6 New wrapper function around subprocess.Popen
New wrapper function around subprocess.Popen that handles stdin
correctly when on Windows (see issue #637)
2013-12-11 13:41:04 +01:00
Daniel Hahler
3e5e34b633 Only notify about a server crash once
Fixes #715
2013-12-09 22:27:11 +01:00
Strahinja Val Markovic
cf6211055e Removing the server_idle_suicide_seconds option
This option existed so that the user can tweak it if they found the default idle
timeout too short, for instance if they leave their machine on over the weekend.

This use case is now covered by the new YcmdKeepalive system that pings ycmd
every 10 minutes as long as Vim is running. This prevents ycmd shutting down if
one leaves their Vim instance alone for a long time.

Thus the old option is useless now; ycmd now shuts down after 3 hours of
inactivity, which should only ever happen when its corresponding Vim instance
has shut down abnormally.
2013-11-20 12:33:57 -08:00
Strahinja Val Markovic
0226ba4c90 ycmd using Vim stdin on Windows
This resolves YCM crash problems. Fixes #637.
2013-11-07 14:53:15 -08:00
Strahinja Val Markovic
aa0ccdb925 Better client notice when ycmd crashes
Now we only show the last 30 lines of stderr instead of everything in it which
was not very useful. We also tell the user about :YcmRestartServer.
2013-11-04 11:15:03 -08:00
Strahinja Val Markovic
9ea0c39279 Forcing requests to ycmd to ignore local proxies
Fixes #641
2013-11-04 10:34:42 -08:00
Strahinja Val Markovic
6e782508b3 Now possible to sent Vim data to FlagsForFile func
Fixes #612.
2013-10-26 16:22:43 -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
ce96a47098 Printing server PID in YcmDebugInfo 2013-10-22 10:53:31 -07:00
Strahinja Val Markovic
6d9969fa9c Surfacing ycmd server PID to user scripts
To get the PID, call function youcompleteme#ServerPid().
2013-10-22 10:51:37 -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
5b37a2e36d Don't print traceback when no detailed diagnostic
We should only print the message.
2013-10-16 14:37:42 -07:00
Strahinja Val Markovic
18002e17df Better handling of crashed ycmd; restart command
Previously the YCM Vim client would go bonkers when ycmd crashed. Now the user
can continue using Vim just without YCM functionality.

Also added a :YcmRestartServer command to let the user restart ycmd if it
crashed. With a little luck, this will be rarely necessary.
2013-10-15 15:27:54 -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
016434e846 Deleting some dead code 2013-10-14 20:46:42 -07:00
Strahinja Val Markovic
98f549aeae More robust way of picking an unused local port
Fixes #584.
2013-10-14 20:38:45 -07:00
Strahinja Val Markovic
bc607724f0 Ensuring ident completion works always
A bug turned it off when omni completion was available.

Fixes #583.
2013-10-14 13:29:28 -07:00
Strahinja Val Markovic
3ae10395ea Preventing Vim thread block on file save
Syntastic would run SyntasticCheck on file save, which would unconditionally
call _latest_file_parse_request.Response() and thus block until the request
returned from the server. We don't want that, so we throw in an explicit check
for the request being ready.
2013-10-11 19:09:21 -07:00
Strahinja Val Markovic
db45e243dd Getting path to python exe on Windows correctly
Fixes #581.
2013-10-11 11:11:02 -07:00
Strahinja Val Markovic
98ef568359 Refactored the popen call for ycmd
Also removed shell = true in the other branch that calls popen
2013-10-09 19:28:27 -07:00
Strahinja Val Markovic
9482ad189e Using full path to Python in popen call
This is the root of the problem in issue #577.

Fixes #577.
2013-10-09 19:18:36 -07:00
Strahinja Val Markovic
a25ed01a7c Starting ycmd without shell = True
This should make it easier to shut down the server on some machines.

Fixes #577.
2013-10-09 17:00:28 -07:00
Strahinja Val Markovic
5000d2e4ae NativeFiletypeCompletionAvailable now a local call
It used to block on the server to get the data. Now it doesn't anymore. This
speeds up Vim startup.
2013-10-07 16:10:48 -07:00
Strahinja Val Markovic
c7be1f1b47 Omni completion works again 2013-10-07 15:47:48 -07:00
Strahinja Val Markovic
4b73739b09 Removing some obsolete todos 2013-10-07 14:21:46 -07:00
Strahinja Val Markovic
ff7fa74fc9 <c-space> works again (forces semantic completion) 2013-10-07 13:09:34 -07:00
Strahinja Val Markovic
a9d7105e1b YCM now working on new buffers with ft set
We used to demand a name be set for the buffer.

Fixes #568.
2013-10-07 11:03:30 -07:00
Strahinja Val Markovic
cb98dc8537 Fixing python 2.6 compatibility
string.format() requires the number inside '{}' for Python 2.6.
2013-10-07 11:03:30 -07:00
Strahinja Val Markovic
c43327d176 YcmShowDetailedDiagnostic works again 2013-10-07 11:03:29 -07:00
Strahinja Val Markovic
159a8ecdfa YcmDiags and ForceCompilation work 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
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
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