Warn in Gradle log when incremental compilation fails
When incremental compilation fails, we currently log it at the `debug` level (and fall back to non-incremental compilation). This commit will change it to `warning` so that we can get more user reports, which will allow us to fix the root cause. Also make sure the warning includes a stack trace. Additionally, let ReportSeverity.fromCode() return a non-null value or throw an exception otherwise as that case is not expected. ^KT-52839 In Progress
This commit is contained in:
+3
-2
@@ -48,8 +48,9 @@ enum class ReportSeverity(val code: Int) {
|
||||
DEBUG(3);
|
||||
|
||||
companion object {
|
||||
fun fromCode(code: Int): ReportSeverity? =
|
||||
ReportSeverity.values().firstOrNull { it.code == code }
|
||||
fun fromCode(code: Int): ReportSeverity {
|
||||
return values().firstOrNull { it.code == code } ?: error("Can't find a matching ReportSeverity with code = $code")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user