niosus / EasyClangComplete

:boom: Robust C/C++ code completion for Sublime Text 3/4
https://niosus.github.io/EasyClangComplete/
MIT License
575 stars 78 forks source link

Cause plugin_host exit when rename file #191

Closed silva6 closed 7 years ago

silva6 commented 7 years ago

When I rename a file, this plugin will cause plugin_host exit. This error is as follows.

INFO:EasyClangComplete.plugin.view_config: init completer based on libclang Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 530, in on_activated_async callback.on_activated_async(v) File "/Users/lau/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/EasyClangComplete.py", line 137, in on_activated_async self.view_config_manager.load_for_view(view, settings) File "/Users/lau/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/view_config.py", line 341, in load_for_view res = self._cache[v_id].update_if_needed(view, settings) File "/Users/lau/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/view_config.py", line 89, in update_if_needed if ViewConfig.needs_reparse(view): File "/Users/lau/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/view_config.py", line 144, in needs_reparse if not File.is_unchanged(view.file_name()): File "/Users/lau/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/plugin/tools.py", line 216, in is_unchanged actual_mod_time = path.getmtime(file_path) File "./python3.3/genericpath.py", line 54, in getmtime FileNotFoundError: [Errno 2] No such file or directory: '/Users/lau/git/xxx/src/dao/FeedLikeDao.h' INFO:EasyClangComplete.plugin.view_config: init completer based on libclang error: plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted

I just change the name of "FeedLikeDao.h".

niosus commented 7 years ago

Yeah. Thanks for the help! :)

simia commented 7 years ago

Just a quick thought on way home - maybe it's due to reparsing file without having it first parsed?

simia commented 7 years ago

Ok. I think I've got the fix: if not self.tu or not self.tu.cursor.location.file: instead of: if not self.tu: in lib_complete.py:update()

Works for me. Would be nice if @silva6 could verify as well.

niosus commented 7 years ago

This seems logical to me. Really nice catch.

silva6 commented 7 years ago

@niosus @simia the fix is not work for me:(

startup, version: 3126 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/lau/Library/Application Support/Sublime Text 3/Packages
state path: /Users/lau/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/lau/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["Markdown", "SyncedSidebarBg"]
pre session restore time: 0.327782
using gpu buffer for window
first paint time: 0.398584
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
startup time: 0.562944
Error loading scope:source.tsx: Unable to find syntax file for scope source.tsx in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.scss: Unable to find syntax file for scope source.scss in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.coffee: Unable to find syntax file for scope source.coffee in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.less: Unable to find syntax file for scope source.less in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.scheme: Unable to find syntax file for scope source.scheme in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.swift: Unable to find syntax file for scope source.swift in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.sass: Unable to find syntax file for scope source.sass in Packages/MarkdownEditing/Markdown.tmLanguage
Error loading scope:source.ts: Unable to find syntax file for scope source.ts in Packages/MarkdownEditing/Markdown.tmLanguage
rule scope:source.scala#xml-comments has a scope name, but is unreachable, so the name will never be used
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Vintage.vintage
reloading plugin Vintage.vintage_commands
reloading plugin Vintage.vintage_motions
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.50-backrefs
reloading plugin 0_package_control_loader.50-dateutil
reloading plugin 0_package_control_loader.50-markupsafe
reloading plugin 0_package_control_loader.50-python-markdown
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin 0_package_control_loader.51-python-jinja2
reloading plugin 0_package_control_loader.55-mdpopups
reloading plugin All Autocomplete.all_views_completions
reloading plugin AutoFileName.autofilename
reloading plugin AutoFileName.getimageinfo
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_popup
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin BracketHighlighter.support
reloading plugin Clang Format.clang_format
reloading plugin CTags.ctags
reloading plugin CTags.ctagsplugin
reloading plugin CTags.test_ctags
reloading plugin CTags.test_ctagsplugin
reloading plugin DocBlockr.jsdocs
reloading plugin FileHeader.FileHeader
reloading plugin Git.git_commands
reloading plugin GitGutter-Edge.git_gutter
reloading plugin GitGutter-Edge.git_gutter_compare
reloading plugin GitGutter-Edge.git_gutter_events
reloading plugin GitGutter-Edge.git_gutter_handler
reloading plugin GitGutter-Edge.git_gutter_jump_to_changes
reloading plugin GitGutter-Edge.git_gutter_popup
reloading plugin GitGutter-Edge.git_gutter_settings
reloading plugin GitGutter-Edge.git_gutter_show_diff
reloading plugin GitGutter-Edge.git_helper
reloading plugin GitGutter-Edge.promise
reloading plugin Javascript Beautify.jsbeautify
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_settings
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin MarkdownEditing.bootstrap
reloading plugin MarkdownEditing.custom_find_under_expand
reloading plugin MarkdownEditing.decide_title
reloading plugin MarkdownEditing.distraction_free_mode
reloading plugin MarkdownEditing.footnotes
reloading plugin MarkdownEditing.indent_list_item
reloading plugin MarkdownEditing.indent_list_multiitem
reloading plugin MarkdownEditing.lint
reloading plugin MarkdownEditing.mdeutils
reloading plugin MarkdownEditing.numbered_list
reloading plugin MarkdownEditing.quote_indenting
reloading plugin MarkdownEditing.references
reloading plugin MarkdownEditing.switch_list_bullet_type
reloading plugin MarkdownEditing.underlined_headers
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin Rsync SSH.rsync_ssh
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SideBarEnhancements.Stats
reloading plugin Zen Tabs.TabsWorker
reloading plugin Zen Tabs.ZenTabs
reloading plugin Zen Tabs.ZenTabsTest
reloading plugin Anaconda.anaconda
reloading plugin Anaconda.setup
reloading plugin Anaconda.version
reloading plugin ConvertToUTF8.ConvertToUTF8
reloading plugin EasyClangComplete.EasyClangComplete
reloading plugin PlainTasks.APlainTasksCommon
reloading plugin PlainTasks.PlainTasks
reloading plugin PlainTasks.PlainTasksDates
reloading plugin PlainTasks.PlainTasksToHTML
reloading plugin PlainTasks.plist_parser
reloading plugin Pretty JSON.PrettyJson
reloading plugin Pretty JSON.PrettyJsonListeners
reloading plugin Terminal.Terminal
plugins loaded
Limit: 10
Full path: False
Highlight: True
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/Library/Developer/CommandLineTools/usr/include/c++/v1']'
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   <-- 'True'
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 143
DEBUG:EasyClangComplete.plugin.settings.settings_manager: no settings for view 143. 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/xxx/src'
DEBUG:EasyClangComplete.plugin.settings.settings_manager: settings initialized for view: 143
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: generate new config for path: 143
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
DEBUG:EasyClangComplete.clang.utils: we are on 'Darwin'
DEBUG:EasyClangComplete.clang.utils: searching for: 'libclang.dylib'
DEBUG: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 library file: '/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/../../libclang.dylib'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xxx/live_feeds/feed_like/src/cache' to '/Users/lau/git/xxx'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/feed_like/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: skipping file '<EasyClangComplete.plugin.tools.File object at 0x104f586d0>'. 
DEBUG:EasyClangComplete.plugin.tools: no line starts with: 'project'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: found needed line: 'project(live_feeds)
'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[generate new db]
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: Folder /var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9 exists.
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: prefix paths: []
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: merged paths: 
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: CMAKE_PREFIX_PATH: 
INFO:EasyClangComplete.plugin.flags_sources.cmake_file: running command: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON  "/Users/lau/git/xxx/live_feeds"
INFO:EasyClangComplete.plugin.flags_sources.cmake_file: cmake produced output: 
-- Configuring done
-- Generating done
-- Build files have been written to: /private/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9

DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeCache.txt'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/Users/lau/git/xxx/live_feeds/feed_like/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/Users/lau/git/xxx/live_feeds/feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeFiles/3.7.1/CMakeCCompiler.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeFiles/3.7.1/CMakeCXXCompiler.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeFiles/3.7.1/CMakeSystem.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeCInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeCXXInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeCommonLanguageInclude.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeGenericSystem.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeLanguageInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeSystemSpecificInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Compiler/AppleClang-C.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Compiler/AppleClang-CXX.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Compiler/Clang.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Compiler/GNU.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-AppleClang-C.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-AppleClang-CXX.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-Clang-C.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-Clang-CXX.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-Clang.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin-Initialize.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/Darwin.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/Platform/UnixPaths.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeFiles/cmake.check_cache'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/CMakeFiles/CMakeDirectoryInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/feeds/CMakeFiles/CMakeDirectoryInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/feed_like/CMakeFiles/CMakeDirectoryInformation.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/feeds/CMakeFiles/feeds.dir/DependInfo.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/feed_like/CMakeFiles/feed-like.dir/DependInfo.cmake'
DEBUG:EasyClangComplete.plugin.tools: updating modification time for file '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9' to '/'
DEBUG:EasyClangComplete.plugin.tools: found 'compile_commands.json' file: /var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load new]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: put into cache: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: return entry for 'all'.
DEBUG:EasyClangComplete.plugin.view_config: flags generated from 'CMakeLists.txt'.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 143
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/xxx/src', '-I/Library/Developer/CommandLineTools/usr/include/c++/v1', '-I/Users/lau/git/xxx/live_feeds/feed_like/src/cache', '-I/Users/lau/git/xxx/live_feeds/feed_like/src', '-I/Users/lau/git/xxx/utility', '-I/Users/lau/git/xxx/blade/thirdparty/jsoncpp/include', '-I/Users/lau/git/xxx/blade/thirdparty/relation_service_client-0.0.2/include', '-I/Users/lau/git/xxx/blade/thirdparty/redis3m-1.0.3/include', '-I/Users/lau/git/xxx/blade/common/mdriver-1.0.1/include', '-I/Users/lau/git/xxx/blade/thirdparty/boost-1.55.0/include', '-I/Users/lau/git/xxx/live_feeds/feeds/src', '-I/Users/lau/git/xxx/live_feeds/feeds/src/common', '-I/Users/lau/git/xxx/live_feeds/feeds/momo', '-I/Users/lau/git/xxx/live_feeds/feeds/reverse_geo_code', '-I/Users/lau/git/xxx/live_feeds/feeds/proto', '-I/Users/lau/git/xxx/live_feeds/feed_like/src/common', '-I/Users/lau/git/xxx/live_feeds/feed_like/src/mongoose', '-I/Users/lau/git/xxx/live_feeds/feed_like/proto']
DEBUG:EasyClangComplete.plugin.completion.lib_complete: compilation started for view id: 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: compilation done in 1.420781135559082 seconds
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 2.608489990234375 seconds
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.error_vis: generating error regions for view 143
DEBUG:root: adding error {'row': '8', 'file': '/Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h', 'col': '9', 'error': '#pragma once in main file'}
DEBUG:root: adding error {'row': '121', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'tm' in the global namespace"}
DEBUG:root: adding error {'row': '124', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwprintf' in the global namespace"}
DEBUG:root: adding error {'row': '125', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwscanf' in the global namespace"}
DEBUG:root: adding error {'row': '126', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'swprintf' in the global namespace"}
DEBUG:root: adding error {'row': '127', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vfwprintf' in the global namespace"}
DEBUG:root: adding error {'row': '128', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vswprintf' in the global namespace"}
DEBUG:root: adding error {'row': '130', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'swscanf' in the global namespace"}
DEBUG:root: adding error {'row': '131', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vfwscanf' in the global namespace"}
DEBUG:root: adding error {'row': '132', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vswscanf' in the global namespace"}
DEBUG:root: adding error {'row': '134', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fgetwc' in the global namespace"}
DEBUG:root: adding error {'row': '135', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fgetws' in the global namespace"}
DEBUG:root: adding error {'row': '136', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fputwc' in the global namespace"}
DEBUG:root: adding error {'row': '137', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fputws' in the global namespace"}
DEBUG:root: adding error {'row': '138', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwide' in the global namespace"}
DEBUG:root: adding error {'row': '139', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'getwc' in the global namespace"}
DEBUG:root: adding error {'row': '140', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'putwc' in the global namespace"}
DEBUG:root: adding error {'row': '141', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'ungetwc' in the global namespace"}
DEBUG:root: adding error {'row': '142', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'wcstod' in the global namespace"}
DEBUG:root: adding error {'row': '144', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'wcstof' in the global namespace"}
DEBUG:EasyClangComplete.plugin.error_vis: 1 error regions ready
DEBUG:EasyClangComplete.plugin.error_vis: showing error regions: [(131, 135)]
DEBUG:EasyClangComplete.plugin.view_config: starting timer to remove old configs.
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 143
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([143])
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: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 42
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: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 42
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 143
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 143
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/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xxx/live_feeds/feed_like/src/cache' to '/Users/lau/git/xxx'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/feed_like/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: skipping file '<EasyClangComplete.plugin.tools.File object at 0x104f6c750>'. 
DEBUG:EasyClangComplete.plugin.tools: no line starts with: 'project'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: found needed line: 'project(live_feeds)
'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]: found cached CMakeLists.txt.
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[unchanged]: use existing db.
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9' to '/'
DEBUG:EasyClangComplete.plugin.tools: found 'compile_commands.json' file: /var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: found cached compile_commands.json
DEBUG:EasyClangComplete.plugin.tools: never seen file '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json' before. Updating.
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load new]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: put into cache: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: return entry for 'all'.
DEBUG:EasyClangComplete.plugin.view_config: flags generated from 'CMakeLists.txt'.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no update.
DEBUG:EasyClangComplete.plugin.tools: never seen file '/Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h' before. Updating.
DEBUG:EasyClangComplete.plugin.view_config: config updates existing completer.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 0.3770439624786377 seconds
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.error_vis: generating error regions for view 143
DEBUG:EasyClangComplete.plugin.error_vis: removing old error regions
DEBUG:root: adding error {'row': '8', 'file': '/Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h', 'col': '9', 'error': '#pragma once in main file'}
DEBUG:root: adding error {'row': '121', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'tm' in the global namespace"}
DEBUG:root: adding error {'row': '124', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwprintf' in the global namespace"}
DEBUG:root: adding error {'row': '125', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwscanf' in the global namespace"}
DEBUG:root: adding error {'row': '126', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'swprintf' in the global namespace"}
DEBUG:root: adding error {'row': '127', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vfwprintf' in the global namespace"}
DEBUG:root: adding error {'row': '128', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vswprintf' in the global namespace"}
DEBUG:root: adding error {'row': '130', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'swscanf' in the global namespace"}
DEBUG:root: adding error {'row': '131', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vfwscanf' in the global namespace"}
DEBUG:root: adding error {'row': '132', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'vswscanf' in the global namespace"}
DEBUG:root: adding error {'row': '134', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fgetwc' in the global namespace"}
DEBUG:root: adding error {'row': '135', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fgetws' in the global namespace"}
DEBUG:root: adding error {'row': '136', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fputwc' in the global namespace"}
DEBUG:root: adding error {'row': '137', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fputws' in the global namespace"}
DEBUG:root: adding error {'row': '138', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'fwide' in the global namespace"}
DEBUG:root: adding error {'row': '139', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'getwc' in the global namespace"}
DEBUG:root: adding error {'row': '140', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'putwc' in the global namespace"}
DEBUG:root: adding error {'row': '141', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'ungetwc' in the global namespace"}
DEBUG:root: adding error {'row': '142', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'wcstod' in the global namespace"}
DEBUG:root: adding error {'row': '144', 'file': '/Library/Developer/CommandLineTools/usr/include/c++/v1/cwchar', 'col': '9', 'error': "no member named 'wcstof' in the global namespace"}
DEBUG:EasyClangComplete.plugin.error_vis: 1 error regions ready
DEBUG:EasyClangComplete.plugin.error_vis: showing error regions: [(131, 135)]
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: 143
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([])
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 143
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([143])
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 143
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 143
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/xxx/live_feeds/feed_like/src/cache/LikeCacheD.h
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xxx/live_feeds/feed_like/src/cache' to '/Users/lau/git/xxx'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/feed_like/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: skipping file '<EasyClangComplete.plugin.tools.File object at 0x104e77ed0>'. 
DEBUG:EasyClangComplete.plugin.tools: no line starts with: 'project'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: found needed line: 'project(live_feeds)
'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]: found cached CMakeLists.txt.
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[unchanged]: use existing db.
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCacheD
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9' to '/'
DEBUG:EasyClangComplete.plugin.tools: found 'compile_commands.json' file: /var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: found cached compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load cached]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: return entry for 'all'.
DEBUG:EasyClangComplete.plugin.view_config: flags generated from 'CMakeLists.txt'.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no update.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no reparse.
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: 143
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([])
DEBUG:EasyClangComplete.plugin.view_config: [timer]: start for view: 143
DEBUG:EasyClangComplete.plugin.view_config: [timer]: active for views: dict_keys([143])
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 143
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
ERROR:EasyClangComplete.plugin.view_config: view <sublime.View object at 0x104f6c090> is not valid. Cannot get config.
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: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 61
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: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 61
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: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 48
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.EasyClangComplete: on_activated_async view id 143
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 143
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.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.tools: file has valid syntax: `C++`
DEBUG:EasyClangComplete.plugin.view_config: config exists for path: 143
DEBUG:EasyClangComplete.plugin.error_vis: no error regions for row: 48
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCache.h
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'CMakeLists.txt' from '/Users/lau/git/xxx/live_feeds/feed_like/src/cache' to '/Users/lau/git/xxx'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/feed_like/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: skipping file '<EasyClangComplete.plugin.tools.File object at 0x10500e190>'. 
DEBUG:EasyClangComplete.plugin.tools: no line starts with: 'project'
DEBUG:EasyClangComplete.plugin.tools: found 'CMakeLists.txt' file: /Users/lau/git/xxx/live_feeds/CMakeLists.txt
DEBUG:EasyClangComplete.plugin.tools: found needed line: 'project(live_feeds)
'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[current]: '/Users/lau/git/xxx/live_feeds/CMakeLists.txt'
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]: found cached CMakeLists.txt.
DEBUG:EasyClangComplete.plugin.flags_sources.cmake_file: [cmake]:[unchanged]: use existing db.
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[get]: for file /Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCache
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[cached]: 'None'
DEBUG:EasyClangComplete.plugin.tools: searching 'compile_commands.json' from '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9' to '/'
DEBUG:EasyClangComplete.plugin.tools: found 'compile_commands.json' file: /var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[current]: '/var/folders/5q/sk26ccz51bv8xqky5dc_t6_r0000gn/T/EasyClangComplete/cmake_builds/73c0665ad9fa08e156712dc9146e52b9/compile_commands.json'
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: found cached compile_commands.json
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]:[load cached]
DEBUG:EasyClangComplete.plugin.flags_sources.compilation_db: [db]: return entry for 'all'.
DEBUG:EasyClangComplete.plugin.view_config: flags generated from 'CMakeLists.txt'.
DEBUG:EasyClangComplete.plugin.view_config: view config needs no update.
DEBUG:EasyClangComplete.plugin.tools: never seen file '/Users/lau/git/xxx/live_feeds/feed_like/src/cache/LikeCache.h' before. Updating.
DEBUG:EasyClangComplete.plugin.view_config: config updates existing completer.
DEBUG:EasyClangComplete.plugin.completion.lib_complete: view is 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsing translation_unit for view 143
DEBUG:EasyClangComplete.plugin.completion.lib_complete: reparsed in 0.013607025146484375 seconds
error: plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted
simia commented 7 years ago

Did you modify the if as I described and restart sublime (restart after changing lib_complete.py is essential)? Could you also add print under with Completer.rlock: print(self.tu) print(self.tu.cursor) print(self.tu.cursor.location) ?

silva6 commented 7 years ago

I just pull the latest code and restart sublime.

When add the 3 lines:

         with Completer.rlock:
+            print('tu:', self.tu)
+            print('tu.cursor:', self.tu.cursor)
+            print('tu.cursor.location:', self.tu.cursor.location)

The console output this:

tu: None
ERROR:EasyClangComplete.plugin.view_config: view became invalid in process of loading config.
simia commented 7 years ago

Ok. So I haven't put my changes into repo yet. Could you remove those print() calls and then replace: if not self.tu: with: if not self.tu or not self.tu.cursor.location.file:

in the same function?

silva6 commented 7 years ago

Amazing, It works for me now. Really nice! Thanks for helping!

niosus commented 7 years ago

@simia please do a small pull request to current master, so that I don't mess something up. I will release it today along with other fixes then. Or give me a link to the line I have to change.

simia commented 7 years ago

I can't make pr until I am back home. Line for change is: https://github.com/niosus/EasyClangComplete/blob/master/plugin/completion/lib_complete.py#L218

niosus commented 7 years ago

Thanks!

niosus commented 7 years ago

After another though, this is not a good solution as this causes us to recreate the whole translation unit as opposed to just reparsing it. This causes #198

I think I have a better solution and will push it soon.

niosus commented 7 years ago

Ok, just a small summary. The original solution was always recreating a translation unit even when it was a valid one, as the proposed tu.cursor.location.filename was always None. A new solution checks if self.tu.cursor.displayname is equal to view.file_name(). If they are different we must recreate a translation unit completely. If they are the same, then the translation unit is still valid and we can just reparse it.