TangleCodeGenerator

abstract class TangleCodeGenerator : CodeGenerator

Wraps all code generation in delegateToAnvilUnsafe, which catches Anvil exceptions and rethrows them as TangleCompilationException.

Anvil can be pretty sensitive to attempts to resolve types in generated code, and Tangle generates a lot of code which then needs further code-gen.

If an Anvil exception occurs during Tangle's compilation, it's probably a Tangle in that Tangle's attempting to use an unsupported Anvil API.

In short, this is an attempt to prevent flooding Anvil's issue tracker with Tangle bug reports.

Constructors

Link copied to clipboard
fun TangleCodeGenerator()

Functions

Link copied to clipboard
override fun generateCode(codeGenDir: File, module: ModuleDescriptor, projectFiles: Collection<KtFile>): Collection<GeneratedFile>
Link copied to clipboard
abstract fun generateTangleCode(codeGenDir: File, module: ModuleDescriptor, projectFiles: Collection<KtFile>): Collection<GeneratedFile>
Link copied to clipboard
override fun isApplicable(context: AnvilContext): Boolean

Inheritors

Link copied to clipboard

Sources

Link copied to clipboard