Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Nov 17, 2025

Ideally, this shouldn't be needed, as we already cache inferType. However, since we have consistency checks that directly call inferCertainType, we need to cache it as well to avoid recomputation in nightly DCA.

Ideally, this shouldn't be needed, as we already cache `inferType`. However, since we
have consistency checks that directly call `inferCertainType`, we need to cache it
as well to avoid recomputation.
@github-actions github-actions bot added the Rust Pull requests that update Rust code label Nov 17, 2025
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Nov 17, 2025
@hvitved hvitved marked this pull request as ready for review November 17, 2025 09:01
@hvitved hvitved requested a review from a team as a code owner November 17, 2025 09:02
Copilot AI review requested due to automatic review settings November 17, 2025 09:02
Copilot finished reviewing on behalf of hvitved November 17, 2025 09:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds caching to the inferCertainType predicate in the Rust type inference library to avoid recomputation during nightly DCA (Dataflow Coverage Analysis). The change complements the existing caching of inferType, which is needed because consistency checks directly call inferCertainType.

  • Moved CachedStages import to top-level module scope
  • Added cached annotation to inferCertainType predicate
  • Added stage reference constraint to control evaluation timing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

nightly DCA (Dataflow Coverage Analysis)

Good guess, Copilot. Wrong, but good guess.


LGTM. I suspect the improvement won't affect most customers (since they have little reason to run the consistency checks), but its a nice improvement to have nonetheless.

@hvitved hvitved merged commit 68552f9 into github:main Nov 18, 2025
27 checks passed
@hvitved hvitved deleted the rust/cache-infer-certain-type branch November 18, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants