diff --git a/foo/clang_args b/foo/clang_args index 52bf7bc1..260efaa1 100644 --- a/foo/clang_args +++ b/foo/clang_args @@ -4,6 +4,7 @@ -IC:/Users/jacob/Desktop/superindex/indexer/third_party/doctest/doctest -IC:/Users/jacob/Desktop/superindex/indexer/third_party/rapidjson/include -IC:/Program Files/LLVM/include +-I/usr/local/Cellar/llvm/3.9.1/include #--sysrootC:/Users/jacob/Desktop/superindex/indexer/libcxx #-IC:/Users/jacob/Desktop/superindex/indexer/libcxx/include diff --git a/src/command_line.cc b/src/command_line.cc index 6cd9a06f..776465fa 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -26,7 +26,7 @@ namespace { const char* kIpcLanguageClientName = "language_client"; const int kNumIndexers = 8 - 1; -const int kQueueSizeBytes = 1024 * 1024 * 32; +const int kQueueSizeBytes = 1024 * 8; } struct IndexTranslationUnitRequest { diff --git a/src/language_server_api.cc b/src/language_server_api.cc index 6aca5e4f..5d5be350 100644 --- a/src/language_server_api.cc +++ b/src/language_server_api.cc @@ -126,7 +126,7 @@ void lsDocumentUri::SetPath(const std::string& path) { raw_uri.replace(raw_uri.begin() + index, raw_uri.begin() + index + 1, "%3A"); } - raw_uri = "file:///" + raw_uri; + raw_uri = "file://" + raw_uri; //std::cerr << "Set uri to " << raw_uri << " from " << path; } @@ -141,7 +141,7 @@ std::string lsDocumentUri::GetPath() const { index = result.find("file://"); if (index != -1) { - result.replace(result.begin() + index, result.begin() + index + 8, ""); + result.replace(result.begin() + index, result.begin() + index + 7, ""); } std::replace(result.begin(), result.end(), '\\', '/'); @@ -213,4 +213,4 @@ std::string Out_ShowLogMessage::method() { if (display_type == DisplayType::Log) return "window/logMessage"; return "window/showMessage"; -} \ No newline at end of file +} diff --git a/src/platform_linux.cc b/src/platform_linux.cc index a19dbc8d..66b74d2c 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -48,6 +48,7 @@ struct PlatformScopedMutexLockLinux : public PlatformScopedMutexLock { void* checked(void* result, const char* expr) { if (!result) { std::cerr << "FAIL errno=" << errno << " in |" << expr << "|" << std::endl; + std::cerr << "errno => " << strerror(errno) << std::endl; exit(1); } return result; @@ -56,6 +57,7 @@ void* checked(void* result, const char* expr) { int checked(int result, const char* expr) { if (result == -1) { std::cerr << "FAIL errno=" << errno << " in |" << expr << "|" << std::endl; + std::cerr << "errno => " << strerror(errno) << std::endl; exit(1); } return result; diff --git a/src/typed_bidi_message_queue.h b/src/typed_bidi_message_queue.h index 18f5dd9d..7ffcda23 100644 --- a/src/typed_bidi_message_queue.h +++ b/src/typed_bidi_message_queue.h @@ -18,10 +18,10 @@ struct TypedBidiMessageQueue { TypedBidiMessageQueue(const std::string& name, size_t buffer_size) : for_server( - Buffer::CreateSharedBuffer(name + "_for_server", buffer_size), + Buffer::CreateSharedBuffer(name + "_fs", buffer_size), false /*buffer_has_data*/), for_client( - Buffer::CreateSharedBuffer(name + "_for_client", buffer_size), + Buffer::CreateSharedBuffer(name + "_fc", buffer_size), true /*buffer_has_data*/) {} void RegisterId(TId id, diff --git a/wscript b/wscript index d86d4ae5..d00cf916 100644 --- a/wscript +++ b/wscript @@ -94,7 +94,10 @@ def build(bld): 'third_party/doctest/', 'third_party/rapidjson/include', CLANG_INCLUDE_DIR], - lib=['clang', 'rt', 'pthread'], + lib=[ + 'clang', + #'rt', + 'pthread'], libpath=[CLANG_LIB_DIR], rpath=[CLANG_LIB_DIR], target='app')