resolver

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSearchPaths added in v1.7.3

func ParseSearchPaths(raw string) []string

ParseSearchPaths splits a path-list string on os.PathListSeparator, dropping empty entries. Returns nil for empty input.

func PathsFromDepsEdn added in v1.9.0

func PathsFromDepsEdn(dir string) []string

PathsFromDepsEdn reads deps.edn in dir and returns the :paths entries. Returns nil if the file doesn't exist, can't be parsed, or has no :paths.

func PathsFromInputs added in v1.7.3

func PathsFromInputs(explicit, fallback string, explicitSet bool) []string

PathsFromInputs returns the namespace search path from explicit and fallback inputs. When explicitSet is true the explicit value wins even if empty. Otherwise the fallback is used. The returned path is exactly the parsed inputs — the current directory is NOT included implicitly; callers that want it must list "." themselves. An empty input therefore yields no paths.

Types

type NSResolver

type NSResolver struct {

	// LoadedChunks captures the compiled bytecode for each user-loaded namespace.
	// Used by the compiler to serialize all namespaces into a bundle.
	LoadedChunks map[string]*vm.CodeChunk
	// LoadOrder preserves the order in which namespaces were loaded (dependency order).
	LoadOrder []string
	// contains filtered or unexported fields
}

func NewNSResolver

func NewNSResolver(ctx *compiler.Context, path []string) *NSResolver

func (*NSResolver) DiscoverDepsEdn added in v1.9.0

func (r *NSResolver) DiscoverDepsEdn(dir string)

DiscoverDepsEdn reads deps.edn in dir and, if present, appends its :paths entries to the resolver's search path. Called by runtime entry points after NewNSResolver when the caller wants deps.edn support.

func (*NSResolver) Load

func (r *NSResolver) Load(name string) *vm.Namespace

func (*NSResolver) SetPath

func (r *NSResolver) SetPath(path []string)

Jump to

Keyboard shortcuts

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