Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Go to definition doesn't work with files inside venv #1653

Closed
aliev opened this issue Oct 9, 2019 · 2 comments
Closed

Go to definition doesn't work with files inside venv #1653

aliev opened this issue Oct 9, 2019 · 2 comments

Comments

@aliev
Copy link

aliev commented Oct 9, 2019

Environment data

  • Language Server version: 0.4.58.0
  • OS and version: 10.15 (19A583)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.5.5, pyenv, venv

Expected behaviour

Go to definition should work for venv files as well.

Actual behaviour

Setup env:

mkdir Hello && cd Hello
pyenv shell 3.5.5
python -mvenv .env
source .env/bin/activate
pip install django
code .

Steps to reproduce:

Create new file main.py

Add new import:
from django.http import HttpResponse <- Click on "Go to definition from context menu"
...http/init.py will be opened
from django.http.cookie import SimpleCookie, parse_cookie <- Click on "Go to definition"
Nothing happens

Logs

https://gist.github.com/aliev/c1cbeb1c9a9e687796e70ed297eecc0b

@MikhailArkhipov
Copy link

MikhailArkhipov commented Oct 9, 2019

This is currently by design. We do not preserve content, AST (parse tree) or navigation information within libraries in order to conserve memory. It can be made an option if memory consumption is not a concern.

@MikhailArkhipov
Copy link

#840 is primary

@judej judej closed this as completed Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants