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

Adding items to map.csv should not remove const fields. #613

Open
gugavaro opened this issue Mar 26, 2020 · 0 comments
Open

Adding items to map.csv should not remove const fields. #613

gugavaro opened this issue Mar 26, 2020 · 0 comments
Labels
enhancement Proposed change to current functionality generator Issues binding a Java library (generator, class-parse, etc.)

Comments

@gugavaro
Copy link
Contributor

gugavaro commented Mar 26, 2020

Generator does not generate const fields for enum items. however if a current existent field gets added to the map.csv, generator will change the type and break api.
We need to add a flag on map.csv indicating whether field should be kept from being changed.

for example:

Original const field:

[Register ("EFFECT_CLICK", ApiSince = 29)]
public const int EffectClick = (int) 0;

if this line is added on map.csv

29,Android.OS.VibrationEffectEffectType,EffectClick,android/os/VibrationEffect.EFFECT_CLICK,0
then generator will generate the following field:

[Register ("EFFECT_CLICK", ApiSince = 29)]
public const Android.OS.VibrationEffectEffectType EffectClick = (Android.OS.VibrationEffectEffectType) 0;
@gugavaro gugavaro self-assigned this Mar 26, 2020
jonpryor pushed a commit to dotnet/android that referenced this issue Mar 29, 2020
Context: https://web.archive.org/web/20200307182928/https://developer.android.com/preview/overview

Android 11 [Developer Preview 2 has been released][0].

  * [API diff vs. Developer Preview 1][1]
  * [API diff vs. API-29][2]

Google's documented timeline for Android 11 is unchanged wrt a20be39:

  * Developer Preview 3 in April
  * Beta 1 in May
  * Beta 2 in June
    This contains the final APIs and official SDK.
  * Beta 3 and final release sometime in Q3, 2019.

For a change vs. previous releases, we are testing out some new
workflows and tooling around enumification, and the updated API-R
binding in `Mono.Android.dll` v10.0.99 has been enumified.

Note: due to a [generator bug][3], the
`Android.OS.VibrationEffectEffectType` enum must be manually bound.

[0]: https://android-developers.googleblog.com/2020/03/android-11-developer-preview-2.html
[1]: https://developer.android.com/sdk/api_diff/r-dp2-incr/changes
[2]: https://developer.android.com/sdk/api_diff/r-dp2/changes
[3]: dotnet/java-interop#613
jonpryor pushed a commit to dotnet/android that referenced this issue Mar 30, 2020
Context: https://web.archive.org/web/20200307182928/https://developer.android.com/preview/overview

Android 11 [Developer Preview 2 has been released][0].

  * [API diff vs. Developer Preview 1][1]
  * [API diff vs. API-29][2]

Google's documented timeline for Android 11 is unchanged wrt a20be39:

  * Developer Preview 3 in April
  * Beta 1 in May
  * Beta 2 in June
    This contains the final APIs and official SDK.
  * Beta 3 and final release sometime in Q3, 2019.

For a change vs. previous releases, we are testing out some new
workflows and tooling around enumification, and the updated API-R
binding in `Mono.Android.dll` v10.0.99 has been enumified.

Note: due to a [generator bug][3], the
`Android.OS.VibrationEffectEffectType` enum must be manually bound.

[0]: https://android-developers.googleblog.com/2020/03/android-11-developer-preview-2.html
[1]: https://developer.android.com/sdk/api_diff/r-dp2-incr/changes
[2]: https://developer.android.com/sdk/api_diff/r-dp2/changes
[3]: dotnet/java-interop#613
@jpobst jpobst added generator Issues binding a Java library (generator, class-parse, etc.) enhancement Proposed change to current functionality labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposed change to current functionality generator Issues binding a Java library (generator, class-parse, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants