Robert Jaros
10/28/2025, 5:16 PMTypeError: callAgent.jsonRpcCall_ij3z26_k$ is not a function error. But it's not so simple. More in thread.Robert Jaros
10/28/2025, 5:17 PMkotlin.incremental=false and kotlin.incremental.js=false doesn't fix the issue.Robert Jaros
10/28/2025, 5:18 PMclean and running dev mode again doesn't fix the issue as well - the error is immediately visible again (even without any other code change).Robert Jaros
10/28/2025, 5:20 PMRobert Jaros
10/28/2025, 5:21 PMRobert Jaros
10/28/2025, 5:22 PMtapchicoma
10/28/2025, 5:33 PMArtem Kobzar
10/28/2025, 5:42 PMRobert Jaros
10/28/2025, 7:23 PMjs + wasmJs (code is in the webMain source set). I'm using useEsModules() and target.set("es2015") options. The kotlin.time.ExperimentalTime and kotlin.js.ExperimentalWasmJsInterop opt-ins are enabled by the gradle plugin. Compose compiler is enabled.Robert Jaros
10/28/2025, 7:32 PMAPP -> LIB1 -> LIB2. The problematic CallAgent() class is defined inside LIB2. The generated .mjs file for LIB2 seems stable and correct. The class is used inside LIB1. The generated .mjs file for LIB1 is correct on initial build. It looks like this:
var callAgent = CallAgent.new_dev_kilua_rpc_CallAgent_uqx5si_k$();
var tmp_5 = callAgent.jsonRpcCall_psige4_k$(url, tmp_3, method, tmp_4, $completion);
After code change inside APP (only some specific files, which reference LIB1) at least one of the generated .mjs files for LIB1 is different and incorrect:
var callAgent = CallAgent.new_dev_kilua_rpc_CallAgent_uqx5si_k$();
var tmp_5 = callAgent.jsonRpcCall_ij3z26_k$(url, tmp_3, method, tmp_4, $completion);
The method name is different and results in TypeError.Robert Jaros
10/28/2025, 7:35 PMRobert Jaros
10/28/2025, 7:36 PMCallAgent() class directly from APP and call this problematic method without issues.Robert Jaros
10/28/2025, 7:40 PMRobert Jaros
10/29/2025, 5:09 AMCallAgent class from LIB2 to LIB1, so it seems to be some kind of a problem with nested dependencies and not the code itself.Artem Kobzar
10/29/2025, 5:11 AMRobert Jaros
10/29/2025, 8:51 AMRobert Jaros
10/29/2025, 9:17 AMArtem Kobzar
10/29/2025, 10:30 AMArtem Kobzar
11/05/2025, 1:24 PMRobert Jaros
11/05/2025, 1:25 PMRobert Jaros
11/06/2025, 6:22 AM