pilat / vscode-importmagic

MIT License
36 stars 7 forks source link

Unable to find symbols in the current workspace #15

Open Hiestaa opened 5 years ago

Hiestaa commented 5 years ago

First of all thank you for putting this extension together, makes the python dev workflow even more enjoyable than programming in python can be. That being said, I have a minor issue.

Problem Description

I installed importmagic which works great for any standard library import or other modules installed via pip in the current virtual environment installed in a .env directory, but isn't able to find any of the modules of my current project.

Solution Attempts (that didn't work)

For instance if I have a localpackage ./foo/bar.py that contains a symbol class Bar, and I specify the path ./foo in python.autoComplete.extraPaths, importmagic will add the statement from bar import Bar instead of the expected from foo.bar import Bar.

How to reproduce

I am unfortunately not able to reduce my setup to a minimal configuration without wasting several hours of setup time. The problem is likely in my setup, not a bug of importmagic but I'm hoping to get some indication to help me troubleshoot my setup by answering a few questions

Questions

  1. Where is the index file stored? Looking at the index might help me figure out why the symbols from my local project aren't discovered by importmagic.
  2. Is there any limitation that could likely prevent importmagic from discovering the symbols in my project? Some particular folder structure I should follow?
  3. Should it be possible for me make my local project appear as extra module by somehow specifying it to python.autoComplete.extraPaths? It only seems to work, with the caveats I mentioned above, when the path of some packages (folders) of my local project are specified in there.

Thanks for the help! It would be really lovely to be able to use this extension to its fullest capabilities!

milescui commented 5 years ago

I have the same problem