Jack
02/04/2022, 2:16 PMval Meta.helloWorld: CliPlugin get() =
"Hello World" {
meta(
namedFunction(this, { true } ) { c ->
println("remove")
Transform.remove(c.element)
}
)
}
@AutoService(ComponentRegistrar::class)
class MetaPlugin: Meta {
override fun intercept(ctx: CompilerContext): List<CliPlugin> =
listOf(helloWorld)
}
Jack
02/04/2022, 2:19 PMRegistering Cli plugin: Plugin(name=Hello World, meta=arrow.meta.phases.CompilerContext.() -> kotlin.collections.List<arrow.meta.phases.ExtensionPhase>) extensions: arrow.meta.phases.CompilerContext.() -> kotlin.collections.List<arrow.meta.phases.ExtensionPhase>
I get the following in the logs, so it seems to be hooking in correctly, however, I would assume that it should not build successfully if I have removed the method. However, it all works fine.
I started with the hello world replace example, but again, although it calls the transform method, on the method it should, it doesn't seem to be changing anythingJack
02/22/2022, 3:48 PM