typeprovider

package
v0.3.24 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package typeprovider loads compiler-owned declaration graphs for explicitly imported platform packages. Providers are application-transparent: users import a runtime package and the compiler discovers its types automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(programs []*ast.Program, context Context) (*declaration.Catalog, error)

Types

type Context

type Context struct {
	ProjectRoot            string
	PackageOptions         map[string][]byte
	PackageAliasesByModule map[string]map[string]string
	DeclarationProviders   []declarationproviderhost.Source
}

type InputSnapshot added in v0.3.13

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

InputSnapshot records the syntax and external files that determine the declarations produced by the active type providers.

func CaptureInputs added in v0.3.13

func CaptureInputs(programs []*ast.Program, context Context) InputSnapshot

CaptureInputs creates a lightweight provider dependency snapshot. Providers backed by live resources that cannot be fingerprinted remain non-reusable.

func (InputSnapshot) CanReuse added in v0.3.13

func (s InputSnapshot) CanReuse(previous InputSnapshot) bool

CanReuse reports whether declarations produced for previous remain valid for the receiver's current provider inputs.

Directories

Path Synopsis
Package rails supplies TypeRB declarations for Rails and derives ActiveRecord model types from db/schema.rb.
Package rails supplies TypeRB declarations for Rails and derives ActiveRecord model types from db/schema.rb.
schema
Package schema defines the normalized AST for the subset of Rails schema DSL that contributes model types.
Package schema defines the normalized AST for the subset of Rails schema DSL that contributes model types.

Jump to

Keyboard shortcuts

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