tweekmonster / deoplete-clang2

MIT License
90 stars 17 forks source link

deolete deprecated "debug_enabled" #22

Closed codemonkey800 closed 6 years ago

codemonkey800 commented 6 years ago

A recent commit from Shougo deprecates debug_enabled: https://github.com/Shougo/deoplete.nvim/commit/ba4d03e937309bab540c8d091a0fdd7042ea8b16

I'm getting the following error:

[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 136, in gather_results
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 596, in gather_candidates
[deoplete]     return list(self.gather_includes(context))
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 586, in gather_includes
[deoplete]     _, flags = self.build_flags(context)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 505, in build_flags
[deoplete]     flags = self.get_clang_flags(lang) + flags
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 226, in get_clang_flags
[deoplete]     stdout = self.call_clang([], clang_flags, True)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 321, in call_clang
[deoplete]     elif self.debug_enabled and stderr.strip():
[deoplete] AttributeError: 'Source' object has no attribute 'debug_enabled'
[deoplete] Could not get completions from: clang2.  Use :messages for error details.

And the problem line:

https://github.com/tweekmonster/deoplete-clang2/blob/787dd4dc7eeb5d1bc2fd3cefcf7bd07e48f4a962/rplugin/python3/deoplete/sources/deoplete_clang2.py#L321

codemonkey800 commented 6 years ago

As pointed out in https://github.com/SpaceVim/SpaceVim/issues/1077, debug_enabled has been added back in for compatibility: https://github.com/Shougo/deoplete.nvim/commit/69d68813c531a8fb550ae95e16e26210684c1f84.