No completions on osx clang 8.0
On my Mac, I have installed clang and cmake. But it occurs failed to match location as follow.
The problem is the plugin cannot autocomplete my function while I have write a ".clang_complete" in my project. In the ".clang_complete" file, the content is like "-I/home/xxx/include".
Unable to open /Users/lau/Library/Application Support/Sublime Text 3/Packages/User/EasyClangComplete.sublime-settings
reloading settings Packages/User/EasyClangComplete.sublime-settings
INFO:EasyClangComplete.plugin.settings.settings_manager: settings changed and reloaded
reloading settings Packages/User/EasyClangComplete.sublime-settings
INFO:EasyClangComplete.plugin.settings.settings_manager: settings changed and reloaded
INFO:EasyClangComplete.plugin.tools: Getting version from command: `clang++ -v`
WARNING:EasyClangComplete.plugin.tools: OSX version 8.0 reported. Reducing it to 3.8. Info: {'platform': 'Darwin'}
INFO:EasyClangComplete.plugin.tools: Found clang version: 3.8
INFO:EasyClangComplete.plugin.view_config: init completer based on libclang
ERROR:EasyClangComplete.plugin.completion.compiler_variant:regex '(?P<file>.+)'.*line\s(?P<row>\d+), column\s(?P<col>\d+) failed to match location: <SourceLocation file None, line 0, column 0>
Hey, thanks for reporting! The error that you have provided is ok. It should not interfere with completions. But the fact that you cannot complete something means that something else is wrong. Macs are slightly harder to treat for me as I don't own one. :)
Anyway, please enable verbose setting of the plugin and copy the full debug output of the plugin since the start of sublime text until the point when you try to auto complete. Thanks!
Actually, I think what you reported here is exactly what has been reported in #126
Also, this looks very suspicious:
Unable to open /Users/lau/Library/Application Support/Sublime Text 3/Packages/User/EasyClangComplete.sublime-settings
That is because I have not set my owner EasyClangComplete.sublime-settings. That is ok here.
I have touch .clang_complete file in my project dir, and add one line -I~/git/utility/config_reader, but the plugin seems not search the header files in ~/git/utility/config_reader. It can't complete my function when I type the triggers.
Are you actually trying to complete something? I don't see it in the log and this is strange. Also, the .clang_complete syntax does not allow for ~ unfortunately. But you can use relative paths (all the ones that don't start with /). They will be relative to the location of .clang_complete file.
Yes, I'm actually do that. That's strange there is no log. I have use the stl for test, no log too. BUT the stl can complete very well.
std::vector<char> v;
v.insert(const_iterator __position, const_reference __x);
When I tpye v., the plugin show the function list.
And I have fix the .clang_complete like -I../utility/config_reader
It seems that my .clang_complete not correct. When I edit the file, the log is
DEBUG:EasyClangComplete.plugin.tools: file has unsupported syntax: `Plain text`
DEBUG:EasyClangComplete.plugin.tools: file has unsupported syntax: `Plain text`
DEBUG:EasyClangComplete.plugin.tools: file has unsupported syntax: `Plain text`
The file content is
-I../utility/config_reader
-I../utility/cacheinterface
Please add a full log. I cannot tell what is wrong from the part of it. Please, close Sublime Text, open it again. Open a file you want to autocomplete, try to complete it and copy the full log from sublime text console.
the tools syntax error is irrelevant. It was produces when you had .clang_complete file focused.
Ok, the full log is
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Reading settings...
DEBUG:EasyClangComplete.plugin.settings.settings_storage: autocomplete_all <-- 'False'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: c_flags <-- '['-std=c11']'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: clang_binary <-- 'clang++'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: common_flags <-- '['-I/usr/include', '-I$project_base_path/src', '-I/usr/lib/clang/$clang_version/include']'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: cpp_flags <-- '['-std=c++11']'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: errors_on_save <-- 'True'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: flags_sources <-- '[{'file': 'CMakeLists.txt'}, {'file': 'compile_commands.json'}, {'file': '.clang_complete'}]'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: hide_default_completions <-- 'False'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: include_file_folder <-- 'True'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: include_file_parent_folder <-- 'True'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: max_cache_age <-- '00:30:00'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: triggers <-- '['.', '->', '::']'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: use_libclang <-- 'True'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: verbose <-- 'True'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Settings sucessfully read...
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 93
DEBUG:EasyClangComplete.plugin.settings.settings_manager: no settings for view 93. Reinitializing.
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Overriding settings by project ones if needed:
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Valid prefixes: ['ecc_', 'easy_clang_complete_']
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Reading settings...
DEBUG:EasyClangComplete.plugin.settings.settings_storage: Settings sucessfully read...
INFO:EasyClangComplete.plugin.tools: Getting version from command: `clang++ -v`
WARNING:EasyClangComplete.plugin.tools: OSX version 8.0 reported. Reducing it to 3.8. Info: {'platform': 'Darwin'}
INFO:EasyClangComplete.plugin.tools: Found clang version: 3.8
DEBUG:EasyClangComplete.plugin.settings.settings_storage: populating common_flags with current variables.
DEBUG:EasyClangComplete.plugin.settings.settings_storage: populated '-I$project_base_path/src' to '-I/Users/lau/git/xyz/src'
DEBUG:EasyClangComplete.plugin.settings.settings_storage: populated '-I/usr/lib/clang/$clang_version/include' to '-I/usr/lib/clang/3.8/include'
DEBUG:EasyClangComplete.plugin.settings.settings_manager: settings initialized for view: 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: generate new config for path: 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
INFO:EasyClangComplete.plugin.view_config: init completer based on libclang
DEBUG:EasyClangComplete.plugin.completion.lib_complete: using bundled cindex: EasyClangComplete.clang.cindex38
DEBUG:EasyClangComplete.clang.utils: platform: ('64bit', '')
DEBUG:EasyClangComplete.clang.utils: python version: 3.3.6
INFO:EasyClangComplete.clang.utils: we are on 'Darwin'
INFO:EasyClangComplete.clang.utils: searching for: 'libclang.dylib'
INFO:EasyClangComplete.clang.utils: libclang search output = '/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0'
DEBUG:EasyClangComplete.clang.utils: real output: /Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0
DEBUG:EasyClangComplete.clang.utils: folder to search: /Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/../..
INFO:EasyClangComplete.clang.utils: found libclang dir: '/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/../..'
INFO:EasyClangComplete.clang.utils: found library file: 'libclang.dylib'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[generate new db]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load new]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[no new]: return None
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching '.clang_complete' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.tools: found '.clang_complete' file: /Users/lau/git/xyz/live_user_message/.clang_complete
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[current]: '/Users/lau/git/xyz/live_user_message/.clang_complete'
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[changed]: load new
DEBUG:EasyClangComplete.plugin.view_config: flags generated from '.clang_complete'.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: translation unit does not exist. Creating.
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.completion.lib_complete: clang flags are: ['-c', '-fsyntax-only', '-x', 'c++', '-std=c++11', '-I/usr/include', '-I/Users/lau/git/xyz/src', '-I/usr/lib/clang/3.8/include', '-I/Users/lau/git/xyz/live_user_message/frontend/trunk/src', '-I/Users/lau/git/xyz/live_user_message/frontend/trunk', '-I/Users/lau/git/xyz/utility/config_reader', '-I/Users/lau/git/xyz/utility/cacheinterface']
DEBUG:EasyClangComplete.plugin.completion.lib_complete: compilation started for view id: 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: compilation done in 0.294619083404541 seconds
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 0.48359107971191406 seconds
ERROR:EasyClangComplete.plugin.completion.compiler_variant:regex '(?P<file>.+)'.*line\s(?P<row>\d+), column\s(?P<col>\d+) failed to match location: <SourceLocation file None, line 0, column 0>
DEBUG:EasyClangComplete.plugin.error_vis: generating error regions for view 93
DEBUG:root: adding error {'error': "'google/protobuf/stubs/common.h' file not found", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/../../../utils/message_parser/../../protocol_cpp/message.pb.h', 'row': '9', 'col': '10'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '30', 'col': '17'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '31', 'col': '17'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'RelationServiceClientPool'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '52', 'col': '17'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '77', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '82', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'redis_mqinterface' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '87', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'MessageControl' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '93', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '100', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '104', 'col': '9'}
DEBUG:root: adding error {'error': "unknown type name 'Config_reader'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '108', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '112', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '132', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '137', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '143', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '149', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '165', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '171', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '176', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '181', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '186', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '190', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '192', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '197', 'col': '22'}
DEBUG:EasyClangComplete.plugin.error_vis: 1 error regions ready
DEBUG:EasyClangComplete.plugin.error_vis: showing error regions: [(6354, 6367), (4256, 4269), (6493, 6509), (4450, 4463), (2942, 2948), (4644, 4657), (3051, 3057), (4842, 4855), (3154, 3160), (3253, 3259), (1265, 1282), (1300, 1315), (3654, 3667), (3378, 3391), (5459, 5472), (3485, 3498), (5654, 5667), (3569, 3581), (5836, 5849), (2368, 2393), (6013, 6026), (6194, 6207), (6296, 6312)]
DEBUG:EasyClangComplete.plugin.view_config: starting timer to remove old configs.
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 93
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([93])
reloading settings Packages/User/Preferences.sublime-settings
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
INFO:EasyClangComplete.plugin.view_config: init completer based on libclang
DEBUG:EasyClangComplete.plugin.completion.lib_complete: using bundled cindex: EasyClangComplete.clang.cindex38
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[generate new db]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load new]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[no new]: return None
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[cached]: '/Users/lau/git/xyz/live_user_message/.clang_complete'
DEBUG:EasyClangComplete.plugin.tools: searching '.clang_complete' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.tools: found '.clang_complete' file: /Users/lau/git/xyz/live_user_message/.clang_complete
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[current]: '/Users/lau/git/xyz/live_user_message/.clang_complete'
DEBUG:EasyClangComplete.plugin.tools: never seen file '/Users/lau/git/xyz/live_user_message/.clang_complete' before. Updating.
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[changed]: load new
DEBUG:EasyClangComplete.plugin.view_config: flags generated from '.clang_complete'.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no update.
DEBUG:EasyClangComplete.plugin.tools: never seen file '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp' before. Updating.
DEBUG:EasyClangComplete.plugin.view_config: config updates existing completer.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 0.06715106964111328 seconds
ERROR:EasyClangComplete.plugin.completion.compiler_variant:regex '(?P<file>.+)'.*line\s(?P<row>\d+), column\s(?P<col>\d+) failed to match location: <SourceLocation file None, line 0, column 0>
DEBUG:EasyClangComplete.plugin.error_vis: generating error regions for view 93
DEBUG:EasyClangComplete.plugin.error_vis: removing old error regions
DEBUG:root: adding error {'error': "'google/protobuf/stubs/common.h' file not found", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/../../../utils/message_parser/../../protocol_cpp/message.pb.h', 'row': '9', 'col': '10'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '30', 'col': '17'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '31', 'col': '17'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'RelationServiceClientPool'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '52', 'col': '17'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '77', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '82', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'redis_mqinterface' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '87', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'MessageControl' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '93', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '100', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '104', 'col': '9'}
DEBUG:root: adding error {'error': "unknown type name 'Config_reader'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '108', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '112', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '132', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '137', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '143', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '149', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '165', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '171', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '176', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '181', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '186', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '190', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '192', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '197', 'col': '22'}
DEBUG:EasyClangComplete.plugin.error_vis: 1 error regions ready
DEBUG:EasyClangComplete.plugin.error_vis: showing error regions: [(6354, 6367), (4256, 4269), (6493, 6509), (4450, 4463), (2942, 2948), (4644, 4657), (3051, 3057), (4842, 4855), (3154, 3160), (3253, 3259), (1265, 1282), (1300, 1315), (3654, 3667), (3378, 3391), (5459, 5472), (3485, 3498), (5654, 5667), (3569, 3581), (5836, 5849), (2368, 2393), (6013, 6026), (6194, 6207), (6296, 6312)]
DEBUG:EasyClangComplete.plugin.view_config: starting timer to remove old configs.
DEBUG:EasyClangComplete.plugin.view_config: cancel old timer.
DEBUG:EasyClangComplete.plugin.view_config: [timer]: stop for view: 93
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([])
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 93
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([93])
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_modified_async view id 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: erasing error regions for view 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_modified_async view id 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_query_completions view id 93
DEBUG:EasyClangComplete.EasyClangComplete: prefix: _, locations: [23583]
DEBUG:EasyClangComplete.EasyClangComplete: this position has identifier: '(93, 23582)'
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.tools: no completions needed
DEBUG:EasyClangComplete.EasyClangComplete: completion not needed
DEBUG:EasyClangComplete.EasyClangComplete: showing default completions
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: erasing error regions for view 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_modified_async view id 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: erasing error regions for view 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_query_completions view id 93
DEBUG:EasyClangComplete.EasyClangComplete: prefix: , locations: [23600]
DEBUG:EasyClangComplete.EasyClangComplete: this position has identifier: '(93, 23600)'
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.tools: matched trigger '.'.
DEBUG:EasyClangComplete.EasyClangComplete: starting async auto_complete with id: (93, 23600)
DEBUG:EasyClangComplete.EasyClangComplete: showing default completions
DEBUG:EasyClangComplete.EasyClangComplete: on_modified_async view id 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.completion.lib_complete: started code complete for view 93
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: erasing error regions for view 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: code complete done in 0.04597187042236328 seconds
DEBUG:EasyClangComplete.plugin.completion.lib_complete: completions: []
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 737
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: saving view: 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 93
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
INFO:EasyClangComplete.plugin.view_config: init completer based on libclang
DEBUG:EasyClangComplete.plugin.completion.lib_complete: using bundled cindex: EasyClangComplete.clang.cindex38
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[generate new db]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: 'None'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load new]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[no new]: return None
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[get]: for file /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[cached]: '/Users/lau/git/xyz/live_user_message/.clang_complete'
DEBUG:EasyClangComplete.plugin.tools: searching '.clang_complete' from '/Users/lau/git/xyz/live_user_message/frontend/trunk/src' to '/Users/lau/git/xyz'
DEBUG:EasyClangComplete.plugin.tools: found '.clang_complete' file: /Users/lau/git/xyz/live_user_message/.clang_complete
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[current]: '/Users/lau/git/xyz/live_user_message/.clang_complete'
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]: found cached .clang_complete
DEBUG:EasyClangComplete.plugin.flags_sources.flags_file: [clang_complete_file]:[unchanged]: load cached
DEBUG:EasyClangComplete.plugin.view_config: flags generated from '.clang_complete'.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no update.
DEBUG:EasyClangComplete.plugin.view_config: config updates existing completer.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 93
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 0.04155302047729492 seconds
ERROR:EasyClangComplete.plugin.completion.compiler_variant:regex '(?P<file>.+)'.*line\s(?P<row>\d+), column\s(?P<col>\d+) failed to match location: <SourceLocation file None, line 0, column 0>
DEBUG:EasyClangComplete.plugin.error_vis: generating error regions for view 93
DEBUG:EasyClangComplete.plugin.error_vis: removing old error regions
DEBUG:root: adding error {'error': "'google/protobuf/stubs/common.h' file not found", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/../../../utils/message_parser/../../protocol_cpp/message.pb.h', 'row': '9', 'col': '10'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '30', 'col': '17'}
DEBUG:root: adding error {'error': 'expected namespace name', 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '31', 'col': '17'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'RelationServiceClientPool'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '52', 'col': '17'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '77', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'CensorChecker' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '82', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'redis_mqinterface' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '87', 'col': '9'}
DEBUG:root: adding error {'error': "deleting pointer to incomplete type 'MessageControl' may cause undefined behavior", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '93', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '100', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '104', 'col': '9'}
DEBUG:root: adding error {'error': "unknown type name 'Config_reader'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '108', 'col': '5'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '112', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '132', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '137', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '143', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '149', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '165', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '171', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '176', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '181', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'ERROR_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '186', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '190', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'DEBUG_LOG_SDS'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '192', 'col': '9'}
DEBUG:root: adding error {'error': "use of undeclared identifier 'string_to_uint32'", 'file': '/Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp', 'row': '197', 'col': '22'}
DEBUG:EasyClangComplete.plugin.error_vis: 1 error regions ready
DEBUG:EasyClangComplete.plugin.error_vis: showing error regions: [(6354, 6367), (4256, 4269), (6493, 6509), (4450, 4463), (2942, 2948), (4644, 4657), (3051, 3057), (4842, 4855), (3154, 3160), (3253, 3259), (1265, 1282), (1300, 1315), (3654, 3667), (3378, 3391), (5459, 5472), (3485, 3498), (5654, 5667), (3569, 3581), (5836, 5849), (2368, 2393), (6013, 6026), (6194, 6207), (6296, 6312)]
DEBUG:EasyClangComplete.plugin.view_config: starting timer to remove old configs.
DEBUG:EasyClangComplete.plugin.view_config: cancel old timer.
DEBUG:EasyClangComplete.plugin.view_config: [timer]: stop for view: 93
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([])
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 93
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([93])
This is strange. I can see that the plugin is working. It can compile your code and it even detects errors in your files for example in /Users/lau/git/xyz/live_user_message/frontend/trunk/src/message_front_processor.cpp. However, you are getting no completions, which is weird.
Are you able to complete a struct if you define it in the same file? Are you able to complete smth like std::?
I have test struct or std, both are ok. How weird it is!......Can that be sure the plugin has scan the dir that list in .clang_complete?
Please check that these files are actually there:
DEBUG:EasyClangComplete.plugin.completion.lib_complete: clang flags are: ['-c', '-fsyntax-only', '-x', 'c++', '-std=c++11', '-I/usr/include', '-I/Users/lau/git/xyz/src', '-I/usr/lib/clang/3.8/include', '-I/Users/lau/git/xyz/live_user_message/frontend/trunk/src', '-I/Users/lau/git/xyz/live_user_message/frontend/trunk', '-I/Users/lau/git/xyz/utility/config_reader', '-I/Users/lau/git/xyz/utility/cacheinterface']
It seems like the files are not there. It's ok if there are folders that don't exist, but make sure that folders with your headers are there.
Having relative paths in .clang_complete might be the problem? Maybe try using absolute path?
Sure. It can be. Please try with the absolute paths. Although, I am sure that the relative ones work as expected. There is a unit test for that.
Question is if OP knows what is expected :) I don't... so I put always absolute. Is is in relative to project path/.clang_complete file location/sublime start location/current file?
I am sure that folder and file path are ok. And I have try the absolute path, it not work well too. The relative path is to .clang_complete file, not to the location/sublime. In my case, each path of '/Users/lau/git/xyz/utility/config_reader' or '/Users/lau/git/xyz/utility/cacheinterface' is all ok on my compute.....
It is hard to believe this as these tests are performed on osx with Travis ci. This is really strange that there are no completions on your side. Does the code compile of you run it from terminal? Because clang seems to report quite a bit of errors in your other files.
Yes, the code compile fine by makefile. I guess clang report errors may be it can't find the include headers.
You can navigate to the files where clang reports errors and see what they are about. Otherwise, I really can't tell you much more because I cannot reproduce this. I need a minimal verifiable example of the issue.