projectcompile

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package projectcompile owns the shared parse-independent project compiler pipeline used by the CLI, dev server, language tools, and future embedders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(config gowdk.Config, sources gwdkanalysis.Sources, options Options) (Snapshot, Diagnostics, error)

Compile runs the canonical analyze -> contract link -> validate sequence.

func CompileContext

func CompileContext(ctx context.Context, config gowdk.Config, sources gwdkanalysis.Sources, options Options) (Snapshot, Diagnostics, error)

CompileContext is Compile with cancellation between every owning phase.

func Program

func Program(snapshot Snapshot) gwdkir.Program

Types

type Diagnostic

type Diagnostic struct {
	Stage    string
	Code     string
	Source   string
	Line     int
	Column   int
	Span     source.SourceSpan
	Related  []source.RelatedSpan
	Severity string
	Message  string
}

type Diagnostics

type Diagnostics []Diagnostic

func (Diagnostics) Error

func (items Diagnostics) Error() string

func (Diagnostics) HasErrors

func (items Diagnostics) HasErrors() bool

type Mode

type Mode uint8
const (
	ProjectMode Mode = iota
	SourceMode
)

type Options

type Options struct {
	ProjectRoot   string
	Mode          Mode
	ScanContracts bool
}

type Snapshot

type Snapshot struct {
	Analyzed  compiler.AnalyzedProgram
	Validated compiler.ValidatedProgram
	Contracts contractscan.Report
}

Snapshot is one immutable-by-convention compilation result. Every consumer receives the same analyzed and validated phase values rather than rebuilding or relinking IR in a command-specific order.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL