Commit Graph

9 Commits

  • Fix two Windows ARM64 failures: JDK-8371740 and a needless JDK download
    Neither is related to the jmods work; both were visible only on the
    windows-11-arm runner.
    
    1. Gradle hung at build shutdown. The runner's ambient JAVA_HOME is Temurin
       21.0.12 aarch64, and JDK-8371740 — a LinkedTransferQueue race fixed only
       in JDK 26 — makes Gradle on Windows ARM64 hang whenever it runs on JDK
       21+, failing the build after the installer was already written with
       "Timeout waiting for concurrent jobs to complete". Gradle's own repo and
       linroid/Ketch both carry workarounds for this. Pin the Gradle JVM to 17,
       which is what the x64 job already does; Adoptium ships no Windows aarch64
       17, hence the new `java-distribution` input and zulu there. Packaging is
       unaffected: resolvePackagingJdkHome() rejects 17 as too old and falls back
       to the Java 25 toolchain JDK for jpackage.
    
    2. "Ensure ARM64 packaging JDK" stalled for minutes and looked hung. The
       script only scanned C:\Program Files\Eclipse Adoptium, but hosted ARM64
       runners ship their ARM64 Temurin 21 under the hostedtoolcache, so the scan
       missed it and fell through to downloading a ~180 MB JDK via
       Invoke-WebRequest + Expand-Archive. Re-running the job showed it still
       installing 3m24s later. Accept JAVA_HOME when it reports os.arch=aarch64 —
       the script's own comments already call Java 21 good enough as the Gradle
       daemon JVM.
  • Fix silent launch failure: require Java 25 packaging JDK
    jvmToolchain(25) (f89619a) compiles classes to class file 69, but
    resolvePackagingJdkHome() accepted any JDK that shipped jpackage. On Windows
    ARM64 the candidate list hardcoded jdk-21-arm64 first and
    ensure-windows-arm64-jdk.cmd provisioned Temurin 21; on macOS the first
    candidate was Adoptium 17. jpackage then bundled a Java 17/21 runtime and the
    installed app died at launch with UnsupportedClassVersionError on the hidden
    launcher's stderr (invisible: GUI subsystem, no error dialogs).
    
    CI hit this too: setup-java-gradle installs Temurin 17 and the workflows
    export FROMCHAT_PACKAGING_JDK="$JAVA_HOME", which the resolver returned
    verbatim — so the x64 installer built by desktop-windows-x64.yml was broken
    on launch.
    
    - build.gradle.kts: version-gate FROMCHAT_PACKAGING_JDK / JAVA_HOME /
      candidate JDKs to >= desktopJvmTarget (25) with a warning, then fall back to
      the Gradle-provisioned toolchain JDK (recursive .gradle/jdks scan).
    - ensure-windows-arm64-jdk.cmd: prefer an installed jdk-25* or the
      Gradle-provisioned Java 25 toolchain JDK; Temurin 21 remains only the
      last-resort daemon JVM.
    
    Ported from c53b54b, minus ensure-windows-x64-jdk.cmd and diag-launch.ps1:
    this branch has no packageWindowsX64 path to feed, and diag-launch.ps1 is
    machine-specific and unreferenced.
    
    Verified on macOS: createDistributable now bundles JAVA_VERSION 25.0.4.1,
    matching class file 69, where a previous build had bundled 17.0.19.
  • Simplify release CI: build only, inline workflow steps.
    Remove test/smoke jobs and ci-*.sh scripts; embed compile, packaging, and version setup directly in release.yml.
    
    Co-authored-by: Cursor <cursoragent@cursor.com>
  • Add optimized multi-platform release CI/CD pipeline.
    Split Windows builds into shared x64 prep and arch-specific packaging, add comprehensive caching, verification scripts, and a PR smoke workflow.
    
    Co-authored-by: Cursor <cursoragent@cursor.com>