Jacob Dufault
274c98f032
Fix import pipeline stall due to blocking Deqeue call.
2017-08-15 20:29:49 -07:00
Jacob Dufault
81594a1497
Fix LoadCachedIndex crash if deserialization failed.
2017-08-15 20:29:09 -07:00
Jacob Dufault
7faedfdf00
Do not import empty dependencies
2017-08-15 20:28:52 -07:00
Jacob Dufault
3ab4d0455d
Fix delta update.
...
Previous file was being loaded after the current file is written to disk.
2017-08-15 00:46:21 -07:00
Jacob Dufault
59851c06e0
More import pipeline simplifications.
...
Move already-import dependency checking to a separate stage.
2017-08-15 00:22:13 -07:00
Jacob Dufault
5a451d3ad1
Remove some additional overhead created for out of process
2017-08-14 22:53:44 -07:00
Jacob Dufault
db9a97d586
Remove out of process indexer support.
...
malloc_trim does a good enough job that we don't need it anymore.
2017-08-14 19:07:46 -07:00
Jacob Dufault
ee003a2cf0
Log when we are doing delta updates
2017-08-05 15:44:44 -07:00
Jacob Dufault
5b69c5bfc5
Small cleanup
2017-08-01 20:40:30 -07:00
Jacob Dufault
cac5dcaf8f
Simplify queue management
2017-08-01 20:23:37 -07:00
Jacob Dufault
c89f651cd8
More iteration on task system
2017-08-01 20:23:06 -07:00
Jacob Dufault
b9061ccc07
WIP task system
2017-08-01 01:24:06 -07:00
Jacob Dufault
50a726f59e
Simplify Index_OnIdMapped
2017-07-30 11:49:24 -07:00
Jacob Dufault
1f3f69b221
Reuse loaded file contents in indexer; clear large state before caching.
2017-07-30 11:31:41 -07:00
Jacob Dufault
85f3c00376
Some more small cleanup
2017-07-30 00:16:08 -07:00
Jacob Dufault
6d9e4242d1
Use shared_ptr, try to fix a crash.
2017-07-29 23:51:32 -07:00
Jacob Dufault
e771f05f3f
Linux build fixes
2017-07-29 21:46:21 -07:00
Jacob Dufault
ee20d79dcc
wip
2017-07-29 21:24:02 -07:00
Jacob Dufault
c83b9eab77
Fix issue when buffer contents do not get synced properly near start of file
2017-07-29 21:13:22 -07:00
Jacob Dufault
2a1ce80b4d
Change perf logs to use LOG_S
2017-07-29 17:45:00 -07:00
Jacob Dufault
6518f8b79a
Add tiny-process-library
2017-07-29 17:44:32 -07:00
Jacob Dufault
a9bac06b83
Add MoveFileTo
2017-07-28 17:08:18 -07:00
Jacob Dufault
ea5508a699
Perf can now be serialized
2017-07-28 17:08:04 -07:00
Jacob Dufault
cf8b95809f
Hide error messages when scanning a directory and file open fails
2017-07-28 17:07:50 -07:00
Jacob Dufault
7b052d887d
Add DequeuePlusAction
2017-07-28 17:07:27 -07:00
Jacob Dufault
c37396a36d
First pass at logging using loguru
2017-07-27 19:14:46 -07:00
Jacob Dufault
1e995dc30e
Cleanup call tree appearance
...
- Use up/down icons instead of [B] and [D]
- Don't show column number
- Show declaring type instead of path if applicable
2017-07-20 23:16:27 -07:00
Jacob Dufault
475afc77a5
Support functions in type hierarchy.
2017-07-20 19:53:08 -07:00
Jacob Dufault
a046f89650
Do not show base calls in tree view that come from derived function.
2017-07-20 19:42:56 -07:00
Jacob Dufault
64580decab
Push cursor position to end when updating delayed diagnostics
2017-07-19 00:20:19 -07:00
Jacob Dufault
08fb60a675
Show call tree expand button if function has base or derived callers.
2017-07-19 00:17:38 -07:00
Jacob Dufault
79ec5a749a
Improve tree view
...
- Show base/derived callers ([B] and [D] prefix)
- Show call position information
- Temporarily prevent duplicate calls from appearing, needs a proper fix.
2017-07-19 00:12:29 -07:00
Jacob Dufault
f4db0967b2
Show based/derived callers in callers keyboard shortcut.
2017-07-19 00:12:29 -07:00
Jacob Dufault
57e5fe1814
Fix crash
2017-07-17 13:03:42 -07:00
Jacob Dufault
ba973ba1bf
Remove unused variables
2017-07-17 10:41:59 -07:00
Jacob Dufault
22bb89fca1
Add options to turn off diagnostics.
...
diagnostics.onParse: semi-real time diagnostics that reported when a file is indexed or prepared for code completion
diagnostics.onCodeComplete: real time diagnostics that are reported as you type
2017-07-15 17:25:52 -07:00
Jacob Dufault
152e98363f
Refresh diagnostics 5 seconds after the last code completion.
2017-07-15 17:08:07 -07:00
Jacob Dufault
00e452272f
Do not use clang_Location_isInSystemHeader for diagnostics; causes crashes
2017-07-12 15:02:48 -07:00
Jacob Dufault
aae126f899
Disable diagnostics during code completion (causes crashes)
2017-07-12 11:34:05 -07:00
Jacob Dufault
dde1c687ec
Build diagnostics during code completion
2017-07-12 11:26:08 -07:00
Jacob Dufault
d1cbc32c81
Hopefully fix completion crashes.
...
It was caused due to a multithreading race. A vector was assigned to twice at the same time, which caused a crash in the destructor.
2017-06-29 23:51:22 -07:00
Jacob Dufault
b683c863e3
Add enable_shared_from_this to CompletionSession
2017-06-29 23:19:16 -07:00
Jacob Dufault
808e0f5277
Fix clang build
2017-06-29 10:30:22 -07:00
Jacob Dufault
f498f0ccb1
Fix showing duplicate completion entries, always provide insertText.
2017-06-28 23:59:38 -07:00
Jacob Dufault
b4000fa956
Don't show code lens on include/header guards.
2017-06-28 23:34:04 -07:00
Jacob Dufault
6ab8a27313
Mark macros in index.
2017-06-28 23:28:29 -07:00
Jacob Dufault
b5305e14f2
Add |is_macro| state to IndexVar.
...
This does not handle setting |is_macro|, this CL is about updating the
tests.
2017-06-28 23:25:29 -07:00
Jacob Dufault
85ec4b9843
Use shared_ptr in command_line for completion data.
...
Also add thread exit logs so to check if the stack has gone away.
2017-06-28 21:59:16 -07:00
Jacob Dufault
3228619414
Small fixes to auto-include and auto-implement fixits.
2017-06-28 21:40:30 -07:00
Jacob Dufault
25d450cf8b
Always include literal completions
2017-06-28 21:33:52 -07:00
Jacob Dufault
706479aded
Completion changes (maybe fix some crashes)
2017-06-28 19:50:30 -07:00
James Cook
0876886c60
Fix build error on Linux for INT_MIN ( #10 )
...
* Fix compiler warnings and turn on warnings as errors
* Fix build error on Linux for INT_MIN
2017-06-20 08:17:23 -07:00
Jacob Dufault
8dd751a70f
Fix completion for items with underscores.
2017-06-19 23:31:34 -07:00
Jacob Dufault
36ee8bec47
Consider filename ending when guessing arguments.
...
This should improve guessing for, ie, test files, like foo_test.cc.
2017-06-19 19:09:15 -07:00
Jacob Dufault
a005cc627d
Generate diagnostics when indexing a file, even if non-interactive.
2017-06-19 18:52:25 -07:00
Jacob Dufault
ced7c878b7
Don't show unique file id warning if there is no file name
2017-06-19 18:51:56 -07:00
Jacob Dufault
491e7b4625
Prefer literal string matches in global symbol search
2017-06-19 18:32:19 -07:00
James Cook
5b4986f04b
Fix compiler warnings and turn on warnings as errors
2017-06-19 18:30:44 -07:00
Jacob Dufault
61f023fec8
clang build fix
2017-06-16 10:14:09 -07:00
Jacob Dufault
11af3986ba
Better symbol resolution (ie, goto definition) for macro arguments.
2017-06-15 23:43:02 -07:00
Jacob Dufault
f8f4c06c20
Better error message when getting a unique file id fails.
2017-06-15 23:07:03 -07:00
Jacob Dufault
b04ce0c503
Auto-index file on open
2017-06-15 22:56:07 -07:00
Jacob Dufault
bb46b38b1c
Make global symbol search a bit more fuzzy
2017-06-15 19:30:00 -07:00
Jacob Dufault
9d1369786f
Pre-filter completion results before sending to vscode.
...
This results in a less laggy completion experience. Before, vscode would
drop frames if handed too many completions (ie, by typing #include in a
very large project).
2017-06-15 19:28:49 -07:00
Jacob Dufault
1ade2e5ca1
Show more variables in global symbol search
2017-06-15 19:28:07 -07:00
Jacob Dufault
99db0a1596
Add some additional code completion logging.
2017-06-14 22:47:41 -07:00
Jacob Dufault
7a71447273
Move some code out of command_line.cc
2017-06-14 22:47:41 -07:00
Jacob Dufault
7328d138e3
Fix linker error on clang (issue #2 )
2017-06-14 20:12:52 -07:00
Jacob Dufault
053aa549f0
Bump extension version.
2017-06-14 00:13:26 -07:00
Jacob Dufault
14009293ba
Fix IPC message e2e hiding
2017-06-13 23:59:40 -07:00
Jacob Dufault
3d0b8fd807
Fix call tree when function ref does not refer to a function.
2017-06-13 23:50:30 -07:00
Jacob Dufault
4bddc95908
Fix possible race when setting diagnostics.
2017-06-13 23:29:41 -07:00
Jacob Dufault
84b7ec930b
Log completion session creation/destruction. Ensure $0 is at end of insert text for final tab stop.
2017-06-13 23:15:18 -07:00
Jacob Dufault
584f7b45b9
Uniqueify include string proposals
2017-06-13 23:09:25 -07:00
Jacob Dufault
511f6c5248
Fix crash when loading old cache when file format changed.
...
Also eliminate an unnecessary copy after finishing deserialization.
2017-06-13 21:00:51 -07:00
Jacob Dufault
8fece6c252
Remove some extra logging
2017-06-13 20:41:30 -07:00
Jacob Dufault
0e5312790e
Add more detailed logging for failed unique file id
2017-06-13 20:08:31 -07:00
Jacob Dufault
64253ec174
Use shared_ptr in a couple more spots.
2017-06-09 21:15:33 -07:00
Jacob Dufault
dec484ed0d
Only report diagnostics from code completion document parse.
...
Also use shared_ptr, hopefully fix memory crashes.
2017-06-09 21:13:16 -07:00
Jacob Dufault
c262e1674d
Misc fixes
2017-06-09 18:02:48 -07:00
Jacob Dufault
f0fb8db3e5
Update clang args again
2017-06-09 00:14:36 -07:00
Jacob Dufault
db60b72e3b
Update clang_arg on windows
2017-06-09 00:08:14 -07:00
Jacob Dufault
767b4ac0e1
Small code cleanup
2017-06-09 00:08:06 -07:00
Jacob Dufault
1fc2d2756e
Don't show output when there is an error. Force extension update.
2017-06-08 23:26:04 -07:00
Jacob Dufault
3358e6afd3
Update settings.json paths
2017-06-08 23:22:00 -07:00
Jacob Dufault
41d8cd9a0c
Fix memory leaks
2017-06-08 23:22:00 -07:00
Jacob Dufault
598b53efff
Show diagnostics for tests, update absolute paths
2017-06-08 23:22:00 -07:00
Jacob Dufault
8c50324576
Small fixes for osx
2017-05-30 17:54:19 -07:00
Jacob Dufault
c40df5c0e5
Provide code action to auto-include an undefined symbol.
2017-05-29 16:57:19 -07:00
Jacob Dufault
80e78831d4
Small formatting change in clang_utils
2017-05-29 16:34:11 -07:00
Jacob Dufault
f5efa02448
Clear diagnostics for open files.
2017-05-29 16:33:57 -07:00
Jacob Dufault
7b790e7da3
Fix file name typo
2017-05-29 14:21:08 -07:00
Jacob Dufault
d834d4db08
Provide code action to auto-implement methods (useful for classes or function declarations).
2017-05-29 14:18:35 -07:00
Jacob Dufault
1d67d1ee37
Add additional metadata to function declarations.
2017-05-27 18:53:22 -07:00
Jacob Dufault
3469850c98
Change how function declarations are serialized so parameter info can be added.
2017-05-27 14:09:20 -07:00
Jacob Dufault
b7f7987cb8
Use cached location
2017-05-27 13:10:06 -07:00
Jacob Dufault
5415f4be50
Don't count the '~' in type usages for destructors.
2017-05-27 13:02:49 -07:00
Jacob Dufault
dcc71f2470
More cleanup in indexer
2017-05-27 12:56:39 -07:00
Jacob Dufault
e431dbd793
Some renames in indexer. Fix warning for namespace alias.
2017-05-27 12:33:18 -07:00
Jacob Dufault
e9025104cb
Rename some variables in the indexer.
2017-05-27 10:03:49 -07:00
Jacob Dufault
b66f015a4a
Some small cleanup when indexing function declaration/definition.
2017-05-27 09:57:52 -07:00
Jacob Dufault
968b6c0966
Remove HasInterestingState().
...
These don't serve any real purpose since the multi-file indexer tests.
2017-05-27 00:47:03 -07:00
Jacob Dufault
79a4d8ad79
Proper error reporting when request fails due to missing file.
2017-05-27 00:10:21 -07:00
Jacob Dufault
385531521f
Harden against bad language server method call in completion.
2017-05-26 23:51:32 -07:00
Jacob Dufault
d816e2618a
Some renames, promote view completion sessions to edit sessions
2017-05-26 21:21:00 -07:00
Jacob Dufault
7840b7a015
Cache global completion results.
2017-05-26 00:10:55 -07:00
Jacob Dufault
cdc268d549
Preload code completion, maintain LRU cache for multiple completion files.
2017-05-25 23:40:38 -07:00
Jacob Dufault
2e3e1e0427
Refactor quote extraction
2017-05-25 21:26:35 -07:00
Jacob Dufault
f5ed2828c3
Fix code lens sometimes appearing on "};"
2017-05-25 21:09:10 -07:00
Jacob Dufault
8bbd9b7694
Revert change to use CXTranslationUnit_Incomplete when indexing. It broke tests.
2017-05-24 20:06:05 -07:00
Jacob Dufault
32940e2c88
Experiment with caching CXIndex across multiple sessions
2017-05-24 19:04:19 -07:00
Jacob Dufault
d47869ad0f
Do not remove querydb defined type/func/var if the final reference is removed from a file.
...
We still remove the defined type/func/var if it was defined in that file, though.
2017-05-24 17:45:33 -07:00
Jacob Dufault
97832f2a73
Add call tree and full type hierarchy using upcoming vscode tree API
2017-05-24 00:17:29 -07:00
Jacob Dufault
6c66beb0fa
Increment index version
2017-05-23 00:52:20 -07:00
Jacob Dufault
37787290cb
Make sure every include candidate is unique w.r.t. absolute path.
...
Also do not follow symlinks when iterating a directory.
2017-05-23 00:24:14 -07:00
Jacob Dufault
ee90938b28
Fix goto def when implicit functions are called.
...
Don't import the implicit functions into the 'all symbols' structure. This fixes symbol lookup.
2017-05-22 23:57:46 -07:00
Jacob Dufault
2e4c5474da
Index implicit function calls.
2017-05-22 23:47:27 -07:00
Jacob Dufault
1598129d8b
Fix file finding on windows when path case changes.
2017-05-22 00:14:11 -07:00
Jacob Dufault
8d9374ee59
Disable logging of filtered project paths, but let user enable it in config.
2017-05-21 23:45:47 -07:00
Jacob Dufault
da6a8f335f
Only delta update on file save if the file is already imported.
2017-05-21 23:18:38 -07:00
Jacob Dufault
dc605bc5c3
Don't import defs without definition information into querydb
2017-05-21 23:09:09 -07:00
Jacob Dufault
440fa950a0
Use -xc (instead of -xc++) for files ending with .c.
...
A good chunk of c files will fail to compile under c++ mode.
2017-05-21 23:06:30 -07:00
Jacob Dufault
639bf8a431
Show error message when regex parsing fails.
2017-05-21 22:54:27 -07:00
Jacob Dufault
c66c927c1f
Fix some more warnings from clang
2017-05-21 16:48:21 -07:00
Jacob Dufault
8910d0a13e
Fix warnings (almost all numeric cast-related)
2017-05-21 16:22:00 -07:00
Jacob Dufault
e182ac12ae
Elide long include path proposals
2017-05-21 14:01:52 -07:00
Jacob Dufault
89b34a359c
Log message if creating regex fails
2017-05-21 14:00:48 -07:00
Jacob Dufault
864ff122d8
Scan include directories for include completion candidates.
2017-05-21 12:51:15 -07:00
Jacob Dufault
a058eb8e95
Small nits
2017-05-21 00:56:21 -07:00
Jacob Dufault
3fe824e208
Fix clang compile
2017-05-21 00:43:10 -07:00
Jacob Dufault
94bd6fc301
Add #include auto-complete.
2017-05-21 00:37:53 -07:00
Jacob Dufault
7a79532fff
Report document links on includes
2017-05-20 21:30:59 -07:00
Jacob Dufault
41e1dff4c9
Goto definition for includes
2017-05-20 20:47:20 -07:00
Jacob Dufault
529f309c45
Index macros (treat them like variables)
2017-05-20 18:58:54 -07:00
Jacob Dufault
d3bd31604e
Code lens improvements
...
- Hide declaration from list of refs on types and variables (so now they will show as '0 refs')
- Let the user hide code lens on parameter and function-local variables
2017-05-20 18:26:50 -07:00
Jacob Dufault
44153f94e8
Fix auto variable type deduction when auto is a pointer.
2017-05-20 17:19:32 -07:00
Jacob Dufault
b79b98f464
Darken/fade code disabled by preprocessor.
2017-05-20 14:45:46 -07:00
Jacob Dufault
f3d00dea23
Implement code actions using clang FixIts
...
- Also make server check client version and show an error message if they do not match.
2017-05-20 12:31:07 -07:00
Jacob Dufault
440c6c5325
Small code cleanup
2017-05-20 01:23:01 -07:00
Jacob Dufault
b258f2dd0b
Cache signature completion as well.
...
- Also check file path when validating completion cache.
2017-05-20 01:20:37 -07:00
Jacob Dufault
9d3187a06c
Don't bother saving if we reported diagnostics.
...
Always report if file has diagnostics, always report if file is interactive.
2017-05-20 01:07:54 -07:00
Jacob Dufault
29845cc1e3
Cache code completion results for backspace character.
2017-05-20 01:07:29 -07:00
Jacob Dufault
9ae526089a
Fix removing entries from querydb.
...
I expect this will resolve most of the issues with the index getting messed up when actively editing a file.
2017-05-20 00:33:11 -07:00
Jacob Dufault
b3d5327342
Real-time diagnostics via clang_codeCompleteAt
2017-05-19 23:35:14 -07:00
Jacob Dufault
54fed027ce
Fix CopyFileTo when there is already a destination file.
...
This fixes reindexing files, as before we would update the json but not
the indexed file contents which caused code lens and references to get
out of sync.
2017-05-19 17:41:27 -07:00
Jacob Dufault
3e00e5fc0c
Log compile arguments when there is a libclang failure
2017-05-19 09:51:42 -07:00
Jacob Dufault
00143bef8e
Log index updates before applying them
2017-05-19 00:02:01 -07:00
Jacob Dufault
f9787f83d8
Don't serialize diagnostics
2017-05-18 22:44:23 -07:00
Jacob Dufault
cf45c91bcd
A bit more work on making a faster compile_commands.json loader
2017-05-18 18:14:53 -07:00
Jacob Dufault
1d6477c3e9
Fix compile
2017-05-18 18:14:15 -07:00
Jacob Dufault
866faed4fc
Exit when there is no more stdin input
2017-05-18 18:13:51 -07:00
Jacob Dufault
2b407e0bce
Basic performance data tracking during indexing
2017-05-17 00:08:45 -07:00
Jacob Dufault
f2d46e86b7
Don't force index updates on primary translation unit when updating dependency indexes.
2017-05-16 23:09:53 -07:00
Jacob Dufault
c5f29c277b
Fix off-by-one error for resolving document column to symbol column
2017-05-16 23:05:12 -07:00
Jacob Dufault
59a077d8a9
Fix race condition when saving indexed file contents to cache.
2017-05-16 23:01:51 -07:00
Jacob Dufault
671a54c7af
Move most of the information in document outline to containerName. This makes searching nicer.
2017-05-16 00:45:46 -07:00
Jacob Dufault
f907d1d1b9
When indexing make sure we use the correct contents.
...
Hopefully this will make overlapping saves more robust.
2017-05-16 00:38:15 -07:00
Jacob Dufault
d8567c75cc
More robust approach for tracking indexed file.
2017-05-16 00:26:26 -07:00
Jacob Dufault
83f8c7afa8
Better insert text for STL types
2017-05-15 00:58:29 -07:00
Jacob Dufault
b727fc5a36
Fix signature help for calls prefixed by a namespace
2017-05-15 00:37:47 -07:00
Jacob Dufault
3001faf9a8
Signature help and snippets for code completion
2017-05-15 00:29:22 -07:00
Jacob Dufault
7f33861526
Don't serialize diagnostics for tests.
2017-05-15 00:29:22 -07:00
Jacob Dufault
2c20cf0157
Add some partial update tests
2017-05-15 00:29:22 -07:00
Jacob Dufault
a92a83a319
Simplify cquery building, prepackage extension.
2017-05-12 00:15:17 -07:00
Jacob Dufault
ff421723a5
Renames and fix some operator < implementations
2017-05-11 23:08:15 -07:00
Jacob Dufault
61aaf4509c
Fix PriorityEnqueue; use it when saving a file so index results come in faster for actively edited files.
2017-05-11 00:41:27 -07:00
Jacob Dufault
a587022643
Fix some more operator< implementations. This may fix some of the IndexUpdate diff issues.
2017-05-11 00:38:57 -07:00
Jacob Dufault
57da6a81ab
Make update delta work a bit better. Still buggy though.
2017-05-11 00:20:00 -07:00
Jacob Dufault
74d67b0eb5
Update readme, add TODO
2017-05-10 23:36:34 -07:00
Jacob Dufault
4c487ab797
Reparse document after save for code completion, but don't drop existing completion state until after reparse is done.
2017-05-10 23:25:41 -07:00
Jacob Dufault
20429ed397
Clear diagnostics if previously reported
2017-05-10 18:44:39 -07:00
Jacob Dufault
202ab60ede
Added diagnostics.
2017-05-09 23:13:13 -07:00
Jacob Dufault
1083a10a66
Fix some threading bugs with code completion
2017-05-09 21:52:15 -07:00
Jacob Dufault
4a4315d7a1
Set code completion thread name
2017-05-09 21:00:05 -07:00
Jacob Dufault
6737599c11
Add CXTranslationUnit_CreatePreambleOnFirstParse for code completion on non-Windows machines.
2017-05-08 22:15:35 -07:00
Jacob Dufault
8ed20567a1
Only allow one active index request per file when actively editing.
2017-05-08 22:09:57 -07:00
Jacob Dufault
ad0a03b0da
Split global usr lookup into separate lookups for file/type/func/var.
...
This eliminates problems when actively editing code, ie, a USR can change from being a variable to being a type.
2017-05-08 21:20:28 -07:00
Jacob Dufault
ea5400a633
Add todo; use clang_parseTranslationUnit2
2017-05-08 18:21:21 -07:00
Jacob Dufault
629876007e
Fix clang compile
2017-05-08 18:21:21 -07:00
Jacob Dufault
d1287f8fc8
Fix crash when trying to load cache that does not exist
2017-05-08 18:21:21 -07:00
Jacob Dufault
a97bd9d1c4
WIP better command line parsing
2017-05-08 18:21:21 -07:00
Jacob Dufault
9ffed9a253
Add assert when updating test expectations
2017-05-08 18:21:21 -07:00
Jacob Dufault
4efb4dbf25
Make querydb import more robust to usr changes
2017-05-08 18:21:21 -07:00
Jacob Dufault
5524abdaa7
Support keyboard shortcuts for vars, callers, base, and derived.
2017-05-06 23:56:04 -07:00
Jacob Dufault
fc55589ed3
Infer arguments for files not in the project.
2017-05-06 22:36:29 -07:00
Jacob Dufault
e1e45b6dc5
Emit warning for bad working file index instead of crashing.
2017-05-06 22:34:43 -07:00
Jacob Dufault
1b4f377682
WIP but basic test e2e test running
2017-05-02 23:45:10 -07:00
Jacob Dufault
bf21cde14a
Remove default platform arguments for linux.
2017-04-25 21:13:04 -07:00
Jacob Dufault
49c687663e
Rework some of the command line flag parsing logic. Hopefully make it more robust.
2017-04-25 21:03:22 -07:00
Jacob Dufault
839f3d9968
Try parsing with full argv. Also hide system diagnostics.
2017-04-25 19:57:36 -07:00
Jacob Dufault
c77531a432
Log initialization options, reactivate working file asserts.
2017-04-25 19:57:36 -07:00
Jacob Dufault
592ef1c3cf
Better code completion trigger characters.
2017-04-23 18:52:38 -07:00
Jacob Dufault
526fefaf09
Don't rename '.' to '_' in cache files.
...
This makes it easier to browse cached cc/etc files.
Also clean up logging a bit.
2017-04-23 18:24:09 -07:00
Jacob Dufault
91b5614c7e
Optimize import pipeline.
...
Previous implementation was slower at reindexing if loading from cache because primary cc files would be reindexed for every dependency that changed.
2017-04-23 18:01:51 -07:00
Jacob Dufault
1b2f5896dc
Use condition variables instead of sleeping.
...
While tricky to do because we have multiple queues, this reduces a lot of unnecessary delay. e2e time goes down from 10-15ms on average to 0-3ms on average. Loading from cache is also nearly instant on the cquery codebase.
2017-04-23 15:45:40 -07:00
Jacob Dufault
63908e3aa0
Renames
2017-04-23 14:24:06 -07:00
Jacob Dufault
7741991b72
Simplify threading model a bit.
2017-04-23 13:19:09 -07:00
Jacob Dufault
4f57b711bb
Remove some unused code
2017-04-23 13:02:41 -07:00
Jacob Dufault
967529f6ee
Remove support for out of process.
...
Eventually out of process will be reintroduced, but at a different level. The actual indexer/querydb will all run in-process. We will run the clang index out of process (and block the indexer thread while running).
2017-04-23 12:45:58 -07:00
Jacob Dufault
14aa4b77e4
Some formatting changes
2017-04-22 00:43:48 -07:00
Jacob Dufault
489f54e538
Remove most of libclangmm
2017-04-22 00:43:48 -07:00
Jacob Dufault
278eb0cd77
Better support for removing data from querydb
2017-04-22 00:43:48 -07:00
Jacob Dufault
44296471b9
Fix indexerCount evaluation
2017-04-22 00:43:48 -07:00
Jacob Dufault
734511f562
Compile fix
2017-04-21 10:00:36 -07:00
Jacob Dufault
406a2ec3fd
Add end-to-end performance reporting.
...
This lets us know exactly how long it took to run a particular request method, including internal message queue delays, etc.
2017-04-21 00:46:51 -07:00
Jacob Dufault
89e6b3cd43
Rename serialized output, update tests.
2017-04-21 00:04:56 -07:00
Jacob Dufault
bb25640d91
Rename instantiations to instances.
2017-04-21 00:03:33 -07:00
Jacob Dufault
bdd433abd4
Fix vscode complaining about overlapping text edits for rename
2017-04-20 23:56:42 -07:00
Jacob Dufault
1fcefb5262
Misc changes
2017-04-20 23:47:17 -07:00
Jacob Dufault
5ef4f55053
Fix code lens for variable instantiations
2017-04-20 23:46:53 -07:00
Jacob Dufault
11d6623938
Update WorkingFile indexed content correctly.
...
We copy the file contents we indexed over to the index cache folder. Then we load those file contents into the WorkingFile instance as needed.
This means code lens should never get out of sync, as the index buffer cache will always be correct.
2017-04-20 23:32:18 -07:00
Jacob Dufault
16dc2971a6
Automatically compute a good value for number of indexer threads to start.
2017-04-20 22:16:52 -07:00
Jacob Dufault
145bf87d70
Add 'cquery: Freshen Index' command.
...
This validates every file is indexed to its current state. It is very useful after, ie, a git checkout.
2017-04-20 21:50:31 -07:00
Jacob Dufault
ead75bb7a3
Force ctor usage on Index_DoIndex
2017-04-20 21:09:54 -07:00
Jacob Dufault
14b47de1db
Cleanup import pipeline, store arguments in indexed file.
...
We no longer store any runtime state (ie, file arguments) in project.cc; we store it and then query it from the cached index file.
2017-04-20 21:06:15 -07:00
Jacob Dufault
d1fe600fcf
Better goto-definition on constructors.
2017-04-20 17:27:21 -07:00
Jacob Dufault
2f691e5365
Fix compile error
2017-04-20 17:16:54 -07:00
Jacob Dufault
f25a603708
Implement GetLastModificationTime for linux
2017-04-20 09:47:24 -07:00
Jacob Dufault
7326b861ac
Simplify dependency management when updating index for a file.
2017-04-20 01:05:19 -07:00
Jacob Dufault
1f6da81009
Preserve dependencies across multiple index runs.
2017-04-20 00:53:33 -07:00
Jacob Dufault
4d9567a0c2
Fix reindexing for header files
2017-04-20 00:25:38 -07:00
Jacob Dufault
d83b1591a4
Serialized indexes are now versioned. Old versions are not imported.
2017-04-19 23:02:24 -07:00
Jacob Dufault
9338bcfd0e
Improvements to loading project.
...
- Don't reindex the file if the modification time has not changed.
- Import file dependencies before importing other files, which might be a full-on index operation.
2017-04-19 22:46:10 -07:00
Jacob Dufault
2780e18040
CompilationEntry -> Project::Entry
2017-04-19 22:01:36 -07:00
Jacob Dufault
b4fb350140
Include file modification time in index
2017-04-19 21:57:44 -07:00
Jacob Dufault
c60fae5abb
Fix import crash
2017-04-19 10:55:54 -07:00
Jacob Dufault
ea045499b6
When looking up symbols map buffer line to index line.
...
This makes editing experience a bit smoother, as you can goto definition before saving.
2017-04-19 00:52:48 -07:00
Jacob Dufault
20864e422a
Fix recursion when loading cache and indexing are both enabled.
...
Also added config options to disable indexing, disable cache writing, and disable cache reading from settings file.
2017-04-19 00:32:59 -07:00
Jacob Dufault
cbe308c0f9
Try to have better behavior when types are defined across multiple files.
2017-04-18 23:56:37 -07:00
Jacob Dufault
eb83ba26e1
Add sparsepp as a replacement for sparsehash
2017-04-18 22:45:54 -07:00
Jacob Dufault
cd50eb9e35
Positions are now 32 bits (down from 96ish)
2017-04-18 22:38:39 -07:00
Jacob Dufault
95b567838c
Remove concept of 'interesting' usage.
...
It never worked well enough. Showing variable instantations for the type will be more useful.
2017-04-18 22:28:33 -07:00
Jacob Dufault
3ce446d202
Do not output interesting usage.
2017-04-18 21:58:39 -07:00
Jacob Dufault
5b70982c04
Fix permissions when creating files on linux
2017-04-18 21:56:02 -07:00
Jacob Dufault
85734278d8
Misc fixes
2017-04-18 17:05:14 -07:00
Jacob Dufault
2e8e3d29c5
Indexer spelling lookup cannot fail
2017-04-18 16:49:55 -07:00
Jacob Dufault
121336c976
Fix build on OSX, update README.md
2017-04-18 10:21:53 -07:00
Jacob Dufault
c615535d33
vscode settings can now include an additional set of clang arguments to apply.
2017-04-17 21:06:01 -07:00
Jacob Dufault
2b6f4b7cdf
Enable configuration of max workspace search results.
2017-04-17 20:54:20 -07:00
Jacob Dufault
c86dd569c1
Enable configuration for the number of indexer threads.
2017-04-17 20:23:52 -07:00
Jacob Dufault
2d4b910836
Allow configuration of cache directory. Use a good default value as well.
2017-04-17 20:02:41 -07:00
Jacob Dufault
26c0bfe71d
Misc fixes
2017-04-17 13:40:50 -07:00
Jacob Dufault
7f4d902dcf
Add alternative compile_commands.json loader using rapidjson.
...
It may be faster than clang. I haven't tested it yet.
2017-04-17 00:06:01 -07:00
Jacob Dufault
5e8e13380d
First iteration of code completion off the main thread. Still one race condition but hopefully it shouldn't happen too often.
2017-04-16 18:22:59 -07:00
Jacob Dufault
c6dead848e
Remove some TODOs, reduce output sleep from 10ms to 2ms
2017-04-16 16:57:31 -07:00
Jacob Dufault
8e18e7a8ad
Add support for project filtering
2017-04-16 16:52:42 -07:00
Jacob Dufault
9d8c027cfb
Set thread names. Fix initialization race condition when not using shared memory.
2017-04-16 15:48:54 -07:00
Jacob Dufault
741e357053
Remove clang-c dependency from command_line.cc
2017-04-16 14:51:47 -07:00
Jacob Dufault
c0fb407447
Cross-process support can now be disabled.
2017-04-16 14:49:48 -07:00
Jacob Dufault
5105f41f6d
A little bit more IPC cleanup
2017-04-16 13:43:30 -07:00
Jacob Dufault
724d8cc3f4
Refactor ipc behind a proxy type so we can (eventually) bypass all serialization when running fully in-process.
2017-04-16 12:02:29 -07:00
Jacob Dufault
2ebaadd696
Small nits
2017-04-16 01:55:14 -07:00
Jacob Dufault
faa3cce185
Add a couple completion kinds.
2017-04-16 01:37:27 -07:00
Jacob Dufault
55f527b975
Spend time on indexer thread doing a higher quality IndexUpdate merge to reduce querydb import time
2017-04-16 01:31:28 -07:00
Jacob Dufault
04a855ebc7
Much better algorithm to sync code lens index locations to the right buffer location
2017-04-16 01:09:12 -07:00
Jacob Dufault
4dcffeb3f3
Use type safe google::dense_hash_map instantiations
2017-04-14 22:55:01 -07:00
Jacob Dufault
5109d27b87
Tons of renames (generally, Queryable -> Query, QueryableTypeDef -> QueryType, QueryableFuncDef -> QueryFunc, QueryableVarDef -> QueryVar)
2017-04-14 22:41:35 -07:00
Jacob Dufault
4135186ae2
Optimize MergeableUpdate so we don't do usr->id lookups when importing on querydb thread
2017-04-14 22:24:49 -07:00
Jacob Dufault
efcc498b79
Remove a couple stale TODOs
2017-04-14 22:15:47 -07:00
Jacob Dufault
1791f4c3b7
Refactor out FindSymbolsAtLocation
2017-04-14 22:14:05 -07:00
Jacob Dufault
c946fd1b8e
Simplify code for building detailed_name
2017-04-14 22:02:03 -07:00
Jacob Dufault
f4e16067b7
Rename qualified_name to detailed_name.
2017-04-14 21:58:07 -07:00
Jacob Dufault
07c984d6c7
- Add type information to qualified_name, remove hover.
...
- Allow tests to automatically update their expecatations
2017-04-14 21:53:10 -07:00
Jacob Dufault
349b982f66
WIP fuzzy search
2017-04-14 18:40:01 -07:00
Jacob Dufault
9826ff193b
Slightly better logging
2017-04-14 17:56:16 -07:00
Jacob Dufault
f263524b19
Fix another threading crash
2017-04-14 17:54:22 -07:00
Jacob Dufault
337c1f0b12
Fix multithread crash
2017-04-14 15:58:07 -07:00
Jacob Dufault
8f1e517c0a
Small tweaks
2017-04-14 15:30:33 -07:00
Jacob Dufault
031c0c2011
Include variable type and function signature in qualified name (better outline and workspace symbol search). Also add WIP rename provider.
2017-04-14 01:21:03 -07:00
Jacob Dufault
71d1b1ffc6
Implement textDocument/documentHighlight
2017-04-13 23:43:50 -07:00
Jacob Dufault
4f770befee
Support textDocument/hover (ie, hover over symbol to see type)
2017-04-13 22:18:02 -07:00
Jacob Dufault
fe0b5cb79c
Cleanup / simplify the querydb import code a little
2017-04-13 19:17:15 -07:00
Jacob Dufault
103b2dac95
Fix querydb import overriding good data with bad
2017-04-13 01:31:25 -07:00
Jacob Dufault
151505dadf
Add TODO to investigate index or import issue
2017-04-13 01:21:24 -07:00
Jacob Dufault
d6123bd861
Every function usage is now considered a call of that function.
...
This means we will now report function calls that happen in the global scope (previously, those would only show up for find all refs).
2017-04-13 00:47:47 -07:00
Jacob Dufault
7a429ed3e6
Fix global symbol search (was searching usr, should search qualified name)
2017-04-12 23:02:01 -07:00
Jacob Dufault
d5e5d96a9e
- Slightly more robust file parsing
...
- Make memory ownership slightly clearer in indexer
2017-04-12 23:01:42 -07:00
Jacob Dufault
94090b7b50
index stl declarations
2017-04-12 00:57:12 -07:00
Jacob Dufault
abbc6380f4
Fix indexing function call when there is implicit ctor call
2017-04-12 00:36:17 -07:00
Jacob Dufault
fdbb820d50
Fix outline and global search for pure virtual methods
2017-04-12 00:19:49 -07:00
Jacob Dufault
12a0db7d10
Don't call NormalizePath in core indexing logic; syscall dominates indexing time
2017-04-12 00:04:06 -07:00
Jacob Dufault
33c91de4c0
Fix goto definition on pure virtual methods
2017-04-11 23:41:19 -07:00
Jacob Dufault
e32adb1786
Fix 'Base' code lens on interface parent types
2017-04-11 23:30:31 -07:00
Jacob Dufault
7f4918ab15
Add "Base" code lens which jumps the editor to the base method definition.
2017-04-11 01:43:35 -07:00
Jacob Dufault
215a9a80fb
- Show code lens for calls to parent and derived methods
...
- Don't show local variables in global symbol search
2017-04-11 00:29:36 -07:00
Jacob Dufault
91febd7343
Make goto declaration work from on a recursively defined type when used inside the type definition
2017-04-10 23:02:53 -07:00
Jacob Dufault
c9a251b7ab
Goto definition intelligently jumps to declaration
2017-04-10 22:43:01 -07:00
Jacob Dufault
76b6a3d4fd
Store indexed dependencies so we can reload all files when restoring from cache. Also slightly improve goto definition source range
2017-04-10 22:26:27 -07:00
Jacob Dufault
e9f0c57708
Implement textDocument/references
2017-04-09 22:34:06 -07:00
Jacob Dufault
88e0d224e3
Still pretty clunky but sort of usable
2017-04-09 17:17:49 -07:00
Jacob Dufault
527439b7c2
WIP on updating index; locations still broken
2017-04-09 17:08:54 -07:00
Jacob Dufault
43ad87ab8d
Some delta tracking improvements. Still not perfect but probably good enough. Also hide refs that have been deleted in source code.
2017-04-09 15:16:06 -07:00
Jacob Dufault
6e90f8db45
Enable partial document change sync, use delta info to keep references/code lens in sync when editing
2017-04-09 12:38:52 -07:00
Jacob Dufault
3cd9ae4d16
Remove some duplicated code in workspace / document symbol creation
2017-04-08 19:48:50 -07:00
Jacob Dufault
96d5815641
cleanup code lens implementation
2017-04-08 19:31:00 -07:00
Jacob Dufault
5ebf4551b1
remove UsrRef
2017-04-08 19:27:07 -07:00
Jacob Dufault
6720a886e3
move some code out of command_line.cc
2017-04-08 19:24:32 -07:00
Jacob Dufault
c25fac0919
Make Resolve location never fail
2017-04-08 16:16:30 -07:00
Jacob Dufault
736b56d730
Remove string_db files
2017-04-08 16:12:14 -07:00
Jacob Dufault
56f0b3a90a
Auto-index header files
2017-04-08 15:54:36 -07:00
Jacob Dufault
460a428ced
Parse now returns a vector of unique_ptrs
2017-04-08 13:00:08 -07:00
Jacob Dufault
f0e8d0110c
Add call refs from ctor context
2017-04-08 11:36:32 -07:00
Jacob Dufault
eec863da9a
Small cleanup
2017-04-08 01:17:29 -07:00
Jacob Dufault
59c7d96ea7
Migrate QueryableVarDef to indicies
2017-04-08 01:07:39 -07:00
Jacob Dufault
fffb3d3fcc
Migrate QueryableFuncDef to indices
2017-04-08 01:04:38 -07:00
Jacob Dufault
64d65584fd
Use indexed ids for QueryTypeDef
2017-04-08 00:52:57 -07:00
Jacob Dufault
d61cc7a077
QueryableLocation now stores a file index
2017-04-08 00:21:00 -07:00
Jacob Dufault
74b1fe7194
QueryFile is now storing symbol indices directly
2017-04-08 00:11:57 -07:00
Jacob Dufault
4249fc4a38
Implement new threading model for computing index updates (prepare IdMap on querydb thread)
2017-04-07 23:45:28 -07:00
Jacob Dufault
22cc140d80
use sparsehash
2017-04-07 18:35:12 -07:00
Jacob Dufault
820a1dc093
compile-fixes
2017-04-07 17:34:13 -07:00
Jacob Dufault
6f071cfeb8
wip IdMap
2017-04-07 01:01:58 -07:00
Jacob Dufault
c5dc7a7ac7
wip towards id migration, use IdMap isntead of IdCache
2017-04-07 00:30:08 -07:00
Jacob Dufault
2d93ceb6db
simplify some code, remove unused class
2017-04-07 00:12:53 -07:00
Jacob Dufault
3368065d94
remove some default ctors
2017-04-07 00:01:21 -07:00
Jacob Dufault
590797bcf2
some renames and add plan for lower mem usage
2017-04-06 23:57:26 -07:00
Jacob Dufault
443ccd24b9
limit workspace result to 1000, fix workspace file search
2017-04-06 23:38:01 -07:00
Jacob Dufault
5d451e020a
rename indexer.cpp to indexer.cc
2017-04-06 23:31:29 -07:00
Jacob Dufault
6114b507e2
Drop Position support from indexer templates
2017-04-06 23:29:18 -07:00
Jacob Dufault
75b2db6dbf
misc
2017-04-06 23:21:16 -07:00
Jacob Dufault
5408540158
cleanup query location usage
2017-04-06 23:20:30 -07:00
Jacob Dufault
547ef3fc3d
simplify position part1
2017-04-06 23:10:17 -07:00
Jacob Dufault
69b1dcadaa
cleanup some query code to prepare for space optimizations
2017-04-06 22:42:57 -07:00
Jacob Dufault
d39d204891
wip
2017-04-05 19:04:58 -07:00
Jacob Dufault
dffbec25d0
wip string cache
2017-04-05 18:52:48 -07:00
Jacob Dufault
2f61e1b4f4
normalize path in -I flag
2017-04-05 18:12:29 -07:00
Jacob Dufault
ce736c84e0
misc-linux-fixes
2017-04-05 10:41:22 -07:00
Jacob Dufault
baa7d2c8cb
reenable serialize to/from tests
2017-04-05 01:30:19 -07:00
Jacob Dufault
17c3a8bf57
Update test with current index state
2017-04-05 01:29:15 -07:00
Jacob Dufault
e3058da622
Store range information in index
2017-04-05 01:06:18 -07:00
Jacob Dufault
ed8fc33cbe
add basic goto-definition, lots of edge cases (need range info)
2017-04-02 19:21:21 -07:00
Jacob Dufault
ae993d6446
wip
2017-04-02 18:34:15 -07:00
Jacob Dufault
cf6456c904
add basic index cache (useful for debugging)
2017-03-30 22:30:50 -07:00
Jacob Dufault
5e7008875d
unify project loading
2017-03-30 21:21:52 -07:00
Jacob Dufault
5b734e4c64
code dedup
2017-03-30 21:15:42 -07:00
Jacob Dufault
82596abc51
misc cleanup
2017-03-30 21:13:58 -07:00
Jacob Dufault
2a3ee89349
wip
2017-03-29 10:12:00 -07:00
Jacob Dufault
843a86a4a9
add asserts
2017-03-29 00:00:53 -07:00
Jacob Dufault
aef8e9267f
fix crash
2017-03-28 23:40:32 -07:00
Jacob Dufault
a19d4f732f
wip
2017-03-28 23:33:38 -07:00
Jacob Dufault
cf1012b98c
small fixes
2017-03-27 22:27:06 -07:00
Jacob Dufault
9ac960109f
wip
2017-03-27 19:35:27 -07:00
Jacob Dufault
4c601c4d37
wip
2017-03-27 18:47:12 -07:00
Jacob Dufault
a8a343420b
misc-linux-fixes
2017-03-27 18:04:37 -07:00
Jacob Dufault
876296d62f
more code completion work
2017-03-26 21:04:48 -07:00
Jacob Dufault
404b853d6f
code completion works (but is still blocking)
2017-03-26 14:40:34 -07:00
Jacob Dufault
7ffdf77b99
textDocument/open close edit, WIP code completion
2017-03-25 23:47:59 -07:00
Jacob Dufault
d3b9743040
wip
2017-03-25 18:37:16 -07:00
Jacob Dufault
cc85f196f4
never elide data for language server json serialization
2017-03-25 17:22:06 -07:00
Jacob Dufault
c8afc0f022
more changes
2017-03-25 16:58:11 -07:00
Jacob Dufault
8219a39a32
move some things into language_server_api.cc
2017-03-25 15:13:19 -07:00
Jacob Dufault
68938bc3df
renames
2017-03-25 14:57:06 -07:00
Jacob Dufault
a31ebb131c
further messaging cleanups
2017-03-25 14:45:49 -07:00
Jacob Dufault
5a2acf17ab
renames
2017-03-25 14:02:45 -07:00
Jacob Dufault
c4a9590398
fixes
2017-03-25 13:40:04 -07:00
Jacob Dufault
38acb8c1a1
move optional to third_party
2017-03-25 13:32:44 -07:00
Jacob Dufault
b6978b1a38
move platform init code to platform
2017-03-25 13:27:28 -07:00
Jacob Dufault
5d922a1e90
misc header cleanup
2017-03-25 13:24:42 -07:00
Jacob Dufault
695048baa7
move code into src
2017-03-25 13:15:00 -07:00
Jacob Dufault
c060e5178b
ipc cleanup
2017-03-25 12:18:25 -07:00
Jacob Dufault
17c3af4d40
make enum hashable
2017-03-24 18:01:41 -07:00
Jacob Dufault
539c779606
fix some warnings
2017-03-24 17:40:01 -07:00
Jacob Dufault
6a72712404
virtual dtor out-of-line
2017-03-24 17:40:01 -07:00
Jacob Dufault
4bdf8c825b
iwp
2017-03-24 00:59:47 -07:00
Jacob Dufault
0037a3e7f5
Add TypedBidiMessageQueue
2017-03-23 22:20:08 -07:00
Jacob Dufault
528d778d9a
osx compile files
2017-03-21 10:06:22 -07:00
Jacob Dufault
cd4d63dd9c
Small winapi fixes
2017-03-20 23:03:59 -07:00
Jacob Dufault
95f6a0df1c
more format
2017-03-20 22:51:34 -07:00
Jacob Dufault
95488507a0
format, doc cleanup
2017-03-20 22:51:16 -07:00
Jacob Dufault
e7390c14f1
Cleanup new MessageQueue impl
2017-03-20 22:40:14 -07:00
Jacob Dufault
4b609c7158
wip
2017-03-19 22:43:48 -07:00
Jacob Dufault
4bd284ee7e
Format
2017-03-19 15:08:36 -07:00
Jacob Dufault
4cec26ae12
WIP
2017-03-19 15:06:22 -07:00