Skip to content

Performance Refactor for the CodeGen, and readability cleanup - #29

Merged
carl-andersson-at-westermo merged 8 commits into
mainfrom
perf
Aug 24, 2026
Merged

carl-andersson-at-westermo merged 8 commits into
mainfrom
perf

Conversation

@carl-andersson-at-westermo

Copy link
Copy Markdown
Collaborator

No description provided.

The 'Performance regression check' job embedded in build.yml (Build and Test
workflow, triggers on every PR) was a leftover duplicate of the dedicated
benchmark.yml workflow created later. It still used the unpatched
rhysd/github-action-benchmark@v1 with no auto-push/skip-fetch-gh-pages
config, so its second github-action-benchmark invocation always failed with
a non-fast-forward git fetch on gh-pages (the same two-invocations-in-one-job
race already fixed in benchmark.yml). benchmark.yml already covers
publishing benchmark results on push to main, so this duplicate job is
removed rather than re-patched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wires up the previously-unused FeatureRichIncrementalScenario/
IncrementalGeneratorScenario infrastructure to 5 new [Benchmark] methods:
Incremental_NoOpRerun, Incremental_UnrelatedEdit,
Incremental_InjectedSignatureEdit, Incremental_AddInjection, and
Incremental_ReferenceAssemblyChange. These measure whether IDE-editing
(re-run on a warmed GeneratorDriver) recomputation is well-incrementalized,
as opposed to the existing Cold_* benchmarks which only measure first-run
cost.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
FindMethods checks type.AllInterfaces for [Inject] in addition to a type's
own attributes, and InjectAttribute's AttributeUsage explicitly allows
AttributeTargets.Interface - meaning a class can be discovered for
injection purely because it implements an [Inject]-attributed interface,
without [Inject] on the class itself. This pre-existing behavior had zero
test coverage. Added GeneratorPicksUpClassesViaAttributeAppliedToImplementedInterface
to pin it down before any future refactor of the type-discovery pipeline
(e.g. a ForAttributeWithMetadataName-based incremental rearchitecture)
could silently regress it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@carl-andersson-at-westermo
carl-andersson-at-westermo merged commit 91869a2 into main Aug 24, 2026
4 checks passed
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.

1 participant