ccls: Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting

image

Hi MaskRay, after I update emacs-ccls to 20181015.105, I get such errors as screenshot showing above when I use ccls with c/c++ project:

Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting
Warning (lsp-mode): Unknown method: $ccls/setSkippedRanges
Warning (lsp-mode): Unknown method: $ccls/publishSemanticHighlighting

OS/pacakge information:

  • emacs-ccls: 20181015.105
  • ccls: twlz0ne/ccls/ccls 0.20180924(installed with brew)
  • Emacs: GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31
  • OS: Mac os 10.13.6

Then I try to compile ccls from source, but doesn’t works either. This is the error message:

Scanning dependencies of target ccls
[  2%] Building CXX object CMakeFiles/ccls.dir/third_party/siphash.cc.o
[  4%] Building CXX object CMakeFiles/ccls.dir/src/clang_complete.cc.o
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.cc:16:
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.hh:18:
In file included from /Users/samray/code/cpp/ccls/src/clang_tu.hh:18:
In file included from /Users/samray/code/cpp/ccls/src/position.h:18:
In file included from /Users/samray/code/cpp/ccls/src/maybe.h:18:
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:184:1: error: unknown type name '_LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS'
_LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:185:1: error: expected unqualified-id
void __throw_bad_optional_access() {
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:199:1: error: unknown type name '_LIBCPP_INLINE_VAR'
_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:199:20: error: expected unqualified-id
_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
                   ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:932:5: error: unknown type name '_LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS'
    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
    ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:933:5: error: expected member name or ';' after declaration specifiers
    constexpr value_type const& value() const&
    ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:753:9: error: use of undeclared identifier 'reset'
        reset();
        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:817:9: error: use of undeclared identifier 'reset'
        reset();
        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:832:9: error: use of undeclared identifier 'reset'
        reset();
        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:853:17: error: use of undeclared identifier 'reset'
                reset();
                ^
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.cc:16:
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.hh:18:
In file included from /Users/samray/code/cpp/ccls/src/clang_tu.hh:18:
In file included from /Users/samray/code/cpp/ccls/src/position.h:18:
/Users/samray/code/cpp/ccls/src/maybe.h:50:17: error: no member named 'nullopt' in namespace 'std'
    return std::nullopt;
           ~~~~~^
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.cc:16:
In file included from /Users/samray/code/cpp/ccls/src/clang_complete.hh:23:
/Users/samray/code/cpp/ccls/src/threaded_queue.h:156:17: error: no member named 'nullopt' in namespace 'std'
    return std::nullopt;
           ~~~~~^
/Users/samray/code/cpp/ccls/src/clang_complete.cc:203:10: error: 'reset' is a private member of 'std::__1::__optional_destruct_base<ccls::Diag, false>'
    last.reset();
         ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:581:7: note: constrained by private inheritance here
    : private __optional_move_assign_base<_Tp>
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:236:10: note: member is declared here
    void reset() noexcept
         ^
/Users/samray/code/cpp/ccls/src/clang_complete.cc:203:5: error: cannot cast 'std::optional<Diag>' to its private base class 'std::__1::__optional_destruct_base<ccls::Diag, false>'
    last.reset();
    ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:581:7: note: constrained by private inheritance here
    : private __optional_move_assign_base<_Tp>
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 errors generated.
make[2]: *** [CMakeFiles/ccls.dir/src/clang_complete.cc.o] Error 1
make[1]: *** [CMakeFiles/ccls.dir/all] Error 2
make: *** [all] Error 2

Finally turning out that I could not solve this problem by my own, could you help me out ?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

if you find something useful in the clion workflow

Not yet except for visual debug(I am still not familiar with gdb, maybe csapp will offer a good chance to practice gdb). What I do recently is migrate eamcs wrokflow into jetbrains’, like M-x -> search everywhere, C-x u -> undo, C-x b -> switch between file/terminal. Jetbrains’ built-in emacs keybindings lack many essential maps. I’ll share with you if I found something interesting in clion/idea.