Support typed WorkManager worker APIs in the Android compiler #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The
jerboa-mailAndroid migration needs periodic background inbox sync through AndroidX WorkManager. Android application code must stay in typed Jerboa; raw Kotlin string/file escapes are not an acceptable workaround.Using the currently pinned Android generator/runtime revisions, compiling a typed worker declaration that passes
Class<out ListenableWorker>toPeriodicWorkRequest.Builderfails with typed-module diagnostics:A narrowly scoped compiler experiment in the Jerboa core showed the missing type capability: compound
Class<T>typing and Kotlin lowering tojava.lang.Class<T>(includingoutprojections). Its focused checker/lowering tests pass, but that support is not available through the Android app's current pinned toolchain.Required support
Please expose a supported typed Android path for implementing and scheduling a WorkManager worker without embedding Kotlin source strings. At minimum, the toolchain should support:
Class<T>andClass<out T>in typed declarations and extern signatures, including a safe class literal or typed class lookup mechanism.Workerwith a typeddoWorkoverride returningListenableWorker.Result.PeriodicWorkRequestwith the worker class and interval, then scheduling/canceling unique work throughWorkManager.Contextto load the encrypted account configuration and execute background sync.Acceptance criteria
Workersubclass and unique periodic scheduling/cancellation..ssfiles.