Nick MondelloI think you'd be fine to add `@SuppressWarnings("UnsafeDynamicallyLoadedCode")` to silence the lint error. The error about ServiceLoader can be suppressed by adding a `-dontwarn`, but I think it's likely that there is a class missing that shouldn't be?
Andrew GrieveI added the suppress. And I have been trying to look into it. I don't think it could have been caused by the exclude group in the build.gradle.template. This doesn't have amything to do with those classes being pulled into the DFM?
Nick MondelloThis is the class trying to load it via ServiceLoader:
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:xr/runtime/runtime/src/main/kotlin/androidx/xr/runtime/Session.kt;drc=7de1500561e0bab19cb34df21e77e43ce501147f;l=242 (from the xr-runtime library).This is the library that provides the class:
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:xr/arcore/arcore-openxr/src/main/resources/META-INF/services/androidx.xr.arcore.internal.PerceptionRuntimeFactory;l=1?q=PerceptionRuntimeFactory%20-f:test (arcore-openxr)It looks like you've got the `deps` set up correctly for these, so I think the issue is that our build system ignores non-.class files within prebuilts by default. You should try adding to customizations.gni an entry for `androidx_xr_arcore_arcore_openxr_java` to have it add `include_java_resources=true`
Nick MondelloI tried adding it under template("androidx_android_aar_prebuilt") and template("_androidx_prebuilt"), both seem to not get the file included
Andrew GrieveUpdating this thread. I patched the changes and ran the fetch all script. When looking at the xr split apk, the class is present, so Andrew suspects there might be a subtle build system bug here. He is going to try and repro/fix within the next day or so
Nick MondelloSo, the interface that's being looked for is:
```
androidx.xr.runtime.internal.PerceptionRuntimeFactory
```But the `META-INF/services` filename is: `androidx.xr.arcore.internal.PerceptionRuntimeFactory`
Maybe this package was renamed at some point and the rename forgot to update the META-INF file?
That said, it looks like the loading code tries to load a runtime in other ways as well, so maybe it doesn't need the ServiceLoader call to work? It's hard to tell...If you need it to work, you can add:
```
diff --git a/chrome/android/modules/xr/BUILD.gn b/chrome/android/modules/xr/BUILD.gn
index 5814e009d00df..139b6007a3e8a 100644
--- a/chrome/android/modules/xr/BUILD.gn
+++ b/chrome/android/modules/xr/BUILD.gn
@@ -14,6 +14,8 @@ android_library("java") {
"internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrSceneCoreSessionInitializerImpl.java",
"internal/java/src/org/chromium/chrome/browser/xr/scenecore/XrSceneCoreSessionManagerImpl.java",
]
+ additional_jar_files = [
+ [ "service.txt", "META-INF/services/androidx.xr.runtime.internal.PerceptionRuntimeFactory" ] ]
deps = [
"//base:build_info_java",
"//base:bundle_utils_java",
diff --git a/chrome/android/modules/xr/service.txt b/chrome/android/modules/xr/service.txt
new file mode 100644
index 0000000000000..b58ad5b0ba9f3
--- /dev/null
+++ b/chrome/android/modules/xr/service.txt
@@ -0,0 +1 @@
+androidx.xr.arcore.openxr.OpenXrRuntimeFactory
```Plus this build fix: https://chromium-review.googlesource.com/c/chromium/src/+/7512306
Nick MondelloSGTM. I'll add it to see if progaurd is satisfied. Then will wait on your build fix to land.
Nick MondelloSeems progaurd is still unable to find it 😞
Spoke with Andrew, the progaurd -dontwarn is still needed. Passing!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Hmm... seems like this is a real failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8691399180016458065/+/u/validate_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/run_validator_on_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/stdout
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hmm... seems like this is a real failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8691399180016458065/+/u/validate_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/run_validator_on_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/stdout
The run had passed previously, so I am not sure what changed? But I think this should be expected to be missing as we are removing it. It is now arcore_arcore_openxr. Is there a hard coded check anywhere that needs to be edited?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Looks like this check was recently added.
@r...@google.com - is this safe to bypass?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
"version": "1.7.3"Please double check on the version downgrade of `kotlinx-coroutines-android` from 1.9.0 to 1.7.3 as this may cause compatibility issues.
"version": "1.7.3"Please double check on the version downgrade of `kotlinx-coroutines-android` from 1.9.0 to 1.7.3 as this may cause compatibility issues.
https://chromium-review.googlesource.com/c/chromium/src/+/7004644/5/third_party/androidx/bill_of_materials.json Looking at this cl from sam, they were also downgrading other versions and upgrading this specific one in a manual roll. It is also auto generated. @agr...@chromium.org Is this a reason for concern?
Nick MondelloHmm... seems like this is a real failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8691399180016458065/+/u/validate_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/run_validator_on_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/stdout
The run had passed previously, so I am not sure what changed? But I think this should be expected to be missing as we are removing it. It is now arcore_arcore_openxr. Is there a hard coded check anywhere that needs to be edited?
Resolving. Jordan said there is a fix underway, and we also could use the bypass footer
Nick MondelloHmm... seems like this is a real failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8691399180016458065/+/u/validate_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/run_validator_on_third_party_androidx_committed_libs_androidx_xr_runtime_runtime_openxr_README.chromium/stdout
Nick MondelloThe run had passed previously, so I am not sure what changed? But I think this should be expected to be missing as we are removing it. It is now arcore_arcore_openxr. Is there a hard coded check anywhere that needs to be edited?
Resolving. Jordan said there is a fix underway, and we also could use the bypass footer
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"version": "1.7.3"Nick MondelloPlease double check on the version downgrade of `kotlinx-coroutines-android` from 1.9.0 to 1.7.3 as this may cause compatibility issues.
https://chromium-review.googlesource.com/c/chromium/src/+/7004644/5/third_party/androidx/bill_of_materials.json Looking at this cl from sam, they were also downgrading other versions and upgrading this specific one in a manual roll. It is also auto generated. @agr...@chromium.org Is this a reason for concern?
Resolving. Spoke with Peter he recommended we land this as any issues we can work on, but this needs to get rolled.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
15 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Roll androidx libraries and update JXR related code
Updated scenecore requires updated imports and code.
Roll androidx from kSaH_8VkwR5iiMUNZ... to BRlcqYO1wIQkiQ0OD...
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here: https://autoroll.skia.org/r/androidx-chromium
Please CC
clank...@google.com,clank-libra...@google.com,wn...@google.com
on the revert to ensure that a human is aware of the problem.
To file a bug in Chromium:
https://bugs.chromium.org/p/chromium/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |