Skip to content

AspectGenerator 1.1.2

Latest

Choose a tag to compare

@igor-tkachev igor-tkachev released this 07 Nov 03:12
· 34 commits to master since this release
  • Fixed generated interceptors with multiple aspects and async hooks emitting duplicate async modifiers; non-generic Task and ValueTask targets are now awaited before running completion hooks.
  • Fixed aspects of a library that uses the public aspect API of another assembly and declares no AspectAttribute of its own: in a project that references both, calls to the methods they carry were not intercepted, the aspects applied in the project itself were ignored, and their DefaultTargetFilter was not checked, with no diagnostic. Only assemblies that declared AspectAttribute themselves were searched for aspects; an assembly that references one that declares it is searched as well now.
  • Fixed OnCall ordering diagnostics to use the same Order-sorted aspect chain as grouping and code generation.
  • Fixed AG0208 for an aspect with a TargetFilter applied to a local function: a build reported it only when another target filter in the project could select methods of referenced assemblies, and a design-time build never did. It is now reported in every build and in the editor, as for any other method-level aspect attribute.
  • Changed: the build report is limited to 1 MB by default. With a broad target filter on a large project (namespace: LinqToDB.** on linq2db) it listed every call site and reached 19 MB. The limit applies to the lists: the summary, the generated sources and the trace are always written in full; the lists of target methods and call sites show their first rows and say how many they left out. The new AspectGeneratorReportSizeLimit property sets the limit in kilobytes; 0 lists everything. See Diagnostics.
  • Changed: AspectGeneratorTrace=true writes the trace section in the published package too. Before, the trace was compiled into Debug builds of the generator only, and a Release package ignored the property.
  • The minimum-SDK CI consumers now use the project package version and verify the restored package matches the locally packed bytes.
  • Documented that TargetFilter is compile-time metadata and is not copied to runtime aspect instances, and that Static-lifetime instances are shared across threads and construction failures surface as TypeInitializationException.
  • Clarified the build-toolchain requirement: the .NET 9 SDK is what Visual Studio 2022 has shipped since 17.12, so any Visual Studio 2022 from 17.12 on (including the 17.14 LTSC release), Visual Studio 2026, Rider 2024.3 or later, or the dotnet CLI builds a project that uses AspectGenerator; the newest Visual Studio is not required.
  • Ship the AspectGenerator agent guide as the discoverable aspectgenerator skill under skills/aspectgenerator/, with YAML frontmatter, a short entry point and focused task guides. Remove the former package-root SKILL.md; validate the packed skill metadata and relative links in CI.