build: document the poisoned build cache; compare like with like
An entire module was missing from the APK. The app died with ClassNotFoundException for app.echo_lot.protocol.EnrollmentLink while the build was green, the module's jar was correct, and :app:dependencies listed it on debugRuntimeClasspath — its code simply never reached AGP's intermediates. The cause was a poisoned Gradle build cache entry, which is why nothing obvious fixed it: clean, rm -rf */build and --rerun-tasks all leave the build cache alone. Only --no-build-cache did. Every app build made in this session shipped without core-protocol, so enrolment, sign-in and upload would all have crashed identically; several hours of "the tap does nothing" were this, misread as a UI problem. CLAUDE.md now carries the symptom, the fix, and the verification — grepping the dex for a string literal only that module defines, because grepping for a class *name* proves nothing: callers carry the name as a reference whether or not the class is packaged. That false check is what let me believe an earlier rebuild had fixed it. Also: the enrolment dialog compared the stored endpoint against the link's public URL, so re-enrolling with the same server announced itself as a move to a different one. Those are deliberately different strings now that discovery exists; the comparison uses the public name on both sides. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
bc384531e6
commit
f6e093944c
@@ -285,7 +285,11 @@ class RunViewModel(app: Application) : AndroidViewModel(app) {
|
||||
state = state.copy(
|
||||
pendingEnroll = PendingEnroll(
|
||||
link = link,
|
||||
currentServer = settings.serverUrl,
|
||||
// Compared against the link's URL, which names the server publicly — so this
|
||||
// has to be the public name too. Using the endpoint made re-enrolling with the
|
||||
// same server look like a move to a different one, because the endpoint and
|
||||
// the public name are deliberately different strings.
|
||||
currentServer = settings.serverPublicUrl,
|
||||
newServer = target,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user