Skip to content

[Mono.Android] Ignore some documentation warnings. #5651

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 23, 2021

In #5253 we added support for generating XML documentation for Mono.Android.dll from Java source .jars. However it adds a considerable amount of warnings to the build (40K+).

Add these 2 warning types to <NoWarn>.

C:\a\1\s\src\Mono.Android\obj\Release\monoandroid10\android-30\mcw\Android.Accounts.AccountManager.cs(2029,45): warning CS1658: Identifier expected. See also error CS1001. [C:\a\1\s\src\Mono.Android\Mono.Android.csproj]
C:\a\1\s\src\Mono.Android\obj\Release\monoandroid10\android-30\mcw\Android.Telephony.TelephonyManager.cs(207,21): warning CS1584: XML comment has syntactically incorrect cref attribute '#ACTION_SHOW_VOICEMAIL_NOTIFICATION' [C:\a\1\s\src\Mono.Android\Mono.Android.csproj]

Note XML Documentation is not enabled for PR builds, so the results of this PR are not visible in CI.

@jpobst jpobst marked this pull request as ready for review February 23, 2021 20:19
@jpobst jpobst requested a review from jonpryor as a code owner February 23, 2021 20:19
Copy link
Member

@radekdoulik radekdoulik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add explanation to the commit message, why these warnings are ignored? I tried to check the generated sources to see the related comments, but the line numbers differ.

The second is probably for

// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='TelephonyManager']/field[@name='ACTION_SHOW_VOICEMAIL_NOTIFICATION']"
[Register ("ACTION_SHOW_VOICEMAIL_NOTIFICATION", ApiSince = 26)]
public const string ActionShowVoicemailNotification = (string) "android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION";

Not sure though, what is wrong with ACTION_SHOW_VOICEMAIL_NOTIFICATION field name?

@jpobst
Copy link
Contributor Author

jpobst commented Feb 23, 2021

These are not the normal version of the bindings. These have scraped JavaDoc comments put into XML documentation comments in the .cs files. The JavaDocs can contain anything, including full HTML, so this process is not fully converting it all properly.

This process is only done on master builds:

https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4494114&view=logs&j=8b79172e-ca26-55d2-15fb-eecd370946ec&t=ce67579a-327d-57f8-6725-dd0a5e295d12

@jonpryor jonpryor merged commit e2a5a12 into master Feb 25, 2021
@jonpryor jonpryor deleted the doc-warnings branch February 25, 2021 18:28
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants