Skip to content

Conversation

@kinto0
Copy link
Contributor

@kinto0 kinto0 commented Jan 22, 2026

Summary:

This stack

This stack modifies the optimization for incremental updates found in the stack containing D90647539.

Original optimization: Use import statements alone to understand which imports a module uses

Problem: import foo will always invalidate foo

This stack will modify this optimization to instead track these dependencies based on usages during solve. Every type depended on from a module will be referenced in solve and we only will need to invalidate an entire module when there is an import *.

This diff

This new API on LookupExport allows us to track any time an import or attribute-lookup failed.

In the next diff, we will implement it in state.rs to add these failed exports to the map. Without these, our incremental system will not know what to invalidate.

Note: we have to track all export keys entirely, hence the tests in D91172436.

Differential Revision: D91173578

@meta-codesync
Copy link

meta-codesync bot commented Jan 22, 2026

@kinto0 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91173578.

@github-actions

This comment has been minimized.

Summary:

# This stack

This stack modifies the optimization for incremental updates found in the stack containing D90647539.

Original optimization: Use import statements alone to understand which imports a module uses

Problem: `import foo` will always invalidate `foo`

This stack will modify this optimization to instead track these dependencies based on usages during solve. Every type depended on from a module will be referenced in solve and we only will need to invalidate an entire module when there is an import *.

# This diff
This new API on `LookupExport` allows us to track any time an import or attribute-lookup failed.

In the next diff, we will implement it in `state.rs` to add these failed exports to the map. Without these, our incremental system will not know what to invalidate.

Note: we have to track all export keys entirely, hence the tests in D91172436.

Differential Revision: D91173578
@github-actions
Copy link

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant