Skip to content

Bbundled annotation type reachability - #182

Merged
feO2x merged 3 commits into
mainfrom
181-bundled-annotation-type-reachability
Jul 24, 2026
Merged

Bbundled annotation type reachability#182
feO2x merged 3 commits into
mainfrom
181-bundled-annotation-type-reachability

Conversation

@feO2x

Copy link
Copy Markdown
Owner

Closes#181

Also addresses the non-JetBrains attributes.

feO2xand others added 3 commits July 24, 2026 23:17
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
The annotation reachability trimmer established reachability from attribute
usages only, but a using alias names its target type as well. Whenever no
[NotNull] usage survived cleanup, the code-analysis NotNullAttribute polyfill
was trimmed while the alias directive that names it remained, which does not
compile - reproducible with a netstandard2.0 whitelist export that retains no
annotated assertion.
Bind the target of every alias directive and mark the bundled type it resolves
to, using the same degraded-binding fallback as attribute usages, so a failed
binding keeps too much rather than too little.
Compile every export of the trimmer tests through the generated-file build
validator: an over-eager trim removes a declaration that the generated file
still names, which no assertion about emitted types can catch. The export that
supplies the JetBrains annotations externally is the one exception because it
cannot compile on its own. Group the test classes that run MSBuild on the
shared source validation project into one collection so their builds no longer
race for its intermediate output.
Also resolve the exporter's metadata references through a Lazy, annotate
TryGetBundledType with MaybeNullWhen, expose the bundled type catalog as
read-only lists, and print the merger's progress in execution order.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
@feO2xfeO2x self-assigned this Jul 24, 2026
@feO2xfeO2x linked an issue Jul 24, 2026 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

Code Coverage

PackageLine RateBranch RateComplexityHealth
Light.GuardClauses98%92%2532
Light.GuardClauses.InternalRoslynAnalyzers96%86%52
Light.GuardClauses.InternalRoslynAnalyzers.CodeFixes95%100%8
Light.GuardClauses.SourceCodeTransformation93%86%841
Summary96% (5050 / 5245)90% (2806 / 3111)3433

@feO2x
feO2x merged commit 7a52101 into mainJul 24, 2026
3 checks passed
@feO2x
feO2x deleted the 181-bundled-annotation-type-reachability branch July 24, 2026 22:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only emit the JetBrains annotation types the source export actually uses

1 participant

@feO2x