Repository navigation
Fix: the Android AAR keeps every stdlib directory starting with _ (#546) - #547
Merged
Merged
Conversation
…P's <dir>_* asset filter dropped 110 files, including zipfile/_path) verifyAarStdlib compares the staged asset tree with the release AAR; red before the fix (110 of 1784 files missing), green after. AndroidStdlibAssetsTest checks zipfile._path, _pyrepl, compression._common, __phello__ and importlib.metadata on the device. #546
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #546
AGP's default
ignoreAssetsPatterncontains<dir>_*, so the AAR dropped every stdlib directory starting with_(zipfile/_path,_pyrepl,__phello__,compression/_common,ensurepip/_bundled, ...).importlib.metadataneedszipfile._path, so torchnative's app failed on the Flip4 with "No module named 'zipfile._path'".android { androidResources { ignoreAssetsPattern = ... } }is AGP's default without<dir>_*.verifyAarStdlib(Gradle, verification): every filecopyAndroidPythonAssetsstages must be in the release AAR. Red before the fix: "the AAR lacks 110 of 1784 staged asset files (Android AAR drops every stdlib directory starting with _ (AGP ignoreAssetsPattern) #546)", first entries__phello__/__init__.py,_pyrepl/__init__.py. Green after: "all 1784 staged asset files are in the AAR".AndroidStdlibAssetsTest(instrumented):find_specforzipfile._path,_pyrepl,compression._common,__phello__, andimportlib.metadataimports. Compiled locally (compileDebugAndroidTestKotlinAndroid); it runs on the CI emulator.:python-multiplatform:verifyAarStdlib(no new workflow or job).An app that merges this AAR still applies its own pattern; that side is toolchain #166.