native

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupLegacyCaches added in v0.6.0

func CleanupLegacyCaches(root string)

CleanupLegacyCaches removes the per-repo Go caches that earlier Grove versions created under .grove/ by redirecting HOME and GOCACHE. The module cache is written with read-only directory permissions, so directories are made writable before removal.

Types

type Analyzer

type Analyzer interface {
	Name() string
	Languages() []string
	Available(context.Context, string) Availability
	Analyze(context.Context, Request) Result
}

Analyzer enriches the tree-sitter/astkit symbol graph with project-native facts from compiler, package-manager, or language-server tooling.

func PriorityAnalyzers

func PriorityAnalyzers() []Analyzer

type Availability

type Availability struct {
	Available bool
	Reason    string
}

type Config

type Config struct {
	Enabled           bool
	Languages         map[string]bool
	DisabledLanguages map[string]bool
	Timeout           time.Duration
}

func ConfigFromEnv

func ConfigFromEnv() Config

func DefaultConfig

func DefaultConfig() Config

type Request

type Request struct {
	Root    string
	Symbols []core.SymbolRecord
	Files   []string
}

type Result

type Result struct {
	Edges       []core.Edge
	Diagnostics []string
	// SkippedLanguages lists languages whose analyzers were skipped because
	// no files of theirs changed; the indexer carries their stored native
	// edges forward instead of dropping them.
	SkippedLanguages []string
}

func Analyze

func Analyze(ctx context.Context, root string, symbols []core.SymbolRecord) Result

func AnalyzeChanged added in v0.6.2

func AnalyzeChanged(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config, changedLanguages map[string]bool) Result

AnalyzeChanged is AnalyzeWithConfig scoped to the languages that actually changed. changedLanguages == nil means "analyze everything" (cold index, --force). An analyzer whose languages saw no changed files is skipped and reported as such — its previous edges are carried forward by the indexer. On a polyglot monorepo this is the difference between a one-file Go edit re-running the whole TypeScript program check and not.

func AnalyzeWithConfig

func AnalyzeWithConfig(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config) Result

Jump to

Keyboard shortcuts

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