-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: more specific native-api-usage.json file #10131
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
base: main
Are you sure you want to change the base?
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit e816919. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
@farfromrefug What impact will this have for devs that use unregistered apis inside their apps? |
@CatchABus yes if your app was not setting the correct native api usage from the app code it might fail now if it was "covered" by N native-api-usage. But I would not call that a regression in the sense that your app should handle that. |
This is a tough task to test, but what I'm doing is comparing ths to what I get from running https://github.com/jcassidyav/generate-metadata-filter and comparing the gaps in each. I haven't gone through everything but so far I have found these missing rules: "android.content:ClipData", |
@jcassidyav nice will add those. BTW what is the real difference between EDIT: it seems my old tests about * were wrong. I tested again and * behave as expected and is thus not needed here. |
…ch name starts the same as one we choose to explicitly keep
@farfromrefug That is great at least it makes sense. I think though that the * were hiding another problem, e.g. "android.widget:ImageView",
"android.widget.ImageView:ScaleType", Does not allow access to
I think it is previously |
@jcassidyav wow that is a big issue ! thanks for catching this. I was updating all my plugins with that change, might have broken stuff! |
Also removed `androidx.appcompat:R.attr` as i dont think we are using it
@jcassidyav i updated the file. Does that look good to you? |
@farfromrefug When I run the generator against core I get android-native-api-usage.zip. It may be too aggressive in picking up what is required but it is picking up some rules which are definitely required, I haven’t had a chance to look at the discrepancies yet. It is easy to spot things which are just newed up in the typescript, once they have been highlighted, but if it is the type of a parameter to something else then very difficult. But here is one example that is required: "android.view.accessibility:AccessibilityManager.TouchExplorationStateChangeListener", Also "android.inputmethodservice.Keyboard:Key" should be "android.inputmethodservice:Keyboard.Key", |
@jcassidyav OK great i LL take a look |
…or easier maintenance
… farfromrefug-patch-2
@farfromrefug I was able to get the /apps/automated tests running with the usage enabled by adding: These may be only used in the test code ( hard to tell for sure):
These are definitly used in core:
|
@jcassidyav thanks a lot. I was adding missing by testing in my production apps. I will run the tests too! |
@jcassidyav
|
The others, you are probably correct also, the tests fall apart so completly I thought they were used in core. That said for a small cost maybe they are worth keeping to let the tests run? |
@jcassidyav About the test ones i actually added them to the apps As a note on what all that can do, i pushed metadata filtering + proguard to its best (might even do better):
Seems to me it is worse going as detailed as possible |
@farfromrefug Strange, I get when calling getAttributes() on a window without specifying |
@jcassidyav indeed weird I will investigate. Thanks ! |
@jcassidyav i added all the fixes we talked about. Even |
PR Checklist
What is the current behavior?
What is the new behavior?
Fixes/Implements/Closes #[Issue Number].