CompilerArgsConfigurator

This interface defines the command line arguments that are being applied to the Kotlin Compiler as part of the ScriptCompilationConfiguration. The syntax is the same as CLI Compiler Arguments, e.g., -no-stdlib. The validity of arguments is not checked until the compiler is invoked and any errors will be reported back through ResultDiagnostics.

Compiler arguments can be modified between each notebook cell evaluated, but this depends on the ScriptCompilationConfiguration being updated, however, this is the default behavior.

See also

Inheritors

Functions

Link copied to clipboard
abstract fun addArg(arg: String)

Manually add a single command line argument.

Link copied to clipboard
abstract fun configure(configuration: ScriptCompilationConfiguration, annotations: List<Annotation>): ResultWithDiagnostics<ScriptCompilationConfiguration>

This method is called as part of the org.jetbrains.kotlinx.jupyter.codegen.FileAnnotationsProcessor and is responsible for extracting any relevant compiler args from the list of jupyter.kotlin.CompilerArgs annotations found in the notebook cell.

Link copied to clipboard
abstract fun getArgs(): List<String>

Get all compiler arguments for the current ScriptCompilationConfiguration. configure or addArg should be called before this method.