From 487dd3f2aca7c93218ab42e357fad9beea15048c Mon Sep 17 00:00:00 2001 From: nrobi144 Date: Tue, 19 May 2026 09:48:01 +0300 Subject: [PATCH] fix(desktop): disable method/marking/static ProGuard optimization The smoke test discovered that ProGuard's method/marking/static pass converts kmp-tor's AsyncFs.of() from instance to static. The JVM then throws IncompatibleClassChangeError at launch because callers still use invokevirtual. Also updates smoke-test-desktop.yml trigger: runs on any PR touching desktopApp/ (not just build config files). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/smoke-test-desktop.yml | 15 +++------------ desktopApp/compose-rules.pro | 9 +++++++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/smoke-test-desktop.yml b/.github/workflows/smoke-test-desktop.yml index c00616a26..5e1d7325c 100644 --- a/.github/workflows/smoke-test-desktop.yml +++ b/.github/workflows/smoke-test-desktop.yml @@ -1,20 +1,11 @@ -# ⚠️ WARNING: Before merging, change the trigger back to workflow_dispatch only. -# The pull_request trigger is temporary so we can validate this workflow on the PR -# and attach run results as proof-of-work. Production trigger should be: -# -# on: -# workflow_dispatch: -# pull_request: -# paths: -# - 'desktopApp/build.gradle.kts' -# - 'desktopApp/compose-rules.pro' -# - '.github/workflows/smoke-test-desktop.yml' -# name: Desktop Smoke Test on: workflow_dispatch: pull_request: + paths: + - 'desktopApp/**' + - '.github/workflows/smoke-test-desktop.yml' permissions: contents: read diff --git a/desktopApp/compose-rules.pro b/desktopApp/compose-rules.pro index 8241422ed..5b0df2a51 100644 --- a/desktopApp/compose-rules.pro +++ b/desktopApp/compose-rules.pro @@ -121,9 +121,14 @@ # Reason: Type 'okio/BufferedSource' is not assignable to # 'okio/RealBufferedSource'. # -# Disabling just this sub-pass keeps merging, inlining, peephole and +# Disabling just these sub-passes keeps merging, inlining, peephole and # dead-code optimizations on. Everything else in `optimize` stays. --optimizations !method/specialization/returntype +# +# `method/marking/static` converts instance methods to static when they +# don't reference `this`. kmp-tor's `AsyncFs.of()` is called via +# invokevirtual; after ProGuard marks it static the JVM throws +# IncompatibleClassChangeError at launch (discovered by CI smoke test). +-optimizations !method/specialization/returntype,!method/marking/static # ============================================================================ # Desktop-only: Jackson — mobile module does not ship Jackson on Android