mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-22 17:42:18 +01:00
Re-export headless entrypoints in session probe
Kotlin starts publishNowMain, ringStartedMain and poolSyncMain by name in the root library, which in a -t build is the probe file. They failed with "Could not resolve main entrypoint function", so the probe's bypass publish never ran: why C6's bypass never reached a backend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
65df7f6682
commit
96e4388297
@ -102,6 +102,9 @@ debug manifest only). Release builds never set the define.
|
||||
2. Write a dummy passphrase to `files/passphrase` under the app's
|
||||
`Android/data/<pkg>/` dir; the probe moves it into the keystore on launch
|
||||
(`probe_passphrase.dart`). Without one every push is `sync locked`.
|
||||
A probe's `-t` file must re-export the headless entrypoints
|
||||
(`publishNowMain`, ...): Kotlin resolves them by name in the root library,
|
||||
and without them the bypass publish never ran.
|
||||
3. After the bypass: `HOME=<scratch with .config/crdt-sync/password>
|
||||
PYTHONUSERBASE=~/.local /usr/bin/python3 scripts/emu_published.py
|
||||
http://127.0.0.1:9000 out.json`, then `_fallback --dry-run --at <instant>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
import 'package:wake_alarm_sync/main.dart';
|
||||
import 'package:wake_alarm_sync/main.dart' as app;
|
||||
import 'package:wake_alarm_sync/probe/file_driven_scheduler.dart';
|
||||
import 'package:wake_alarm_sync/probe/probe_passphrase.dart';
|
||||
import 'package:wake_alarm_sync/services/alarm_scheduler.dart';
|
||||
@ -33,5 +33,22 @@ Future<void> main() async {
|
||||
await SessionTagSettings.saveTagAt(SessionTagSlot.desk, 'desk');
|
||||
final scheduler = AlarmScheduler();
|
||||
if (!await scheduler.morningLive()) await scheduler.ringNow();
|
||||
runApp(const WakeAlarmSyncApp(newScheduler: FileDrivenScheduler.new));
|
||||
runApp(const app.WakeAlarmSyncApp(newScheduler: FileDrivenScheduler.new));
|
||||
}
|
||||
|
||||
// Kotlin starts the headless engines by entrypoint *name*, resolved in the
|
||||
// root library: the `-t` file. Without these the probe build's bypass,
|
||||
// ring_started and pool-sync engines failed with "Could not resolve main
|
||||
// entrypoint function" and published nothing (C6, emulator 2026-11-22).
|
||||
|
||||
/// See `main.dart`'s [app.ringStartedMain].
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> ringStartedMain() => app.ringStartedMain();
|
||||
|
||||
/// See `main.dart`'s [app.publishNowMain].
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> publishNowMain() => app.publishNowMain();
|
||||
|
||||
/// See `main.dart`'s [app.poolSyncMain].
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> poolSyncMain() => app.poolSyncMain();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user