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

Update Android SDK 31 astubx models #1054

Merged
merged 3 commits into from
Oct 13, 2024
Merged

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Oct 8, 2024

I did not have the artifacts from building SDK 31 from source available to me, so I couldn't run JarInfer on them directly. Instead, I wrote this code to convert our extant astubx file to the new format. The main change is that now method signatures use qualified type names. To do the conversion, I looked up methods from the astubx file in the android.jar stubs file (using WALA) and then got the qualified type names from there.

Not every method present in the previous astubx file is present in the android.jar stubs, as many methods in AOSP are hidden and cannot be invoked (at least not easily), but those methods were included in our previous astubx. This explains why the new astubx is smaller. I did my best to carefully debug and make sure we weren't missing other methods unnecessarily.

This is not a long-term solution. We will probably want to continue to evolve the astubx format, and we'll need a new conversion script each time. Eventually we should create a new astubx for the latest Android SDK and possibly deprecate these artifacts for older SDKs. But, this solution unblocks us, as our current astubx for SDK 31 is unusable with the main branch astubx parsing code.

@msridhar msridhar requested review from yuxincs and lazaroclapp and removed request for yuxincs October 8, 2024 20:16
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.61%. Comparing base (0f6f3d2) to head (495f179).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1054   +/-   ##
=========================================
  Coverage     87.61%   87.61%           
  Complexity     2183     2183           
=========================================
  Files            85       85           
  Lines          7161     7161           
  Branches       1404     1404           
=========================================
  Hits           6274     6274           
  Misses          453      453           
  Partials        434      434           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lazaroclapp
Copy link
Collaborator

Makes sense enough to me

@msridhar msridhar merged commit 2a9188b into uber:master Oct 13, 2024
11 checks passed
@msridhar msridhar deleted the sdk31-astubx-update branch October 13, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants