…compiled `[Scan]`
Two acceptance criteria of the self-compiled module scan were implemented but never asserted.
Lifetime: `ScanLifetimeModule` in the referenced support assembly self-compiles two scans, one Singleton and one Transient, over internal matches exposed only through their interfaces. `ModuleScanLifetimeTests` imports it and asserts a singleton match is one instance per `Root` (shared across that root's scopes, distinct between roots) while a transient match is a new instance per resolve. The existing coverage stopped at the emitted `Lifetime =` on the generated registration and never observed the container honoring it at runtime.
Diagnostic ownership: `PerMatchScanDiagnosticsLandInTheLibrarysBuildAndNotTheConsumers` runs the generator over a library whose scan matches one type with an accessible exposure interface and one with only an internal one, then compiles a consumer against the emitted assembly. The library build reports AWT196 on its own `[Scan]` line naming its own type; the consumer build reports nothing while still binding the exposable match. This is what evaluating the scan in the module compilation buys, and only the same-compilation case was covered before.
Two acceptance criteria of the self-compiled module scan were implemented but never asserted.
Lifetime:
ScanLifetimeModulein the referenced support assembly self-compiles two scans, one Singleton and one Transient, over internal matches exposed only through their interfaces.ModuleScanLifetimeTestsimports it and asserts a singleton match is one instance perRoot(shared across that root's scopes, distinct between roots) while a transient match is a new instance per resolve. The existing coverage stopped at the emittedLifetime =on the generated registration and never observed the container honoring it at runtime.Diagnostic ownership:
PerMatchScanDiagnosticsLandInTheLibrarysBuildAndNotTheConsumersruns the generator over a library whose scan matches one type with an accessible exposure interface and one with only an internal one, then compiles a consumer against the emitted assembly. The library build reports AWT196 on its own[Scan]line naming its own type; the consumer build reports nothing while still binding the exposable match. This is what evaluating the scan in the module compilation buys, and only the same-compilation case was covered before.[Module]compile its own[Scan], so a library can keep implementations internal #113