build

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package build holds the dependency graph and two-tier invalidation (FR-061, solution design M5). Tier one covers Go source changes: a changed route registration invalidates the route table and every unit whose generated output embeds route state. Tier two covers .ghtmx changes: a changed unit invalidates itself plus every unit whose diagnostics depend on it — pages referencing its templates and fragments, and files referencing events it declares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoutesChanged

func RoutesChanged(old, updated *routes.Table) bool

RoutesChanged reports whether two route tables differ observably: verbs, paths, handlers, parameters, nav markers, or order-independent membership.

Types

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

Graph is the whole-set dependency graph, built from the analyzer's per-file facts. It is immutable; rebuild it after re-analysis.

func NewGraph

func NewGraph(facts map[string]analyzer.DependencyFacts) *Graph

NewGraph builds the graph from the analyzer's dependency facts.

func (*Graph) BoundFiles

func (g *Graph) BoundFiles() []string

BoundFiles returns the units whose generated output embeds route state: tier-one invalidation regenerates exactly these when the route table changes.

func (*Graph) OnTemplateChange

func (g *Graph) OnTemplateChange(file string) []string

OnTemplateChange returns every unit invalidated by a change to file: the file itself, the transitive closure of units referencing its declarations (a fragment edit invalidates every page rendering it, even through intermediate fragments), and units referencing events the changed file declares. The result is sorted; an unrelated template returns only itself.

Jump to

Keyboard shortcuts

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