Commit Graph

54 Commits

Author SHA1 Message Date
Fangrui Song
c68548a2ca Remove <regex> from lex_utils.h and separate language_server_api.h
% time clang++ -fsyntax-only -std=c++11 a.cc

<iostream> => 0.35s
<regex> => 0.68s
2018-02-23 16:33:48 -08:00
Fangrui Song
411d49951d Reduce structs in language_server_api.h and clarify query_utils.h 2018-02-23 15:57:11 -08:00
Jacob Dufault
01fe19f280 Format code 2018-02-21 23:34:32 -08:00
Fangrui Song
702cdbe9bb Group initialization options and rename $cquery/typeHierarchyTree to $cquery/inheritanceHierarchy 2018-02-21 21:57:15 -08:00
Jacob Dufault
1d98797f26 Remove QueryDb_Handle
Code is harder to read and it doesn't belong in import_pipeline.cc.
2018-02-11 14:31:24 -08:00
Fangrui Song
0016d214c3 Convert copy constructor to move constructors piecemeal
If I replace all the important constructors used in query.cc, there will be a weird issue that strings following "Applying index update for " are empty.
2018-02-06 20:54:17 -08:00
Fangrui Song
cd96cb9570 threaded_queue: queue -> deque
IndexMergeIndexUpdates: use TryPopBack() and see
2018-02-04 22:15:48 -08:00
Fangrui Song
3839d1e5ab Decouple QueryDb_ImportMain 2018-02-04 21:22:21 -08:00
Jacob Dufault
e0e3a39d5d Fix clang 3.5 compile error 2018-01-31 21:49:56 -08:00
Jacob Dufault
c98d53cfe2 Indexer now has access to |config| 2018-01-31 21:48:49 -08:00
Jacob Dufault
b02c92e335 Reduce file reads in import_pipeline 2018-01-31 21:20:38 -08:00
Fangrui Song
871ae34a1b Hotfix of stale file contents in 186898 2018-01-31 08:42:25 -08:00
Jacob Dufault
f6a2a55209 Import pipeline improvements
- Cache manager is created by request
- Index is always associated with its contents
- Reduced frequently of file reads
2018-01-29 21:34:36 -08:00
Jacob Dufault
0eb7d415d7 usr_to_file uses new NormalizedPath type 2018-01-29 16:56:00 -08:00
Jacob Dufault
a392301be3 Format 2018-01-29 16:27:43 -08:00
Fangrui Song
c5bb14e86b Use INVALID_ID instead of optional and clean up 2018-01-20 09:59:12 -08:00
scturtle
b8a3e089ce Response on index error. (#319) 2018-01-19 23:56:49 -08:00
Chao Shen
de5e8eeeba Ignore file name in comparing arguments. 2018-01-18 08:25:20 -08:00
Jacob Dufault
ae26aa93db Fix index not updating 2018-01-18 01:33:37 -08:00
Jacob Dufault
2ff823f2eb Actually fix progress reporting 2018-01-18 00:28:08 -08:00
Jacob Dufault
a233558fcd Move file content loading into a separate function 2018-01-18 00:21:39 -08:00
Jacob Dufault
e38c6103ea FileNeedsParse no longer takes FileConsumerSharedState 2018-01-18 00:05:12 -08:00
Jacob Dufault
a1ae100478 Some import pipeline refactors 2018-01-18 00:01:32 -08:00
Jacob Dufault
5b092dc9da Rename variable 2018-01-17 23:24:52 -08:00
Jacob Dufault
13e56ac16f Log if a file was reparsed due to timestamp or argument change. 2018-01-17 23:19:08 -08:00
Jacob Dufault
c80697a8d8 Add tests for FileNeedsParse 2018-01-17 23:11:33 -08:00
Jacob Dufault
a3774a371f Reindex a file when command line arguments have changed 2018-01-17 22:04:07 -08:00
Jacob Dufault
bc2521382d FileNeedsParse is a separate function 2018-01-17 21:53:03 -08:00
Jacob Dufault
4c1ee74b27 Merge ParseFile and DoParseFile 2018-01-17 21:48:09 -08:00
Chao Shen
3132572e72 Don't give up index files of headers if the .cc/.cpp file failed. 2018-01-17 21:24:32 -08:00
Jacob Dufault
e20a6e9790 Add siphash.h, HashUSR -> HashUsr 2018-01-14 13:18:12 -08:00
Fangrui Song
14a213d407 Change std::string USR to uint64_t pseudorandom function (SipHash 64-bit) 2018-01-12 23:47:24 -08:00
Jacob Dufault
05b577c9fa Fix progress not always going to zero 2018-01-10 19:56:47 -08:00
Jacob Dufault
ab41e0353c Fix build 2018-01-07 13:37:30 -08:00
Jacob Dufault
09d9d5eedc Progress output improvements
- Don't emit so many progress messages
- Allow user to control how often progress is emitted
- Include number of active threads in progress
2018-01-07 13:08:48 -08:00
Jacob Dufault
0ac0039c61 Small doc update. 2018-01-07 02:10:35 -08:00
Jacob Dufault
8a7dfb017f Validate no files are consumed by import pipeline 2018-01-06 20:27:50 -08:00
Jacob Dufault
76a3fe8400 Reenable tests 2018-01-06 17:12:57 -08:00
Jacob Dufault
8debcf1d9d Usage initializer_list 2018-01-06 17:11:34 -08:00
Jacob Dufault
a1423a39a0 Fix build 2018-01-06 16:51:55 -08:00
Jacob Dufault
476a3f1797 Add a couple more import pipeline tests, introduce fixture. 2018-01-06 16:30:41 -08:00
Jacob Dufault
5d4e0a5020 Enable simple sanity test for import pipeline.
- Add FakeCacheManager
- Add IIndexer so we don't call out to clang
2018-01-06 16:20:37 -08:00
Fangrui Song
f68e70f5b7 Replace MultiQueueWaiter timeout with condition_variable_any on multiple mutexes
Inspired by https://github.com/jacobdufault/cquery/pull/213
2018-01-01 16:19:58 -08:00
Jacob Dufault
6048eb6237 Move LoadCachedFileContents into ICacheManager 2017-12-29 12:19:39 -06:00
Jacob Dufault
71591d7805 Index_Request::contents is no longer optional 2017-12-29 12:00:52 -06:00
Jacob Dufault
a10bb50f51 Begin cache restructure so it can be tested 2017-12-29 12:00:52 -06:00
Jacob Dufault
3c0b2ff042 Move most of import_pipeline.cc into anonymous namespace 2017-12-29 12:00:52 -06:00
Jacob Dufault
c596e55dcc Cleanup some includes. 2017-12-29 12:00:52 -06:00
Jacob Dufault
b6071004df Rename IndexMain to Indexer_Main 2017-12-29 12:00:52 -06:00
Jacob Dufault
ad193b2ace Initialize ImportPipelineStatus::num_active_threads 2017-12-29 09:39:10 -06:00