In K2 IDE path, `FirScriptConfigurationExtensionIm...
# scripting
w
In K2 IDE path,
FirScriptConfigurationExtensionImpl
uses
valueOr
on the refinement result (line 88), which means: • `Success`diagnostics are silently discarded • `Failure`shuts down all analysis for the file Is there a way for script definition providers to report partial errors (e.g. "dependency not found") while still keeping the rest of the configuration working? Currently there's no middle ground.
Copy code
getOrLoadConfiguration(session, sourceFile!!)?.valueOr {
    addErrorElement("Unable to get script compilation configuration: ${it.reports.joinToString("; ") { it.message}}")
    return
}
v
cc @ilya.chernikov
i
If I understand your question correctly, you just need to add a diagnostic to the
Success
result in your refinement callback. Both the
Success
and the
Failure
can carry diagnostics.