when i do ```defaultImports.append("voodoo.dsl.*")...
# scripting
when i do
Copy code
that show allow the script to use all extension functions declared in that package correct ? i am facing some weird issues while trying to work on the DSL accessible from the scripts errors like
'fun <E : NestedEntry> NestedEntry.Curse.list(initList: ListBuilder<NestedEntry.Curse>.() -> Unit): NestedEntry.Curse' can't be called in this context by implicit receiver. Use the explicit one if necessary
function looks like
Copy code
fun <E: NestedEntry> E.list(
    initList: ListBuilder<E>.() -> Unit
): E {
    val listBuilder = ListBuilder(this)
    // add all entries from list
    entries += listBuilder.listEntries
    return this
and i am not sure why it cannot be called on a receiver.. maybe the DSL markers mess it up.. but i call it directly on the object and it also compiles in other parts of the code that are not compiled by script
The default imports for scripts should not behave differently from the regular kotlin files. But there could be problems with dependencies - in order to see the extension functions (and other top=level declarations that do not have their Java equivalents), the compiler needs to see the kotlin metadata files. Some classpath/dependencies magic can fail to provide ways for compiler to access it.