spxbhuhb / adaptive

Consolidated full-stack application development library for Kotlin
https://adaptive.fun
Apache License 2.0
3 stars 0 forks source link

[plugin] passing a backend as parameter results in an error #59

Open toth-istvan-zoltan opened 2 months ago

toth-istvan-zoltan commented 2 months ago

Using an entry function as a parameter does now work.

====

This results in an runtime browser error:

browser(backend = backend { auto() }) { 
   // ...
}
IrLinkageError: Function 'auto' can not be called: No function found for symbol 'fun.adaptive.auto.api/auto|auto(){}[0]'

====

browser(CanvasFragmentFactory, SvgFragmentFactory, backend = backend {
    worker { AutoWorker() }
    service { AutoService() }
}) {
    // ...
} 
IllegalStateException:           manual implementation function should never be called,           maybe Adaptive plugin is missing from your gradle configuration,           arguments: [[...], function main$slambda$lambda$lambda() {   return new AutoWorker(); }]")

====

This works:

val localBackend = backend { auto() }

browser(backend = localBackend) {
    // ...
}