Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ data class ProxyAppInfo(
val supportsComponentInfo: Boolean
get() = schema >= COMPONENT_SCHEMA_VERSION

/**
* Proxy class of the activity that carries MAIN/LAUNCHER, or null when none does; a null
* makes the launcher fall back to the package's default launch intent, which also resolves
* an `<activity-alias>` launcher.
*
* The restart deploy, the rebuild relaunch and the foreground switch all launch this, so
* the three cannot drift apart.
*/
val launcherProxyClass: String?
get() = components.firstOrNull { it.kind == ComponentKind.ACTIVITY && it.launcher }?.proxyClass

companion object {
private val log = LoggerFactory.getLogger("QB-ProxyAppInfo")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ sealed interface BuildOutcome {
val message: String,
val daemonDied: Boolean = false,
) : BuildOutcome

companion object {
/**
* Fallback copy for a messageless throwable escaping the pipeline. The class name is
* in the ERROR log line the catch already writes, where it helps; on the status
* surface it reads as gibberish.
*/
const val UNEXPECTED_FAILURE = "Quick Build stopped unexpectedly"
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ class LiveReloadOrchestrator(
throw e
} catch (e: Throwable) {
log.error("Quick build #{} threw instead of reporting an outcome", buildId, e)
BuildOutcome.InfrastructureFailure(e.message ?: e.javaClass.name)
BuildOutcome.InfrastructureFailure(e.message ?: BuildOutcome.UNEXPECTED_FAILURE)
}
onBuildFinished(buildId, outcome)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ sealed interface QuickBuildMessage {
/** The proxy app rebuild failed with no more specific cause to report. */
data object RebuildFailed : QuickBuildMessage

/**
* Provisioning died on an unexpected error that carried no message of its own.
*
* The fallback for a throw whose `message` is null (a bare NPE or `check`): the exception
* class name is diagnostic, belongs in the error log, and would read as gibberish on a
* banner - so the user gets this named case and the log keeps the class and stack.
*/
data object ProvisioningFailedUnexpectedly : QuickBuildMessage

/**
* App storage is too tight to hold the build's intermediates. Checked up front so this
* fails in seconds rather than minutes into a build.
Expand Down
Loading
Loading