Skip to content

Fixed incremental cache busting issue#73

Merged
koenbeuk merged 1 commit into
mainfrom
fix/polyfill-generator-incremental-cache
Jun 4, 2026
Merged

Fixed incremental cache busting issue#73
koenbeuk merged 1 commit into
mainfrom
fix/polyfill-generator-incremental-cache

Conversation

@koenbeuk
Copy link
Copy Markdown
Collaborator

@koenbeuk koenbeuk commented Jun 4, 2026

Follow-up on #71, now targeting the polyfill interceptor generator

Copilot AI review requested due to automatic review settings June 4, 2026 00:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...iveSharp.Generator/PolyfillInterceptorGenerator.cs 90.47% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
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 fixes an incremental caching flaw in PolyfillInterceptorGenerator where cross-file type/member changes could leave previously-generated interceptors stale, and adds regression tests to ensure output stays correct while avoiding unnecessary downstream churn on unrelated edits.

Changes:

  • Reworks the polyfill interceptor incremental pipeline to recompute on compilation changes and value-gate AddSource on equatable generated source data.
  • Exposes a tracking-name constant (InterceptorSourcesTrackingName) to support incremental step assertions in tests.
  • Adds MSTest coverage for (1) cross-file type changes matching a fresh run and (2) unrelated edits not invalidating emitted interceptor sources.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/IncrementalCachingTests.cs Adds incremental caching regression tests for cross-file edits and unrelated edits.
src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs Fixes incremental caching by recomputing on compilation changes and gating emission via value-equatable generated sources (plus tracked step name).

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

@koenbeuk koenbeuk merged commit bb25846 into main Jun 4, 2026
18 checks passed
@koenbeuk koenbeuk deleted the fix/polyfill-generator-incremental-cache branch June 4, 2026 01:13
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.

2 participants