You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9ae4ae4
Browse filesBrowse the repository at this point in the historyBrowse files
ADFA-4931: stop a re-stage from truncating the distribution's own jars
Code review found that linkDistJars could destroy the on-device Gradle
distribution. createSymbolicLink refuses an existing path, the broad catch
swallowed that, and the copy fallback then opened the stale link for write --
which truncates the distribution's jar, not the daemon's copy. Every Gradle
build on the device breaks, and the stamp records it as success.
Deleting the target before linking removes the class of failure. The rest is
the same review's smaller findings:
- link failures leave no stamp, now covered by a test that goes red when the
stamp is written first
- names read from dist-linked-jars.txt must be bare file names, the guard
extractDaemonZip already applies twelve lines up
- a missing list and an empty one now say which one happened
- the copy fallback is reached by injecting the link operation, so the test
named for a symlink-less filesystem tests one
- the daemon zip's exclusion is scoped to the classpath it is about
- two docs bullets said the daemon re-extracts every provision; it re-extracts
when the installed APK changed
Tested: 304 app quickbuild tests green, spotlessCheck green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwtUCGy8fKaSzu2uuUEUPY
Copy file name to clipboardExpand all lines: quickbuild/docs/debugging.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,7 @@ to CoGo.
179
179
| Path | What | How to read it |
180
180
| --- | --- | --- |
181
181
|`files/home/.cg/quickbuild/quickbuild-runtime.aar`| staged runtime AAR, re-staged every provision |`run-as com.itsaky.androidide`|
182
-
|`files/home/.cg/quickbuild/daemon/`| daemon jar, its full runtime classpath, `compose-compiler-plugin.jar`; deleted and re-extracted every provision. The jars named in `dist-linked-jars.txt`, the Kotlin compiler among them, are symlinks into the Gradle distribution's `lib/` rather than extracted files - `ls -l` here, since a broken one surfaces as a `NoClassDefFoundError` on the first compile |`run-as com.itsaky.androidide`|
182
+
|`files/home/.cg/quickbuild/daemon/`| daemon jar, its full runtime classpath, `compose-compiler-plugin.jar`; deleted and re-extracted when the installed APK changed. The jars named in `dist-linked-jars.txt`, the Kotlin compiler among them, are symlinks into the Gradle distribution's `lib/` rather than extracted files - `ls -l` here, since a broken one surfaces as a `NoClassDefFoundError` on the first compile |`run-as com.itsaky.androidide`|
183
183
|`files/home/.cg/quickbuild/bench-events.jsonl`| session event log; bench flag only |`run-as com.itsaky.androidide`|
184
184
|`no_backup/quickbuild-scratch/<name>-<16 hex>/work`| executor payload staging |`run-as com.itsaky.androidide`; **deleted on teardown**|
Copy file name to clipboardExpand all lines: quickbuild/docs/pipeline.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,7 +356,7 @@ flowchart TB
356
356
357
357
Step 7's rebuild fallback re-enters the same runner through `rebuildProxyApp`.
358
358
359
-
1.[QuickBuildArtifactStager](../../app/src/main/java/com/itsaky/androidide/quickbuild/QuickBuildArtifactStager.kt) extracts the runtime AAR and the daemon zip from CoGo's APK assets into `<ANDROIDIDE_HOME>/quickbuild/`. The zip leaves out the eight jars the on-device Gradle distribution already carries, the Kotlin compiler among them; the stager reads their names from `dist-linked-jars.txt` and symlinks the distribution's copies in beside the daemon jar, copying instead if the filesystem refuses a symlink. It re-extracts on **every** provision on purpose: a version-keyed marker serves a stale bundle when content changes without a version bump.
359
+
1.[QuickBuildArtifactStager](../../app/src/main/java/com/itsaky/androidide/quickbuild/QuickBuildArtifactStager.kt) extracts the runtime AAR and the daemon zip from CoGo's APK assets into `<ANDROIDIDE_HOME>/quickbuild/`. The zip leaves out the eight jars the on-device Gradle distribution already carries, the Kotlin compiler among them; the stager reads their names from `dist-linked-jars.txt` and symlinks the distribution's copies in beside the daemon jar, copying instead if the filesystem refuses a symlink. It re-extracts when the installed APK changed, which a stamp file beside the daemon jar records.
360
360
2.[GradleQuickBuildProvisioner](../../app/src/main/java/com/itsaky/androidide/quickbuild/GradleQuickBuildProvisioner.kt) runs the proxy app build through CoGo's existing `BuildService.executeTasks`, then parses `setup.json` into [ProxyAppInfo](../core/src/main/java/org/appdevforall/cotg/quickbuild/data/ProxyAppInfo.kt).
361
361
3.[QuickBuildScratch](../core/src/main/java/org/appdevforall/cotg/quickbuild/data/QuickBuildScratch.kt) creates `noBackupFilesDir/quickbuild-scratch/<projectKey>/{work,out}` and enforces the free-space floor. It must stay on app-private storage - see the README's "Build Scratch Lives in Faster Private Storage".
362
362
4.[QuickBuildClobberCheck](../core/src/main/java/org/appdevforall/cotg/quickbuild/service/provision/QuickBuildClobberCheck.kt) plus [RealIdInstall](../core/src/main/java/org/appdevforall/cotg/quickbuild/domain/reload/RealIdInstall.kt) read the installed package's `android:appComponentFactory` to decide whether the tap clobbers a Standard Run install. Stateless: an install or uninstall outside CoGo cannot leave it stale.
0 commit comments