#299 MappaDependencyInjectionAttribute - #302
Merged
Merged
Conversation
Introduce the public API for DI registrar generation (attribute, inject/lifetime/accessibility enums), unit tests, README entry, and alpha.45 package bump so the generator can consume the new surface. Co-authored-by: Cursor <cursoragent@cursor.com>
Add the incremental DI pipeline, assembly mapper discovery, registration source emission, and MP00070-MP00072 diagnostics for partial/conflict/interface edge cases. Co-authored-by: Cursor <cursoragent@cursor.com>
Cover DI registration generation and MP00070-72 diagnostics with syntax-tree assertions, attribute parsing unit tests, and a DependencyInjection.Abstractions reference for BuildCompilation. Co-authored-by: Cursor <cursoragent@cursor.com>
Cover block/global namespaces, Private/Protected/ProtectedInternal accessibility, and nested [Mappa] mapper discovery. Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild packages so Samples consume the updated Generator. Co-authored-by: Cursor <cursoragent@cursor.com>
Skip static [Mappa] types during dependency injection discovery, emit XML docs on the generated registration method, and report MP00073 when a static mapper is skipped. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a registrar sample with RegisterMappaSamples, a dedicated mapper, DI package reference, and unit tests that resolve registered mappers. Suppress MP00073 for intentional static sample mappers. Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild packages so Samples consume the updated Generator with MP00073. Co-authored-by: Cursor <cursoragent@cursor.com>
Place StaticMapperReportsWarningAndIsSkippedFromRegistration alongside the other MappaDependencyInjection diagnostic tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise RegisterMappaSamples under Native AOT by resolving MappaDependencyInjectionMapper from the service provider. Co-authored-by: Cursor <cursoragent@cursor.com>
Update attributes, algorithm, features, tutorial, and package READMEs for dependency injection registration and MP00070-73. Co-authored-by: Cursor <cursoragent@cursor.com>
Code coverageCompared against the latest published coverage history from the code coverage gist.
No coverage metric dropped by more than 1 percentage point(s) versus baseline. BenchmarksAutoMapper is the BenchmarkDotNet ratio baseline. Absolute values are mean time in nanoseconds and allocated bytes. Ratio columns are competitor / Mappa as a percentage (n/a when either side is missing or Mappa is zero).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[MappaDependencyInjection]on a separate partial registrar class; the generator emits anIServiceCollectionregistration method for all same-assembly[Mappa]mappers.InjectInterfaces(ClassOnly / InterfaceOnly / InterfaceAndClass), andIgnoreType.10.2.0-alpha.48.Test plan
RegisterMappaSamples.\Scripts\RunTestsAndReportCoverage.ps1(line/branch slightly below step-1 baseline — see coverage note)Coverage note
Final coverage vs issue baseline (98.4% / 90.6% / 100%): 98.3% / 90.3% / 100%. Remaining DI gaps are mostly defensive paths (
GetDeclaredSymbol/ null attribute data, inject-partialfallback) and sharedAttributeDataExtensionshelpers.