extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Conditionally remove instrument caching in Metrics source-gen

Open xakep139 opened this issue 1 year ago • 0 comments

Right now we have caching of instruments in Metrics source-gen: https://github.com/dotnet/extensions/blob/7271d1923ef31670feefbcba1e55751dcc3e6bfa/src/Generators/Microsoft.Gen.Metrics/MetricFactoryEmitter.cs#L109

The original issue https://github.com/dotnet/runtime/issues/84713 was resolved in System.Diagnostics.DiagnosticSource of version 8, thus we can check its version during generation time and not add any caching logic. If the package version if older than 8, we will produce the same codebase as we have now.

xakep139 avatar Apr 08 '24 11:04 xakep139