From 497ee97efe86a4d002e089ee8d74f949fd4b9c39 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 1 Jun 2023 17:58:12 +0200 Subject: [PATCH] Add comment. --- .../io/element/android/libraries/architecture/NodeFactories.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt index 82ec21667b..6073b45351 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt @@ -34,6 +34,8 @@ inline fun Context.createNode(context: BuildContext, plugi inline fun NodeFactoriesBindings.createNode(context: BuildContext, plugins: List = emptyList()): NODE { val nodeClass = NODE::class.java val nodeFactoryMap = nodeFactories() + // Note to developers: If you got the error below, make sure to build again after + // clearing the cache (sometimes several times) to let Dagger generate the NodeFactory. val nodeFactory = nodeFactoryMap[nodeClass] ?: error("Cannot find NodeFactory for ${nodeClass.name}.") @Suppress("UNCHECKED_CAST")