Skip to content

All references are not listed when using ms language server #5917

Closed
@jahan01

Description

@jahan01

Environment data

  • VS Code version: latest
  • Extension version (available under the Extensions sidebar): 2019.5.18426
  • OS and version: Mac Os
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6 (Anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Language Server (more info How to update the language server to the latest stable version #3977): Language Server

constants.py

VARIABLE1 = 'afad'
VARIABLE2 = 'dcef'

use.py

from vscode_test.constants import *
from vscode_test import constants

print(VARIABLE1)
print(constants.VARIABLE2)

print(VARIABLE2)
print(constants.VARIABLE1)

Expected behaviour

All usages of the symbol to be listed under references when Right click -> Find All References on VARIABLE1 in constants.py

Actual behaviour

Doesn't list all usages when ms language server is used.
Usage of print(constants.VARIABLE1) in use.py isnt listed.

Looks like if symbol is imported directly, the reference is listed. If the symbol referenced via modules it isn't listed.

This issue seems to be recurring - why not have some tests for this ?

When Jedi is enabled it works as expected.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions