Skip to content

Wrong error log in multiple tools #1129

@MischaPanch

Description

@MischaPanch

In many tools, including FindSymbol we iterate over LS to retrieve the symbols. This relies on a wrong LS not retrieving anything, but a wrong LS will log an error.

The problematic code:

# in symbol.py
        for lang_server in self._ls_manager.iter_language_servers():
            symbol_roots = lang_server.request_full_symbol_tree(within_relative_path=within_relative_path)
            for root in symbol_roots:
                symbols.extend(
                    LanguageServerSymbol(root).find(
                        name_path_pattern, include_kinds=include_kinds, exclude_kinds=exclude_kinds, substring_matching=substring_matching
                    )
                )

and in solidlsp in request_full_symbol_tree

                if self.is_ignored_path(within_relative_path):
                    log.error("You passed a file explicitly, but it is ignored. This is probably an error. File: %s", within_relative_path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglogging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions