-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move repo to newer version of Public Api analyzers #65737
Conversation
@jasonmalinowski It seems the correctness analyzers leg is failing as you recently added a public API that has no entry in unshipped file:
Looking at your PR which added this public API: #65701, it seems the public API addition was likely unintentional. I am going to to switch it to an internal type, and feel free to make it public again if that was an intentional change. EDIT: It seems #65701 added 2 more public interfaces: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 3)
Filed #65746 to review all the non-infra changes in this PR. I am going to merge this PR as soon as it is green to unblock re-enabling the public API analyzer and avoid more public API changes to unintentionally sneak in. |
@@ -3331,7 +3331,7 @@ public override SyntaxNode BaseExpression() | |||
public override SyntaxNode TypedConstantExpression(TypedConstant value) | |||
=> ExpressionGenerator.GenerateExpression(value); | |||
|
|||
protected override SyntaxNode GenerateExpression(ITypeSymbol? type, object? value, bool canUseFieldReference) | |||
private protected override SyntaxNode GenerateExpression(ITypeSymbol? type, object? value, bool canUseFieldReference) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this was intended to be a public API, but should be confirmed with Cyrus as part of #65746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SyntaxGenerator is not publicly inheritable (it has tons of internal abstract members). As such, all 'protected' members are save to change in any fashion.
Note: i would love it public-api-analyzer understood this. I think it understands if there is an explicit internal constructor, but not if there are internal abstracts.
@@ -15,6 +15,8 @@ Microsoft.CodeAnalysis.Editing.DeclarationModifiers.IsFile.get -> bool | |||
Microsoft.CodeAnalysis.Editing.DeclarationModifiers.WithIsFile(bool isFile) -> Microsoft.CodeAnalysis.Editing.DeclarationModifiers | |||
*REMOVED*static Microsoft.CodeAnalysis.Editing.SyntaxGenerator.DefaultRemoveOptions -> Microsoft.CodeAnalysis.SyntaxRemoveOptions | |||
Microsoft.CodeAnalysis.Editing.SyntaxEditor.SyntaxEditor(Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.Host.SolutionServices services) -> void | |||
*REMOVED*abstract Microsoft.CodeAnalysis.Editing.SyntaxGenerator.LiteralExpression(object value) -> Microsoft.CodeAnalysis.SyntaxNode | |||
Microsoft.CodeAnalysis.Editing.SyntaxGenerator.LiteralExpression(object value) -> Microsoft.CodeAnalysis.SyntaxNode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 changes should be confirmed with Cyrus as part of #65746. It seems he converted an existing public abstract method to a public non-abstract method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. that's correct (and safe from an ABI perspective). Thsi type cannot be publicly overridden either, so this is fine.
@@ -52,8 +54,7 @@ override Microsoft.CodeAnalysis.LoadTextOptions.GetHashCode() -> int | |||
override Microsoft.CodeAnalysis.LoadTextOptions.ToString() -> string | |||
static Microsoft.CodeAnalysis.LoadTextOptions.operator !=(Microsoft.CodeAnalysis.LoadTextOptions left, Microsoft.CodeAnalysis.LoadTextOptions right) -> bool | |||
static Microsoft.CodeAnalysis.LoadTextOptions.operator ==(Microsoft.CodeAnalysis.LoadTextOptions left, Microsoft.CodeAnalysis.LoadTextOptions right) -> bool | |||
virtual Microsoft.CodeAnalysis.FileTextLoader.CreateText(System.IO.Stream stream, Microsoft.CodeAnalysis.LoadTextOptions options, System.Threading.CancellationToken cancellationToken) -> Microsoft.CodeAnalysis.Text.SourceText | |||
*REMOVED*override Microsoft.CodeAnalysis.FileTextLoader.LoadTextAndVersionAsync(Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.DocumentId documentId, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextLoader and FileTextLoader related changes in this file should be reviewed with Tomas as part of #65746
@@ -23,7 +23,7 @@ internal interface IFileChangeWatcher | |||
/// just creating a single directory watch on the root of a project for source file changes: rather than creating a file watcher | |||
/// for each individual file, we can just watch the entire directory and that's it. | |||
/// </remarks> | |||
public sealed class WatchedDirectory | |||
internal sealed class WatchedDirectory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to this file should be confirmed with JasonMal as part of #65746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, that wasn't intended to be made public, thanks for catching that!
No description provided.