-
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
EnC: Include added types in changed types of emit result #55099
Conversation
@davidwengier @cston PTAL |
[Fact] | ||
public void AddMethod_WithAttributes() | ||
public void PartialMethod() |
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.
@dotnet/roslyn-compiler |
@@ -482,6 +486,8 @@ protected override void CreateIndicesForNonTypeMembers(ITypeDefinition typeDef) | |||
{ | |||
case SymbolChange.Added: | |||
_typeDefs.Add(typeDef); | |||
_changedTypeDefs.Add(typeDef); |
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.
@@ -2,8 +2,8 @@ | |||
abstract Microsoft.CodeAnalysis.SyntaxTree.GetLineMappings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.LineMapping>! | |||
const Microsoft.CodeAnalysis.WellKnownMemberNames.PrintMembersMethodName = "PrintMembers" -> string! | |||
Microsoft.CodeAnalysis.Compilation.EmitDifference(Microsoft.CodeAnalysis.Emit.EmitBaseline! baseline, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Emit.SemanticEdit>! edits, System.Func<Microsoft.CodeAnalysis.ISymbol!, bool>! isAddedSymbol, System.IO.Stream! metadataStream, System.IO.Stream! ilStream, System.IO.Stream! pdbStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.Emit.EmitDifferenceResult! | |||
Microsoft.CodeAnalysis.Emit.EmitDifferenceResult.ChangedTypes.get -> System.Collections.Immutable.ImmutableArray<System.Reflection.Metadata.TypeDefinitionHandle> |
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.
Tagging @333fred since affects public API
src/Compilers/Core/Portable/Emit/EditAndContinue/DeltaMetadataWriter.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Emitter/EditAndContinue/EmitHelpers.cs
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Emit/EditAndContinue/EmitHelpers.vb
Outdated
Show resolved
Hide resolved
I'm not familiar with Refers to: src/Features/Core/Portable/EditAndContinue/EditSession.cs:783 in 49bb078. [](commit_id = 49bb078, deletion_comment = False) |
Yes, |
@@ -262,19 +266,19 @@ public void GetUpdatedMethodTokens(ArrayBuilder<MethodDefinitionHandle> methods) | |||
// The debugger tries to remap all modified methods, which requires presence of sequence points. | |||
if (!_methodDefs.IsAddedNotChanged(def) && def.GetBody(Context)?.SequencePoints.Length > 0) | |||
{ | |||
methods.Add(MetadataTokens.MethodDefinitionHandle(_methodDefs[def])); | |||
methods.Add(MetadataTokens.MethodDefinitionHandle(_methodDefs.GetRowId(def))); |
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.
📝 indexer was replaced with a GetRowId
method
} | ||
|
||
protected override ITypeDefinition GetTypeDef(TypeDefinitionHandle handle) | ||
{ | ||
return _typeDefs[MetadataTokens.GetRowNumber(handle)]; | ||
return _typeDefs.GetDefinition(MetadataTokens.GetRowNumber(handle)); |
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.
📝 indexer replaced with GetDefinition
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.
Done with review pass (iteration 3). Will look at test changes after LDM (in 2 hours)
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 Thanks (iteration 4)
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 although it's difficult for me to judge whether the changes in test baselines are correct or not.
@RikkiGibson Thanks! |
The types are reported to the application via runtime event. The application needs to know about added types, not just updated ones.
+ Simplify some EnC tests.