Skip to content

Update API doc generation and mdoc conversion to use net8.0 #7974

Closed

Description

@pjcollins

Context: #7958 (comment)

We should update our targets and pipelines related to API doc generation to use .NET instead of mono.

Activity

  1. added this to the Under Consideration milestone on Apr 19, 2023
  2. self-assigned this
    on Apr 19, 2023
  3. ghost added
    needs-triageIssues that need to be assigned.
    on Apr 19, 2023
  4. jpobst commented on Apr 20, 2023

    @jpobst
    Contributor

    Note that there are 2 parts here:

    1. Generate the XML documentation from the net8.0-android33.0 Mono.Android.dll instead of the monoandroid10 Mono.Android.dll.
    2. Use .NET instead of Mono to run tools such as MDoc.

    (1) is blocking us from removing monoandroid10 Mono.Android.dll so it is the more immediate concern.

    However, it may make sense to do both parts at the same time. 🤷‍♂️

  5. pjcollins commented on May 4, 2023

    @pjcollins
    MemberAuthor

    Part 1 should be fixed by #8007. We can look at updating to a version of mdoc that supports net6.0 (mono/api-doc-tools#639) in a future PR.

  6. pjcollins commented on May 22, 2023

    @pjcollins
    MemberAuthor

    Part 2 is hitting an issue during the update that requires further investigation:

         Updating: Android.Icu.Lang.UCharacter
         mdoc: Mono.Documentation.MDocAssemblyException: Error processing Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 from obj/docs-gen-temp/xamarin-android-sdk-13/Mono.Android.dll
          ---> System.ArgumentException: The surrogate pair (0xDBFF, 0x3B) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).
            at System.Xml.XmlTextEncoder.WriteSurrogateChar(Char lowChar, Char highChar)
            at System.Xml.XmlTextEncoder.Write(String text)
            at System.Xml.XmlTextWriter.WriteString(String text)
            at System.Xml.XmlAttribute.WriteContentTo(XmlWriter w)
            at System.Xml.XmlAttribute.WriteTo(XmlWriter w)
            at System.Xml.XmlElement.WriteStartElement(XmlWriter w)
            at System.Xml.XmlElement.WriteElementTo(XmlWriter writer, XmlElement el)
            at Mono.Documentation.MDocUpdater.WriteXml(XmlElement element, TextWriter output) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 584
            at Mono.Documentation.MDocUpdater.<>c__DisplayClass75_0.<WriteFile>b__0(String file) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 593
            at Mono.Documentation.MdocFile.UpdateFile(String file, Action`1 creator) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MdocFile.cs:line 63
            at Mono.Documentation.MDocUpdater.DoUpdateType2(String message, XmlDocument basefile, TypeDefinition type, FrameworkTypeEntry typeEntry, String output, Boolean insertSince) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 1824
            at Mono.Documentation.MDocUpdater.DoUpdateType(AssemblySet set, AssemblyDefinition assembly, TypeDefinition type, FrameworkTypeEntry typeEntry, String basepath, String dest) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 922
            at Mono.Documentation.MDocUpdater.DoUpdateAssembly(AssemblySet assemblySet, AssemblyDefinition assembly, XmlElement index_types, String source, String dest, HashSet`1 goodfiles) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 1135
            at Mono.Documentation.MDocUpdater.DoUpdateAssemblies(String source, String dest) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 1078
            --- End of inner exception stack trace ---
            at Mono.Documentation.MDocUpdater.DoUpdateAssemblies(String source, String dest) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 1085
            at Mono.Documentation.MDocUpdater.Run(IEnumerable`1 args) in /Users/runner/work/1/s/mdoc/Mono.Documentation/MDocUpdater.cs:line 467
            at Mono.Documentation.MDoc.Run(String[] args) in /Users/runner/work/1/s/mdoc/Mono.Documentation/mdoc.cs:line 82
            at Mono.Documentation.MDoc.Main(String[] args) in /Users/runner/work/1/s/mdoc/Mono.Documentation/mdoc.cs:line 20
    
  7. added
    need-infoIssues that need more information from the author.
    on Jul 1, 2024
  8. dotnet-policy-service commented on Jul 1, 2024

    @dotnet-policy-service

    Hi @pjcollins. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

  9. removed
    need-infoIssues that need more information from the author.
    on Jul 1, 2024
  10. pjcollins commented on Aug 19, 2024

    @pjcollins
    MemberAuthor

    Seems like this is working for us now.

  11. locked and limited conversation to collaborators on Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions