Conversation
…uration.Abstractions`, but the namespace is `Microsoft.Extensions.Configuration`.
Updated the `<VersionSuffix>` value in `Directory.Build.props` from `beta-20251201143733` to `beta-20251202093909`.
- Added "CompilationEnd" custom tag to the MultipleExtensionsUsed diagnostic descriptor to ensure it is reported at compilation end. - Cleared VersionSuffix in Directory.Build.props, moving away from pre-release (beta) versioning.
There was a problem hiding this comment.
Pull request overview
This PR prepares the 1.1.0 release by standardizing generated IConfiguration signatures to use Microsoft.Extensions.Configuration.IConfiguration, simplifying a small LINQ pattern in the generator, and refining a diagnostic descriptor for better consumer context.
Changes:
- Updated generated extension method and partial method signatures (and corresponding tests) to use
global::Microsoft.Extensions.Configuration.IConfiguration. - Simplified retrieval of
AutoInjectConfigAttributeviaFirstOrDefault(predicate)in the generator. - Marked the “multiple extensions used” diagnostic with a
CompilationEndcustom tag and removed the version suffix for release packaging.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Ling.AutoInject.SourceGenerators.Tests/AutoInjectGeneratorTests.cs | Updates expected generated code to use Microsoft.Extensions.Configuration.IConfiguration. |
| src/Ling.AutoInject.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs | Adds CompilationEnd tag to the multiple-extensions diagnostic descriptor. |
| src/Ling.AutoInject.SourceGenerators/AutoInjectGenerator.cs | Updates emitted method signatures to IConfiguration and simplifies config-attribute lookup. |
| src/Directory.Build.props | Clears VersionSuffix to produce a stable 1.1.0 version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DiagnosticSeverity.Error, | ||
| isEnabledByDefault: true); | ||
| isEnabledByDefault: true, | ||
| customTags: ["CompilationEnd"]); |
There was a problem hiding this comment.
Consider using Roslyn’s built-in constant (Microsoft.CodeAnalysis.WellKnownDiagnosticTags.CompilationEnd) instead of the raw string literal "CompilationEnd" for customTags. This avoids typos and makes the intent/tooling contract clearer to future maintainers.
| customTags: ["CompilationEnd"]); | |
| customTags: [WellKnownDiagnosticTags.CompilationEnd]); |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@copilot Could you help me revise the title and content of this PR to make them more appropriate? |
Updated the PR description to be more focused and descriptive. For the title, I'd suggest:
You can update the title directly in the GitHub PR UI if that looks good to you. |
…ral (#23) * Initial plan * refactor: use WellKnownDiagnosticTags.CompilationEnd instead of raw string literal Co-authored-by: ling921 <88094578+ling921@users.noreply.github.com> Agent-Logs-Url: https://github.com/ling921/ling-auto-inject/sessions/330cdbbf-cd75-4970-890a-61d829cf3961 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ling921 <88094578+ling921@users.noreply.github.com>
Replace the raw string literal
"CompilationEnd"in theMultipleExtensionsUsedRulediagnostic descriptor with the Roslyn built-in constantWellKnownDiagnosticTags.CompilationEnd.Why:
What changed:
src/Ling.AutoInject.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs: replaced["CompilationEnd"]with[WellKnownDiagnosticTags.CompilationEnd]No additional
usingdirectives or dependency changes are needed sinceMicrosoft.CodeAnalysiswas already imported.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.