Skip to content

Add IDE code fixes for actionable diagnostics - #55

Closed
SunSi12138 wants to merge 40 commits into
devfrom
feature/ide-code-fixes
Closed

Add IDE code fixes for actionable diagnostics#55
SunSi12138 wants to merge 40 commits into
devfrom
feature/ide-code-fixes

Conversation

@SunSi12138

Copy link
Copy Markdown
Owner

Closes #52

Summary

  • add a Roslyn code-fix provider for the 24 actionable SharpLink diagnostics
  • support solution-wide signature changes with safe preflight checks and Fix All behavior
  • emit stable diagnostic properties for deterministic fixes and package the provider as an SDK analyzer
  • add code-fix, generator-property, package, host-load, and CI coverage

Validation

  • 44 SharpLink.CodeFixes.Tests passed
  • 123 SharpLink.Generator.Tests passed
  • full Release solution rebuild completed with 0 warnings and 0 errors
  • NuGet package verification passed for commit 5300f69
  • packed provider loaded successfully in an AdhocWorkspace host
  • SDK-only package smoke test passed with analyzer load failures promoted to errors
  • actionlint passed for the updated workflows

@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5300f6994f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release-gate.yml
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0d3a71e99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 352d9c54d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4aa88d87a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.Generator/RpcGenerator.ContractManifest.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 151721abe7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68d10bf252

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0c9bd7a49

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b75c853642

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1d31703d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Signatures.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebf15ebd36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c293b569cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Compatibility.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.AttributeValidation.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.GenerationActions.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 680fecd15a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.Generator/RpcGenerator.DtoAnalysis.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.GenerationActions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.SignatureValidation.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a2f961d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Actions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Actions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.TypeEdits.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.TypeEdits.cs
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4026437a9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.TypeEdits.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Actions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.ServiceLifetime.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Compatibility.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc0f35ff5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.SignatureActions.cs Outdated
Comment thread src/SharpLink.Generator/RpcGenerator.DtoAnalysis.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8da9e5747

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.TypeValidation.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0dd4dac11e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.TypeValidation.cs Outdated
Comment thread src/SharpLink.Generator/RpcGenerator.DtoAnalysis.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.ServiceLifetime.cs Outdated
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b620a7cbfc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.SignatureActions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.Compatibility.cs
@SunSi12138

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f38977dceb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.GenerationActions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.GenerationActions.cs Outdated
Comment thread src/SharpLink.CodeFixes/SharpLinkCodeFixProvider.SignatureActions.cs Outdated

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6e5b4d19f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +52 to +53
RegisterSolutionFix(context, diagnostic, "Annotate with [NonCancellable]", "AddNonCancellable",
(solution, _, _, ct) => AddNonCancellableAsync(solution, equivalentMethods, ct));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check sibling constructions before adding NonCancellable

When one generic declaration is inherited through multiple closed RPC contracts, this action validates only the construction that produced the diagnostic but adds the attribute to the shared open declaration. For example, annotating IBase<T>.Run(T value) because IBase<string> lacks cancellation also annotates an IBase<CancellationToken> construction that was already valid, causing that sibling contract to report SHARPLINK015. Check every closed construction affected by the declaration-wide edit before registering the action.

Useful? React with 👍 / 👎.

Comment on lines +273 to +276
var attributes = equivalentMethods
.Where(static candidate => !IsValidOnewayReturnType(candidate.ReturnType))
.SelectMany(static candidate => candidate.GetAttributes().Where(IsOnewayAttribute))
.ToImmutableArray();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve valid Oneway sibling constructions

When [Oneway] T Run() is declared on a generic base inherited as both IBase<int> and IBase<Task> by RPC contracts, this filter selects the invalid int construction and removes the attribute from the shared open declaration. That silently strips the valid oneway policy from the Task construction as well. Before offering removal, inspect every closed construction that shares each attribute reference and withhold the action when any still has a valid oneway return.

Useful? React with 👍 / 👎.

Comment on lines +44 to +50
var existingArgument = attribute.ArgumentList is { Arguments.Count: 1 } argumentList
? argumentList.Arguments[0]
: null;
var updated = existingArgument is null
? attribute.WithArgumentList(SyntaxFactory.AttributeArgumentList(
SyntaxFactory.SingletonSeparatedList(
SyntaxFactory.AttributeArgument(SyntaxFactory.ParseExpression(memberId)))))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retain named RpcMember settings when restoring the ID

For a recognized legacy/custom RpcMemberAttribute with writable settings, such as [RpcMember(8, Mode = 2)], the syntax has more than one argument, so existingArgument becomes null and the replacement rebuilds the entire list with only the published ID. Applying the compatibility fix therefore silently discards Mode; resolve and replace only the constructor-bound ID argument while retaining named field/property arguments.

Useful? React with 👍 / 👎.

var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken)
.ConfigureAwait(false);
if (declaration is null ||
semanticModel?.GetDeclaredSymbol(declaration, context.CancellationToken) is not IMethodSymbol method ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve constructed methods before collecting Timeout attributes

When an RPC contract inherits a closed generic method such as IBase<string>.Run(string value) from a declaration [Timeout(-1)] Run(T value), the generator diagnoses the constructed method and supplies its identity, but registration starts from the open Run(T) symbol. The equivalent-signature search then rejects the constructed method because T and string differ, leaving timeoutAttributes empty and withholding both safe timeout fixes; resolve the diagnostic method identity before searching equivalent declarations.

Useful? React with 👍 / 👎.

@SunSi12138 SunSi12138 closed this Aug 4, 2026
@SunSi12138
SunSi12138 deleted the feature/ide-code-fixes branch August 4, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant