Skip to content

Incremental mode confusion about deleted module imported with import from #7277

Description

@msullivan

The following test produces no errors:

[case testDeletedModuleFromImport]
# flags: --ignore-missing-imports
from a import b
[file a/__init__.py]
[file a/b.py]
[delete a/b.py.2]

while it would if not incremental, saying that a has no attribute b.

The issue here is that the cache indicates that a.b is a module, and so we think of it as a missing module import, which we ignore, and not a missing attribute import, which we report.

This caused a divergence between incremental and full modes that broke our build.

(This seems similar to #4698 but I don't /think/ it is actually related.)

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions