Fix two real compile errors found by the first actual Android build #92

Merged
robert merged 1 commit from tooling/first-real-android-build into main 2026-09-04 14:34:05 +02:00
Owner

Robert set up the Android SDK locally tonight. With a real JDK 21 and the SDK, :companion:assembleDebug ran for the first time ever against this codebase and found two genuine bugs no host test or hand review caught:

  1. GpxShareImportActivity.kt's doc comment self-closed early. It contained the literal text */* (describing the wildcard-MIME-type intent-filter fallback) inside backticks — backticks don't escape anything for the comment lexer, */ always closes a /** */ block. The doc comment silently ended mid-sentence and everything after it parsed as top-level code, producing dozens of cascading syntax errors with no obvious root cause in the error list. Reworded to avoid the literal sequence.
  2. RouteLibraryScreen.kt used @ExperimentalMaterial3Api surfaces (Scaffold/TopAppBar) without the required @OptIn — a compile error under Kotlin's default opt-in enforcement, not a warning. Added the opt-in to both composables that need it.

Also commits Room's exported schema snapshot (companion/route/schemas/.../2.json, exportSchema = true). Schema version 1 was never captured — no build ever ran against it — so there's nothing to check in for it and a MIGRATION_1_2 test against a historical schema 1 isn't retroactively possible; flagged rather than silently skipped.

Verified: ./gradlew :companion:assembleDebug succeeds end to end and produces a real debug APK — the first time this has ever been confirmed for this codebase.

Robert set up the Android SDK locally tonight. With a real JDK 21 and the SDK, `:companion:assembleDebug` ran for the first time ever against this codebase and found two genuine bugs no host test or hand review caught: 1. **`GpxShareImportActivity.kt`'s doc comment self-closed early.** It contained the literal text `*/*` (describing the wildcard-MIME-type intent-filter fallback) inside backticks — backticks don't escape anything for the comment lexer, `*/` always closes a `/** */` block. The doc comment silently ended mid-sentence and everything after it parsed as top-level code, producing dozens of cascading syntax errors with no obvious root cause in the error list. Reworded to avoid the literal sequence. 2. **`RouteLibraryScreen.kt` used `@ExperimentalMaterial3Api` surfaces (`Scaffold`/`TopAppBar`) without the required `@OptIn`** — a compile error under Kotlin's default opt-in enforcement, not a warning. Added the opt-in to both composables that need it. Also commits Room's exported schema snapshot (`companion/route/schemas/.../2.json`, `exportSchema = true`). Schema version 1 was never captured — no build ever ran against it — so there's nothing to check in for it and a `MIGRATION_1_2` test against a historical schema 1 isn't retroactively possible; flagged rather than silently skipped. **Verified**: `./gradlew :companion:assembleDebug` succeeds end to end and produces a real debug APK — the first time this has ever been confirmed for this codebase.
Fix two real compile errors found by the first actual Android build
Some checks failed
dev-artifact / build-pbw (push) Failing after 0s
dev-artifact / build-apk (push) Failing after 0s
dev-artifact / publish (push) Has been skipped
fast-lane / host-c-tests (push) Failing after 0s
fast-lane / jvm-tests (push) Failing after 0s
fast-lane / pebble-build (push) Failing after 0s
fast-lane / lint-and-secrets (push) Failing after 0s
fast-lane / meta-declares-required-jobs (push) Failing after 0s
fast-lane / host-c-tests (pull_request) Failing after 0s
fast-lane / jvm-tests (pull_request) Failing after 0s
fast-lane / pebble-build (pull_request) Failing after 0s
fast-lane / lint-and-secrets (pull_request) Failing after 0s
fast-lane / meta-declares-required-jobs (pull_request) Failing after 0s
d6feaaf4c2
Robert set up the Android SDK locally tonight (android-37.0/build-tools
37.0.0 — API 37 switched to a major.minor platform-package naming scheme,
which is why the plain "android-37" install failed for him). With a real
JDK 21 and that SDK, :companion:assembleDebug ran for the first time ever
against this codebase and found two genuine bugs no host test or hand
review had caught all night:

1. GpxShareImportActivity.kt's class doc comment contained the literal
   text `*/*` (describing the wildcard-MIME-type intent-filter fallback,
   #24). Backticks don't escape anything for the Kotlin/Java comment
   lexer: */ closes a /** */ block regardless of what's around it, so the
   doc comment silently ended mid-sentence and everything after was
   parsed as top-level code, producing dozens of cascading syntax errors
   with no clear root cause in the error list itself. Reworded to avoid
   the literal sequence.

2. RouteLibraryScreen.kt's Scaffold/TopAppBar calls (#25) use
   @ExperimentalMaterial3Api surfaces without the required @OptIn — this
   is a compile error under Kotlin's default opt-in enforcement, not a
   warning. Added @OptIn(ExperimentalMaterial3Api::class) to both
   RouteLibraryScreen and RouteDetailScreen.

Also commits companion/route/schemas/de.butzei.pedalpebble.route.store.
RouteDatabase/2.json, Room's exported current-schema snapshot
(exportSchema = true, RouteDatabase.kt) generated by this build. Schema
version 1 was never captured — no build ever ran against version 1 before
tonight's migration (#30) landed, so there is nothing to check in for it;
a MIGRATION_1_2 test against a historical schema 1 isn't possible to add
retroactively and is flagged here rather than silently skipped.

Verified: ./gradlew :companion:assembleDebug succeeds end to end and
produces a real debug APK, the first time this has ever been confirmed
for this codebase.

Claude-Session: https://claude.ai/code/session_01DAoXbRmJUf2uxNYBfdAXPt
robert merged commit fc4cb880dc into main 2026-09-04 14:34:05 +02:00
Sign in to join this conversation.
No description provided.