Skip to content
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

[Mono.Android] Fix API-34 health enums with name conflicts. #8254

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Aug 8, 2023

While creating enumerations for API-34 constants, 3 enums were created that had the same type name as a bound Java type. These enums have been renamed to no longer conflict with a generated type.

  • BodyTemperatureMeasurementLocation -> BodyTemperatureMeasurementLocationType
  • ExerciseSegmentType -> ExerciseSegmentTypeEnum
  • ExerciseSessionType -> ExerciseSessionTypeEnum

This was noticed because CS2002 warnings appeared when building Mono.Android:

CSC : error CS2002: Source file 'C:\code\xamarin-android\src\Mono.Android\obj\Debug\net8.0\android-34\mcw\Android.Health.Connect.DataTypes.ExerciseSessionType.cs' specified multiple times

To help ensure this is prevented in the future, additionally turn CS2002 warning into an error.

@jpobst jpobst changed the title [Mono.Android] Fix API-34 exercise enums with name conflicts. [Mono.Android] Fix API-34 health enums with name conflicts. Aug 8, 2023
@jpobst jpobst marked this pull request as ready for review August 8, 2023 22:54
@jpobst jpobst requested a review from jonpryor as a code owner August 8, 2023 22:54
@jonpryor jonpryor merged commit 06224f3 into main Aug 9, 2023
49 checks passed
@jonpryor jonpryor deleted the exercise-enum-fixes branch August 9, 2023 20:09
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants