-
Notifications
You must be signed in to change notification settings - Fork 206
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
Resolve SizeParamIndex to a TypePositionInfo during MarshallingInfo parsing #1293
Resolve SizeParamIndex to a TypePositionInfo during MarshallingInfo parsing #1293
Conversation
DllImportGenerator/DllImportGenerator/MarshallingAttributeInfo.cs
Outdated
Show resolved
Hide resolved
// This ensures that we've unwound the whole cycle so when we return, there will be no cycles in the count info. | ||
catch (CyclicalCountElementInfoException ex) when (ex.StartOfCycle == param.Name) | ||
{ | ||
_diagnostics.ReportConfigurationNotSupported(attrData, $"Cyclical {ManualTypeMarshallingHelper.MarshalUsingProperties.CountElementName}"); |
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.
Should Cyclical {0}
be a resource string?
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.
Probably. I’ll do a follow-up PR to clean up how diagnostics are reported by the marshalling info parser to be a bit cleaner.
Are there existing tests for the cyclical count info failure case? |
* Add SslApplicationProtocol.Http3 Fix #1293 * Add XML doc * Reuse in Http3Connection * Reuse in tests * HTTP/3 has no negotiation * Use SslApplicationProtocol.Http3.ToString() in tests * Ascending order in ref
…arsing (dotnet/runtimelab#1293) Commit migrated from dotnet/runtimelab@eea0bae
Move the resolution/validation of SizeParamIndex up to MarshallingAttributeInfo.
Enables us to remove the concept of mapping an "index" -> element name/TypePositionInfo from the context and make it only part of the attribute parser. Since this mapping only makes sense in certain scenarios, this allows custom contexts to not have to provide overrides of the
GetTypePositionInfoForManagedIndex
method that either always returnnull
or delegate to a parent context.