Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced

ScriptCompiler.CompileAuthoringGenerationAsync

Section titled “ScriptCompiler.CompileAuthoringGenerationAsync”
  • Compiles a complete runtime and editor candidate generation without activating it.

API: engine
Project: Inno.Scripting.Compiler

public System.Threading.Tasks.ValueTask<Inno.Scripting.Compiler.ScriptCompilationResult> Inno.Scripting.Compiler.ScriptCompiler.CompileAuthoringGenerationAsync(System.IProgress<Inno.Scripting.Compiler.ScriptCompilationProgress>? progress = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Inno.Assets.Pipeline.IAssetSourceSnapshot? sourceSnapshot = null)

Source discovery captures live inputs on the owner thread. Reference generation, Roslyn and artifact writes run in the background; progress observers must accept callbacks from either thread. Retain the source generation until the returned operation drains, including after cancellation. Complete cache trees use Core IO atomic publication and replacement. A committed cache remains valid if cleanup of its previous tree fails; compilation does not activate either generation.

Parameter progress: Optional observer for monotonic compiler progress.

Parameter cancellationToken: The token that cancels compilation before an artifact generation is committed.

Parameter sourceSnapshot: Optional isolated authoring sources. Capture on its owner thread and keep its transaction alive until compilation drains; null selects the current Plugin candidate or active sources.

The immutable diagnostics and artifacts produced by the compilation attempt.

Exception T:System.OperationCanceledException: Thrown when cancellationToken is canceled.

Exception T:System.IO.IOException: Artifact publication fails, or cleanup fails after a complete cache tree commits.

Exception T:System.UnauthorizedAccessException: The filesystem continues denying artifact access after the bounded Core IO wait.

Exception T:System.AggregateException: Cache replacement and restoration both fail; the exception identifies the preserved previous tree.