Skip to content

Fix adding a class in a new module and using it #4761

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

Merged
merged 2 commits into from
Mar 20, 2018
Merged

Conversation

msullivan
Copy link
Collaborator

We add a field to AnyType indicating---if it was created because of a
failed import---what the full name of the imported name is (that is,
the name in the importing module).

An eventual better solution might be to always generate dependencies to the locally imported name of variables. That would fix #4512 as well.

We add a field to AnyType indicating---if it was created because of a
failed import---what the full name of the imported name is (that is,
the name in the importing module).
@msullivan msullivan requested a review from JukkaL March 20, 2018 00:59
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable fix for now. Agreed that generating dependencies from locally imported names would be a better long-term approach. I added one comment about additional test case.

@@ -603,3 +603,11 @@ from a import *
x = 0
[out]
<a[wildcard]> -> m

[case testMissingModuleClass]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try with an import from a package as well (such as from p.b import A) and using from p import *.

@msullivan msullivan merged commit b497216 into master Mar 20, 2018
@msullivan msullivan deleted the module_busted branch March 20, 2018 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reexported imports not tracked properly in fine-grained incremental mode
2 participants