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

hovering a method causes error dialog #469

Closed notnullnotvoid closed 6 years ago

notnullnotvoid commented 6 years ago

System info:

What happens:

Howevering over a method name causes an error dialog to come up with the following message:

EasyClangComplete:
"use_libclang" is false
"show_type_info" is true.

Unfortunately, there is no way to show type info
if you are not using libclang.

Please use libclang or set "show_type_info" to false.

If you *are* using libclang and still see this, open an issue.

This happens consistently with every source file I've tried.

Here is the console log: https://pastebin.com/YRrdCTZS And here is my EasyClangComplete.sublime-settings: https://pastebin.com/gknWYC7C

Console log ``` startup, version: 3176 osx x64 channel: stable executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text working dir: / packages path: /Users/stuntddude/Library/Application Support/Sublime Text 3/Packages state path: /Users/stuntddude/Library/Application Support/Sublime Text 3/Local zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages zip path: /Users/stuntddude/Library/Application Support/Sublime Text 3/Installed Packages ignored_packages: ["Anaconda", "Clang-Complete", "PyV8", "SideBarEnhancements", "TCL", "Vintage"] pre session restore time: 0.243532 using gpu buffer for window using gpu buffer for window using gpu buffer for window startup time: 0.447916 environment variables loaded using: /bin/zsh -l reloading plugin Default.arithmetic reloading plugin Default.auto_indent_tag reloading plugin Default.block reloading plugin Default.colors reloading plugin Default.comment reloading plugin Default.convert_color_scheme 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.rename 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 Default.ui reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin ShellScript.ShellScript 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-markupsafe reloading plugin 0_package_control_loader.50-pymdownx reloading plugin 0_package_control_loader.50-python-markdown reloading plugin 0_package_control_loader.50-pyyaml reloading plugin 0_package_control_loader.50-regex reloading plugin 0_package_control_loader.51-python-jinja2 reloading plugin 0_package_control_loader.55-mdpopups reloading plugin AdvancedNewFile.AdvancedNewFile reloading plugin Alignment.Alignment 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 Color Highlighter.color_converter reloading plugin Color Highlighter.color_highlighter reloading plugin Color Highlighter.color_hover_listener reloading plugin Color Highlighter.color_scheme reloading plugin Color Highlighter.color_scheme_color_highlighter reloading plugin Color Highlighter.color_searcher reloading plugin Color Highlighter.color_selection_listener reloading plugin Color Highlighter.colors reloading plugin Color Highlighter.content_listener reloading plugin Color Highlighter.convert_color_command reloading plugin Color Highlighter.css_colors reloading plugin Color Highlighter.dummy_event_listener reloading plugin Color Highlighter.gutter_icons_color_highlighter reloading plugin Color Highlighter.load_resource reloading plugin Color Highlighter.main reloading plugin Color Highlighter.path reloading plugin Color Highlighter.phantoms_color_highlighter reloading plugin Color Highlighter.pick_color_command reloading plugin Color Highlighter.regex_compiler reloading plugin Color Highlighter.regions reloading plugin Color Highlighter.set_setting_command reloading plugin Color Highlighter.settings reloading plugin Color Highlighter.st_helper reloading plugin Color Highlighter.topsort reloading plugin DoxyDoc.doxydoc reloading plugin Emmet.emmet-plugin reloading plugin Gist.gist_05_import reloading plugin Gist.gist_20_exceptions reloading plugin Gist.gist_40_request reloading plugin Gist.gist_60_helpers reloading plugin Gist.gist_80 reloading plugin Gist.gitio reloading plugin GitGutter.plugin reloading plugin Hasher.hasher reloading plugin Package Control.1_reloader reloading plugin Package Control.2_bootstrap reloading plugin Package Control.Package Control reloading plugin PackageResourceViewer.package_resource_viewer reloading plugin PackageResourceViewer.package_resources reloading plugin RegReplace.rr_edit reloading plugin RegReplace.rr_notify reloading plugin RegReplace.rr_plugin reloading plugin RegReplace.rr_replacer reloading plugin RegReplace.rr_sequencer reloading plugin RegReplace.rr_upgrade reloading plugin RegReplace.support reloading plugin Text Pastry.text_pastry reloading plugin Text Pastry.text_pastry_addons reloading plugin Text Pastry.text_pastry_clipboard reloading plugin Text Pastry.text_pastry_selection reloading plugin Themr.themr reloading plugin ASCII Decorator.ASCII Decorator Couldn't load pkg_resources reloading plugin ASCII Decorator.subcomments reloading plugin ASCII Decorator.subfiglet reloading plugin EasyClangComplete.EasyClangComplete reloading plugin SublimeREPL.__init__ reloading plugin SublimeREPL.completions reloading plugin SublimeREPL.lang_integration reloading plugin SublimeREPL.run_existing_command reloading plugin SublimeREPL.sublimerepl reloading plugin SublimeREPL.sublimerepl_build_system_hack reloading plugin SublimeREPL.text_transfer reloading plugin Terminal.Terminal plugins loaded [ECC:DEBUG]:[settings_storage.py]:[need_reparse]:[MainThread]: settings complete [ECC:DEBUG]:[tools.py]:[is_valid_view]:[MainThread]: view file_name is None [ECC:DEBUG]:[tools.py]:[is_valid_view]:[Dummy-5]: view file_name is None Emmet: No need to update PyV8 [ECC:DEBUG]:[EasyClangComplete.py]:[on_activated_async]:[Dummy-5]: on_activated_async view id 64 [ECC:DEBUG]:[settings_manager.py]:[settings_for_view]:[Dummy-5]: no settings for view 64. Reinitializing. [ECC:DEBUG]:[settings_storage.py]:[__load_vars_from_settings]:[Dummy-5]: Overriding settings by project ones if needed: [ECC:DEBUG]:[settings_storage.py]:[__load_vars_from_settings]:[Dummy-5]: Valid prefixes: ['ecc_', 'easy_clang_complete_'] [ECC:DEBUG]:[settings_storage.py]:[__load_vars_from_settings]:[Dummy-5]: Reading settings... [ECC:DEBUG]:[settings_storage.py]:[__load_vars_from_settings]:[Dummy-5]: Settings sucessfully read... [ECC:INFO]:[tools.py]:[get_clang_version_str]:[Dummy-5]: Getting version from command: `clang++ -v` [ECC:DEBUG]:[settings_storage.py]:[__populate_common_flags]:[Dummy-5]: populating common_flags with current variables. [ECC:DEBUG]:[settings_storage.py]:[__replace_wildcard_if_needed]:[Dummy-5]: populated '-I$project_base_path/src' to '-I/Users/stuntddude/Dropbox/c/DIWide/src' [ECC:DEBUG]:[settings_storage.py]:[__replace_wildcard_if_needed]:[Dummy-5]: populated '-I/usr/lib/clang/$clang_version/include' to '-I/usr/lib/clang/3.8.0/include' [ECC:DEBUG]:[settings_manager.py]:[__init_for_view]:[Dummy-5]: settings initialized for view: 64 [ECC:DEBUG]:[view_config.py]:[load_for_view]:[Thread-6]: generate new config for path: 64 [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: init completer based on libclang [ECC:DEBUG]:[lib_complete.py]:[__init__]:[Thread-6]: using bundled cindex: EasyClangComplete.plugin.clang.cindex38 [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: platform: ('64bit', '') [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: python version: 3.3.6 [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: we are on 'Darwin' [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: user provided libclang_path: [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: searching for: 'libclang.dylib' [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: libclang search output = '/usr/local/bin/../lib/clang/3.8.0' [ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: real output: /usr/local/bin/../lib/clang/3.8.0 [ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: folder to search: /usr/local/bin/../lib/clang/3.8.0/../.. [ECC:WARNING]:[utils.py]:[find_libclang_dir]:[Thread-6]: clang could not find 'libclang.dylib' [ECC:ERROR]:[utils.py]:[find_libclang_dir]:[Thread-6]: no libclang found at all [ECC:ERROR]:[lib_complete.py]:[__init__]:[Thread-6]: error: dlsym(RTLD_DEFAULT, clang_annotateTokens): symbol not found. Please ensure that your python bindings are compatible with your libclang.so version. [ECC:ERROR]:[view_config.py]:[__init_completer]:[Thread-6]: cannot initialize completer with libclang. [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: falling back to using clang in a subprocess. [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: init completer based on clang from cmd [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'CMakeLists.txt' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[current]: 'None' [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[generate new db] [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'compile_commands.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[current]: 'None' [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[load new] [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[no new]: return None [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'CppProperties.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[current]: 'None' [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'c_cpp_properties.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[current]: 'None' [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching '.clang_complete' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[current]: 'None' [ECC:DEBUG]:[bin_complete.py]:[run_clang_command]:[Thread-6]: clang command: ['clang++', '-c', '-fsyntax-only', '-x', 'c++', '-std=c++11', '-I/usr/include', '-I/Users/stuntddude/Dropbox/c/DIWide/src', '-I/usr/lib/clang/3.8.0/include', '-I/Users/stuntddude/Dropbox/c/DIWide', '/var/folders/tt/s2wy3sn12fqgbv74yqf5f0jc0000gn/T/EasyClangComplete/main.cpp'] [ECC:DEBUG]:[bin_complete.py]:[update]:[Thread-6]: rebuilding done in 0.05399203300476074 seconds [ECC:DEBUG]:[popup_error_vis.py]:[generate]:[Thread-6]: generating error regions for view 64 [ECC:DEBUG]:[popup_error_vis.py]:[generate]:[Thread-6]: 1 error regions ready [ECC:DEBUG]:[popup_error_vis.py]:[show_errors]:[Thread-6]: showing error regions: [] [ECC:DEBUG]:[EasyClangComplete.py]:[config_updated]:[Thread-6]: updated config: Package Control: Skipping automatic upgrade, last run at 2018-05-22 22:21:27, next run at 2018-05-22 23:21:27 or after [ECC:DEBUG]:[view_config.py]:[get_from_cache]:[Thread-6]: config exists for view: 64 [ECC:DEBUG]:[view_config.py]:[get_from_cache]:[Thread-6]: config: error: EasyClangComplete: "use_libclang" is false "show_type_info" is true. Unfortunately, there is no way to show type info if you are not using libclang. Please use libclang or set "show_type_info" to false. If you *are* using libclang and still see this, open an issue. exception calling callback for Traceback (most recent call last): File "./python3.3/concurrent/futures/_base.py", line 296, in _invoke_callbacks File "/Users/stuntddude/Library/Application Support/Sublime Text 3/Packages/EasyClangComplete/EasyClangComplete.py", line 408, in info_finished (tooltip_request, current_popup) = future.result() TypeError: 'NoneType' object is not iterable [ECC:DEBUG]:[EasyClangComplete.py]:[on_activated_async]:[Dummy-5]: on_activated_async view id 64 [ECC:DEBUG]:[view_config.py]:[load_for_view]:[Thread-6]: config exists for path: 64 [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: init completer based on libclang [ECC:DEBUG]:[lib_complete.py]:[__init__]:[Thread-6]: using bundled cindex: EasyClangComplete.plugin.clang.cindex38 [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: platform: ('64bit', '') [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: python version: 3.3.6 [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: we are on 'Darwin' [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: user provided libclang_path: [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: searching for: 'libclang.dylib' [ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: libclang search output = '/usr/local/bin/../lib/clang/3.8.0' [ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: real output: /usr/local/bin/../lib/clang/3.8.0 [ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: folder to search: /usr/local/bin/../lib/clang/3.8.0/../.. [ECC:WARNING]:[utils.py]:[find_libclang_dir]:[Thread-6]: clang could not find 'libclang.dylib' [ECC:ERROR]:[utils.py]:[find_libclang_dir]:[Thread-6]: no libclang found at all [ECC:ERROR]:[lib_complete.py]:[__init__]:[Thread-6]: error: dlsym(RTLD_DEFAULT, clang_annotateTokens): symbol not found. Please ensure that your python bindings are compatible with your libclang.so version. [ECC:ERROR]:[view_config.py]:[__init_completer]:[Thread-6]: cannot initialize completer with libclang. [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: falling back to using clang in a subprocess. [ECC:INFO]:[view_config.py]:[__init_completer]:[Thread-6]: init completer based on clang from cmd [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'CMakeLists.txt' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[current]: 'None' [ECC:DEBUG]:[cmake_file.py]:[get_flags]:[Thread-6]: [cmake]:[generate new db] [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'compile_commands.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[current]: 'None' [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[load new] [ECC:DEBUG]:[compilation_db.py]:[get_flags]:[Thread-6]: [db]:[no new]: return None [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'CppProperties.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[CppProperties.py]:[get_flags]:[Thread-6]: [CppProperties]:[current]: 'None' [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching 'c_cpp_properties.json' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[c_cpp_properties.py]:[get_flags]:[Thread-6]: [c_cpp_properties]:[current]: 'None' [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[get]: for file /Users/stuntddude/Dropbox/c/DIWide/src/main.cpp [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[cached]: 'None' [ECC:DEBUG]:[tools.py]:[search]:[Thread-6]: searching '.clang_complete' from '/Users/stuntddude/Dropbox/c/DIWide/src' to '/Users/stuntddude/Dropbox/c/DIWide' [ECC:DEBUG]:[flags_file.py]:[get_flags]:[Thread-6]: [clang_complete_file]:[current]: 'None' [ECC:DEBUG]:[view_config.py]:[needs_update]:[Thread-6]: view config needs no update. [ECC:DEBUG]:[tools.py]:[is_unchanged]:[Thread-6]: never seen file '/Users/stuntddude/Dropbox/c/DIWide/src/main.cpp' before. Updating. [ECC:DEBUG]:[view_config.py]:[update_if_needed]:[Thread-6]: config updates existing completer. [ECC:DEBUG]:[bin_complete.py]:[run_clang_command]:[Thread-6]: clang command: ['clang++', '-c', '-fsyntax-only', '-x', 'c++', '-std=c++11', '-I/usr/include', '-I/Users/stuntddude/Dropbox/c/DIWide/src', '-I/usr/lib/clang/3.8.0/include', '-I/Users/stuntddude/Dropbox/c/DIWide', '/var/folders/tt/s2wy3sn12fqgbv74yqf5f0jc0000gn/T/EasyClangComplete/main.cpp'] [ECC:DEBUG]:[bin_complete.py]:[update]:[Thread-6]: rebuilding done in 0.051542043685913086 seconds [ECC:DEBUG]:[popup_error_vis.py]:[generate]:[Thread-6]: generating error regions for view 64 [ECC:DEBUG]:[popup_error_vis.py]:[generate]:[Thread-6]: removing old error regions [ECC:DEBUG]:[popup_error_vis.py]:[generate]:[Thread-6]: 1 error regions ready [ECC:DEBUG]:[popup_error_vis.py]:[show_errors]:[Thread-6]: showing error regions: [] [ECC:DEBUG]:[EasyClangComplete.py]:[config_updated]:[Thread-6]: updated config: [ECC:DEBUG]:[tools.py]:[is_valid_view]:[Dummy-5]: view file_name is None [ECC:DEBUG]:[tools.py]:[is_valid_view]:[Dummy-5]: view file_name is None ```

My user settings file for the package is empty, and there is no project-specific settings file either. So presumably the settings (including ""use_libclang" : true) are not being overridden.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/58710565-hovering-a-method-causes-error-dialog?utm_campaign=plugin&utm_content=tracker%2F32731927&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F32731927&utm_medium=issues&utm_source=github).
niosus commented 6 years ago

Ok, so the reason for this is that somehow the plugin cannot detect proper version of clang. I will have to look a bit at why this can be the case. I don't see any errors that are usually present in the log if macOS cannot find clang.

niosus commented 6 years ago

Wait, I am confused on this. Are you using the version of libclang from llvm or from Apple? The output usually looks differently on macOS

notnullnotvoid commented 6 years ago

Running clang --version gives:

clang version 3.8.0 (tags/checker/checker-278)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /usr/local/bin

As far as I know, this is the version I got from installing xcode.

niosus commented 6 years ago

I think the relevant lines in the log are these:

[ECC:DEBUG]:[utils.py]:[find_libclang_dir]:[Thread-6]: libclang search output = '/usr/local/bin/../lib/clang/3.8.0'
[ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: real output: /usr/local/bin/../lib/clang/3.8.0
[ECC:DEBUG]:[utils.py]:[dir_from_output]:[Thread-6]: folder to search: /usr/local/bin/../lib/clang/3.8.0/../..
[ECC:WARNING]:[utils.py]:[find_libclang_dir]:[Thread-6]:  clang could not find 'libclang.dylib'
[ECC:ERROR]:[utils.py]:[find_libclang_dir]:[Thread-6]: no libclang found at all

Can you check if the library is in those folders somewhere?

notnullnotvoid commented 6 years ago

There's no libclang.dylib in that folder, but there is one at /Library/Developer/CommandLineTools/usr/lib/libclang.dylib

niosus commented 6 years ago

What if you explicitly set the path to the libclang library in the settings of the plugin?

notnullnotvoid commented 6 years ago

If I set "libclang_path": "/Library/Developer/CommandLineTools/usr/lib/libclang.dylib" then it works. I guess libclang.dylib just ended up in an unexpected place.

niosus commented 6 years ago

Ok, I'm glad that it works, I will close this issue for now, but will need to investigate if it happens more often.