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

Analysis order based on import graph #135

Closed
AlexanderSher opened this issue Sep 25, 2018 · 3 comments
Closed

Analysis order based on import graph #135

AlexanderSher opened this issue Sep 25, 2018 · 3 comments
Assignees

Comments

@AlexanderSher
Copy link
Contributor

GetEntriesThatImportModule is required to queue dependent modules for reanalysis when the dependency has changed. If dependent module analysis isn't finished, GetEntriesThatImportModule skips it.

@MikhailArkhipov MikhailArkhipov self-assigned this Nov 5, 2018
@MikhailArkhipov
Copy link

I am going to rename it since we should not need to reanalyze - if we know the import order based on graph for #12, #71 we should just analyze in order from root to leaves. Which will also fix #163

@MikhailArkhipov MikhailArkhipov changed the title Make GetEntriesThatImportModule use AST instead of IModuleAnalysis Analyze entries based on import graph Nov 5, 2018
@MikhailArkhipov MikhailArkhipov added this to the Nov 2018.2 milestone Nov 5, 2018
@lostmsu
Copy link
Contributor

lostmsu commented Nov 12, 2018

I am experiencing an issue where in some cases, ClassInfo.Bases[0] keeps pointing to empty analysis set, when the code looks like this:

from module import BaseClass

class DerivedClass(BaseClass):
  ...

After analysis is finished, I can query variable BaseClass in module, and it will show user class .... However, DerivedClass.Bases[0] is still pointing to an instance of AnalysisSetEmptyObject.

The above import for the first time is analyzed before BaseClass, however, DerivedClass bases are never reanalyzed after that.

I wonder, if this is the root cause for this behavior.

@MikhailArkhipov MikhailArkhipov changed the title Analyze entries based on import graph Analysis order based on import graph Nov 27, 2018
@MikhailArkhipov MikhailArkhipov removed this from the Dec 2018.1 milestone Nov 27, 2018
@MikhailArkhipov
Copy link

#432

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants