Commit Graph

238 Commits

Author SHA1 Message Date
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
d63843ea4c Clang completer method params are const ref again
They were temporarily all passed by-value until server-side threading issues
were resolved.
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
531e564a88 Removing Concurrent* & Future classes
They're not needed anymore.
2013-10-07 11:03:28 -07:00
Strahinja Val Markovic
46360219f8 Removed threads & async API in CompilationDatabase
This is not needed anymore; the server request merely blocks when waiting for
flags.
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
4a95c2fc7c GoTo commands for clang completer work again 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
1730660555 A (barely) working version of ycmd + client
Still a lot of work to do.
2013-10-07 11:03:26 -07:00
Strahinja Val Markovic
9698bf8789 Bump ycm_core.so API version 2013-10-07 11:03:26 -07:00
Strahinja Val Markovic
a7c609efd7 More python unicode object support in ycm_core 2013-10-07 11:03:26 -07:00
Strahinja Val Markovic
29bb90a6b4 Decoupling completers from Vim; still WIP & broken
Note to self: squash this commit before merging into master.
2013-10-07 11:03:25 -07:00
Val Markovic
ee12530df0 Merge pull request #548 from vitalyster/trans_unit
Fix 'vector subscription out of range' MSVC assertions
2013-09-09 10:35:36 -07:00
Vitaly Takmazov
aadf5dd2b7 Fix class casting 2013-09-07 22:56:24 +04:00
Strahinja Val Markovic
96e4930684 Only setting -isystem on Mac OS X 2013-09-07 10:50:28 -07:00
Vitaly Takmazov
79b3e97abe Fix 'vector subscription out of range' MSVC assertions 2013-09-07 15:14:13 +04:00
vitalyster
142f19c130 Fix MSVC compilation 2013-09-07 13:40:11 +04:00
Strahinja Val Markovic
d2fe03f072 Refactoring a big test into smaller tests 2013-08-30 14:46:33 -07:00
Strahinja Val Markovic
62462b48bc Ident collector handles escaped starting quotes
Previously, it would consider \"foo\"bar" as a slash and a "foo\"bar" string and
this would screw up tracking of quotes in the file.

Fix #535.
2013-08-30 14:38:23 -07:00
Strahinja Val Markovic
46fbff5008 Should compile on MinGW-64 now
Fixes #489.
2013-08-25 13:05:47 -07:00
Strahinja Val Markovic
938e2391e2 Fixing bizarre compilation error on recent clang 2013-08-16 14:49:00 -07:00
Strahinja Val Markovic
76aa87cb22 Ensuring TUs expire when compilation flags change. 2013-08-16 14:49:00 -07:00
Strahinja Val Markovic
0f7d9ec131 Some minor refactoring of TU store 2013-08-16 14:49:00 -07:00
Strahinja Val Markovic
a215f933a9 Refactoring out TU storage into own class
This makes the code more readable, maintainable and robust since we're now
encapsulating the mutex to filename_to_translation_unit_.
2013-08-16 14:49:00 -07:00
Strahinja Val Markovic
221bb65489 Renaming DEV_FLAGS to USE_DEV_FLAGS 2013-08-12 20:48:49 -07:00
Strahinja Val Markovic
ce136cd5b6 Dev flags are now off by default
"Dev" flags are -Werror, -Wextra, -Wall and -Wc++98-compat. People who are
compiling YCM as users and not developers (99.99999% of all YCM compilations)
don't care about those flags and were just burdened by their inclusion by
default.

Fixes #502.
2013-08-12 20:36:15 -07:00
Strahinja Val Markovic
16d1365d12 Better smart-case query-candidate matching
Previously, "Foo" would match "Foo" but not "FOO". Now it matches both. Bottom
line, an uppercase char matches only uppercase chars but lowercase chars can
match either. We used to insist that lowercase chars in the query match
lowercase chars in the candidate strings IF the query also had uppercase
letters; this was dumb and a poor user experience.

Fixes #501.
2013-08-12 19:49:43 -07:00
Cody P Schafer
0768fc607d Use debian6 package for 32bit llvm+clang, ubuntu one is actually 64bit
Fixes #474
2013-07-27 17:52:50 -07:00
Ricky Nelson
e6cb81a0b2 fixed build problem with threads on SmartOS 2013-07-08 13:56:51 +00:00
Strahinja Val Markovic
3d02f0aba3 Using correct platform clang libs for linux 2013-06-19 21:47:21 -07:00
Strahinja Val Markovic
cc179638b1 Use -j instead of -y on linux for tar 2013-06-19 21:20:01 -07:00
Strahinja Val Markovic
2061848c1a Using the new 3.3 clang binaries in CMakeLists.txt 2013-06-19 21:09:43 -07:00
Pavel Novy
438e3d6b3a Fixed compilation under MSVC(11)
- compile both libs with /UNICODE and /MP
- moved shared flags & defines to root CMakeLists.txt
- fixed resolving EXTERNAL_LIBCLANG_PATH on Windows
- postbuild copy of libclang.dll
- change PATH_TO_LLVM_ROOT & EXTERNAL_LIBCLANG_PATH to PATH variables instead of BOOL options (for cmake-gui)
2013-06-13 11:26:25 +02:00
Strahinja Val Markovic
b5ffac655b code style fixes 2013-05-29 22:23:19 -07:00
Strahinja Val Markovic
612ab6e43a Fixing possible issue with remove() on StringVec
There is not remove() on StringVec so we need to make sure we are always
handling a list.

Fixes #347.
2013-05-29 19:05:38 -07:00
Strahinja Val Markovic
454a961318 The identifier completer now reads tags files
See the docs for details. Fixes #135.
2013-05-26 13:33:40 -07:00
Strahinja Val Markovic
747c2a8b6d Xcode needs special testdata folder handling 2013-05-26 11:59:27 -07:00
Strahinja Val Markovic
34b997c4d6 Not adding -Werror and friends for Xcode 2013-05-26 11:58:20 -07:00
svermeulen
273a51059b Added missing include to build on win32 2013-05-26 14:01:15 -03:00
Strahinja Val Markovic
2805b0fe85 Better thread safety in IdentifierCompleter
Everything that needs access to filetype_map_ has been split into a new class
called IdentifierDatabase. This class is thread-safe. Previously, multiple
threads could access filetype_map_ at the same time, some reading things from
it, others writing to it. WTF was I doing? My best guess is that I introduced
this vile stupidity when I added the second thread to IdentifierCompleter;
previously it was impossible for multiple threads to stomp on filetype_map_
because only one thread ever accessed it. I changed that some time ago and
forgot to protect filetype_map_.

Idiot.
2013-05-25 11:43:14 -07:00
Strahinja Val Markovic
0649d11bf4 Some docs for CandidateRepository 2013-05-25 11:02:53 -07:00
Strahinja Val Markovic
45cbc7da7f Calling PrepareClangFlags is not needed anymore
ycm_extra_conf.py files used to import clang_helpers and then use the
PrepareClangFlags function; this is now unnecessary since the logic from that
function has been moved to flags.py. The old PrepareClangFlags function is still
there (it just returns the flags it gets) for the sake of backwards
compatibility with old ycm_extra_conf.py files.
2013-05-19 10:48:23 -07:00
Stanislav Golovanov
837a1ab889 Fix FilterAndSortCandidates behavior
FilterAndSortCandidates(completions, 'word', '') should
return a dict, not a list.
2013-05-09 21:33:10 +04:00
Strahinja Val Markovic
7f676f85ae Code style fixes 2013-05-05 09:47:56 -07:00
Stanislav Golovanov
6b018db10f fix compiling with clang on Windows
This fixes a Visual Studio problem when it cant correctly select
bind and make_shared boost methods due to Argument-dependent name lookup.

Relevant to #19
2013-04-29 21:41:49 +04:00
Strahinja Val Markovic
387102a99f Fix ranking bug with ALL_CAPS variables
GetWordBoundaryChars would return "allcaps" for "ALL_CAPS" instead of "ac". This
would manifest as ranking (for instance) "STDIN_FILENO" ahead of "stdin" for
query "std", which is terrible.

This bug has been present in YCM for many months, but no one noticed the issue.

Fixes #272.
2013-04-28 13:21:13 -07:00
Strahinja Val Markovic
a80739ad6f Not adding -Wc++98-compat on FreeBSD
Fixes #260
2013-04-27 11:07:53 -07:00
Strahinja Val Markovic
67e4495273 Stopgap for unicode chars in filename strings
Such filenames still can't be matched against, but at least we won't throw an
exception when it happens.

Fixes #279, relevant to #278
2013-04-27 10:54:28 -07:00
Strahinja Val Markovic
cb7ee5e3c1 ycm_extra_conf.py file now in the public domain
It was never supposed to be licensed under the GPL since it's effectively
example code (that's also used for YCM compilation flags, but still).

No one has ever edited this file except me, Strahinja Val Markovic, and thus I
can release it into the public domain.
2013-04-26 15:25:19 -07:00
Strahinja Val Markovic
c3b7e55762 FilterAndSortCandidates returns all on empty query
Previously it returned an empty list. It makes mores sense to return the input
list of candidates because conceptually everything matches an empty query.
2013-04-20 13:27:55 -07:00