Skip to content

Release version 1.1.0#22

Merged
ling921 merged 5 commits intomasterfrom
develop
Mar 26, 2026
Merged

Release version 1.1.0#22
ling921 merged 5 commits intomasterfrom
develop

Conversation

@ling921
Copy link
Copy Markdown
Owner

@ling921 ling921 commented Mar 26, 2026

Replace the raw string literal "CompilationEnd" in the MultipleExtensionsUsedRule diagnostic descriptor with the Roslyn built-in constant WellKnownDiagnosticTags.CompilationEnd.

Why:

  • Eliminates the risk of typos in the tag name
  • Makes the Roslyn tooling contract explicit and clear to future maintainers
  • Aligns with Roslyn best practices for diagnostic tag usage

What changed:

  • src/Ling.AutoInject.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs: replaced ["CompilationEnd"] with [WellKnownDiagnosticTags.CompilationEnd]

No additional using directives or dependency changes are needed since Microsoft.CodeAnalysis was 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.

…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.
@ling921 ling921 self-assigned this Mar 26, 2026
Copilot AI review requested due to automatic review settings March 26, 2026 06:24
@ling921 ling921 added the enhancement New feature or request label Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AutoInjectConfigAttribute via FirstOrDefault(predicate) in the generator.
  • Marked the “multiple extensions used” diagnostic with a CompilationEnd custom 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"]);
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
customTags: ["CompilationEnd"]);
customTags: [WellKnownDiagnosticTags.CompilationEnd]);

Copilot uses AI. Check for mistakes.
@ling921
Copy link
Copy Markdown
Owner Author

ling921 commented Mar 26, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

@ling921 I've opened a new pull request, #23, to work on those changes. Once the pull request is ready, I'll request review from you.

@ling921
Copy link
Copy Markdown
Owner Author

ling921 commented Mar 26, 2026

@copilot Could you help me revise the title and content of this PR to make them more appropriate?

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

@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:

refactor: use WellKnownDiagnosticTags.CompilationEnd instead of raw string literal

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>
@ling921 ling921 merged commit 066aabf into master Mar 26, 2026
1 check passed
@ling921 ling921 deleted the develop branch March 26, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants