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
Android 14 HttpEngine support #8956
Comments
That would be great but would be a highly complex project. |
@hoisie does it have to be complex? Can we choose a simpler option for now? This works (I'm using cronet API, not HttpEngine) with the Java fallback
Should I put up a PR and see? |
@yschimke A new PR for future discuss is good. Does cronet-fallback library support Windows and macOS arm64? |
If enabling the fallback is simply a matter of projects adding |
I think there is some plumbing required. But the APIs match so I hope it's fairly simple |
A few points here:
|
@fridek thanks for the additional context 👍 It is understandable that Cronet is not built for Windows and MacOS by default, that would add unnecessary development overhead for your team. The same is true for Android's SQLite and graphics targets. Robolectric has a custom AOSP branch that enables Windows and MacOS builds for these targets. We try to upstream changes wherever possible, and we collaborate with the LayoutLib team as they have similar goals (essentially building libandroid_runtime on host platforms). I don't think there is a requirement to use GRPC in Robolectric at the moment. This would be a complex project and we have a lot of other projects in the pipeline at the moment. However, due to recent advances in graphics, teams are now running larger and larger tests in Robolectric, and we are trying to work towards supporting larger integration-style tests. The resource savings of migrating tests to Robolectric are considerable. |
I'm not blocked on this. More raising it for discussion. If you decide it shouldn't be supported, then your collective call. For me, I'd expect to be able to hit a test or mock server as part of my tests. And would be annoyed to give up robolectric testing to use HttpEngine. Robolectric can now run a "native" display, with "native" sqlite, and works with OkHttp or URL connection to a test server. |
It seems like a small override of https://cs.android.com/android/platform/superproject/main/+/main:external/cronet/android/java/src/android/net/http/HttpEngine.java;drc=b520a15dc110253cf27b170fa7ac103fafcebade;bpv=1;bpt=1;l=382 Or a shadow apps can apply? might unblock the non GRPC cases. |
The following test fails using the HttpEngine api
error
Ideally it would work using a cronet build for the platform. Or alternatively this call might fallback to URLConnection, but that wouldn't be ideal.
The text was updated successfully, but these errors were encountered: