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

Find all references and rename - #819

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 105 commits into
microsoft:masterfrom
MikhailArkhipov:refs
Apr 8, 2019
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 105 commits into
microsoft:masterfrom
MikhailArkhipov:refs

Conversation

@MikhailArkhipov

@MikhailArkhipov Mikhail Arkhipov (MikhailArkhipov) commented Mar 24, 2019 •

Copy link
Copy Markdown

Fixes #699
Fixes #454
Fixes #577
Fixes #645
Fixes #477
Fixes #829
Fixes #729
Fixes #830
Fixes #843
Fixes #865

  • Adds definition and reference tracking to ILocatedMember.
  • Eliminates creation of LocationInfo up front instead relying of remember originating expressions.
  • Add LocatedMember base to python types.
  • Track 'parent' definition of imported variables so there is definition in the current file (the import statement) and there is parent definition in the imported module (to go to on F12 in the import statement definition). There may be a chain of parents.
  • Instances do not track location.
  • Open, parse and inspect imports for candidates.
  • Load and analyze candidate files.
  • Analysis is now disposable and upon dispose cleans references to the module variables.
  • Tests.

Although the change is large, 90% is plumbing ILocatedMember to types. The remaining is calling ILocatedMember.AddReference in strategic places.

MikhailArkhipov added 30 commits March 1, 2019 09:51
This reverts commit 7ffc9db.
@MikhailArkhipov
Mikhail Arkhipov (MikhailArkhipov) merged commit 6a2bcac into microsoft:master Apr 8, 2019
@tiangolo

Copy link
Copy Markdown

I understand this fixed several issues like #577, but I guess it hasn't been released yet, right?

Where can I check releases to know when it is available (and if it is the case that I have a problem in my own environment)?

@MikhailArkhipov

Copy link
Copy Markdown
Author

It is released in the daily channel, but not in beta or stable yet as we'd like a bit more testing.

@tiangolo

Copy link
Copy Markdown

Ok, thank you.

Jake Bailey (jakebailey) pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
* Fix microsoft#668 (partial)

* Tests

* Revert "Tests"

This reverts commit 7ffc9db.

* Partial

* Part 2

* Part 3

* Part 4

* Part 4

* Part 5

* Analysis tests

* Tests

* Tests

* Basic test

* Tests

* Tests

* Tests

* Tests

* Tests

* Linked variables

* Tests

* Tests

* Tests

* Merge issues

* Fix merge issue

* Basic single file

* Handle closed files

* Closed files

* Tests

* Tests

* Fix 454

* Remove references on analysis change

* Rename

* Rename non-user code

* Linter

* Ref fix

* Member expressions

* Linter improvements

* Tests

* Definitions only for LHS

* Add test

* Add null checks and tests

* Null checks

* Fix variable leak in expressions with comprehensions

* Temp

* Fix scope lookup + test

* Handle virtual space

* Better handle nested sequence expression assignments

* More extensive handling of RHS sequences

* PR feedback

* Enable test

* Test stability

* Don't collect references to library modules

* Handle virtual envs

* PR feedback

* null check

* Remove references in all modules

* Add test

* Perf improvement

* Null check in tests

* Store span rather than node

* Fix AST associations with locations

* Handle null nodes

* Temp

* Add AST to nodes

* Variable refs

* Null ref

* Merge issues

* Handle import *

* Undo debug

* Merge issues

* Better handle variable

* Null check

* Better handle nested variables without location

* Fix rename test

* Usings

* Fix merge conflict
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants