EnC: Include added types in changed types of emit result#55099
EnC: Include added types in changed types of emit result#55099tmat merged 4 commits intodotnet:mainfrom
Conversation
|
@davidwengier @cston PTAL |
| [WorkItem(962219, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/962219")] | ||
| [Fact] | ||
| public void AddMethod_WithAttributes() | ||
| public void PartialMethod() |
|
@dotnet/roslyn-compiler |
| { | ||
| case SymbolChange.Added: | ||
| _typeDefs.Add(typeDef); | ||
| _changedTypeDefs.Add(typeDef); |
| 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> |
I'm not familiar with Refers to: src/Features/Core/Portable/EditAndContinue/EditSession.cs:783 in 49bb078. [](commit_id = 49bb078, deletion_comment = False) |
Yes, |
| 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.
📝 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.
📝 indexer replaced with GetDefinition method
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 3). Will look at test changes after LDM (in 2 hours)
RikkiGibson
left a comment
There was a problem hiding this comment.
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.