api-doc-tools
api-doc-tools copied to clipboard
[mdoc] Class names must be case-sensitive, lest recursive inheritance expressed in XML
Xamarin.Mac has two classes: CICmykHalftone : CIFilter and CICMYKHalftone : CICmykHalftone. (Note "CMYK" vs "Cmyk"). This is legal C#. An mdoc update generates:
<Type Name="CICmykHalftone" FullName="CoreImage.CICmykHalftone">
<TypeSignature Language="C#" Value="public class CICmykHalftone : CoreImage.CIFilter" />
<!-- snip -->
<Base>
<BaseTypeName>CoreImage.CIFilter</BaseTypeName>
<BaseTypeName FrameworkAlternate="xamarin-macos-sdk-14">CoreImage.CICmykHalftone</BaseTypeName>
</Base>
<!-- snip -->
This defines a recursive inheritance, which breaks Ecma2Yaml with an OutOfMemoryException.
internal issue logged
@lobrien Trying to think about how we can work around this, given that we can't have a file that is changed only by case ... I'm thinking about the following plan:
- Sort types as we iterate over them, to ensure any two given types like cicmykhalftone would always come in the same order.
- If a second case-only-diff typename comes around, append something to the filename
- Modify the code that matches the type name to the filename to watch out for this suffix (what should the suffix be? some separator that isn't a valid character in a typename, but is a valid path char?)
@TianqiZhang, would there be any ecma2yaml changes needed if I implement this change at some point? Otherwise, what are your thoughts on the above proposal?
@lobrien @TianqiZhang another thought ... ops is ultimately not case sensitive. So even if we add support for this type, it will not be able to be properly addressed on docs.microsoft.com