Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense and Code navigation fails in New language when using package names #2153

Closed
DonJayamanne opened this issue Jul 13, 2018 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@DonJayamanne
Copy link

DonJayamanne commented Jul 13, 2018

Environment data

  • VS Code version: Insiders
  • Extension version (available under the Extensions sidebar): Master
  • OS and version: Mac
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

Actual behavior

  • Code navigation does not work
  • Intellisense does not work

Expected behavior

Code navigation should work.

Steps to reproduce:

  1. Open an empty folder in VSC
  2. Create a folder mypkg1
  3. Add empty __init__.py and __main__.py files in the above mypkg1 dir
  4. Add a file named bar.py in the above directory with the following contents:
def do_something():
   pass
  1. Create a file named foo.py in the above directory with the following contents:
from mypkg1.bar import do_something


do_something()
  1. Note, while typing from mypkg1. there's no auto completion (intellisense). This works in Jedi.
  2. Try to go to definition of do_something, will not go into bar.py file.
  3. Notice the squigglies under mymod1.bar.
  4. Message in Problems window is
    [Python (analysis)] Unable to resolve 'mymod1.bar'. IntelliSense may be missing for this module.

This works in Jedi, both intellisense and code navigation.

FYI - This was identified while working on PTVSD.

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug needs PR labels Jul 13, 2018
@DonJayamanne DonJayamanne changed the title New language server cannot locate modules Code navigation fails in New language when using package names Jul 13, 2018
@DonJayamanne DonJayamanne changed the title Code navigation fails in New language when using package names Intellisense and Code navigation fails in New language when using package names Jul 13, 2018
@MikhailArkhipov
Copy link

I think this might be microsoft/PTVS#4524
You'll need new insiders build as we are changing assembly names.

@DonJayamanne
Copy link
Author

I do have the insiders build, deleted everything and started again (the new files are under languageServer).

@brettcannon
Copy link
Member

@DonJayamanne I think #2144 might need to be merged to get the latest language server

@brettcannon brettcannon added the important Issue identified as high-priority label Aug 2, 2018
@leandrorebelo
Copy link

leandrorebelo commented Aug 5, 2018

I have the same problem.

The vscode and language server are updated.

vscode version: 1.25.1
Architecture: x64

@PEKTOP
Copy link

PEKTOP commented Aug 15, 2018

I have the same problem.

Version: 1.26.0
Commit: 4e9361845dc28659923a300945f84731393e210d
Date: 2018-08-13T16:25:59.521Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@Zlass
Copy link

Zlass commented Aug 15, 2018

Seems to be fixed in the latest version of the insider build, but is broken for the July release.

Working Version: 1.27.0-insider
Commit: ffa660576d3a8da3f6cf9b94cbfb879632688ebd
Date: 2018-08-15T05:05:32.890Z

@mnunezdm
Copy link

mnunezdm commented Aug 15, 2018

Just tried with that insiders build and still having this issue...

@MikhailArkhipov MikhailArkhipov self-assigned this Aug 21, 2018
@hologerry
Copy link

I have the same problem.

vscode version: 1.26.1
Architecture: x64

@gustavomf-cit
Copy link

i have the same problem too

@timesync
Copy link

I'm having the exact same problem. And this just happened with the latest update (not Insiders, just the regular stable build).

vscode version: 1.26.1
Architecture: x64

@coder3101
Copy link

Yes, Exactly the same issue on v1.26.1 on x64. Linux

@ghost
Copy link

ghost commented Aug 29, 2018

I'm have the same issue also on Windows. My version is also v1.26.1

@brettcannon
Copy link
Member

This is at least fixed in the latest language server and the development build of the extension:

example

If that example is not demonstrating what people are bumping up against then please provide a zip file and clear instructions or video of what's going on.

@ryzencool

This comment has been minimized.

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests