Documentation
¶
Index ¶
- func CleanupLegacyCaches(root string)
- type Analyzer
- type Availability
- type Config
- type Request
- type Result
- func Analyze(ctx context.Context, root string, symbols []core.SymbolRecord) Result
- func AnalyzeChanged(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config, ...) Result
- func AnalyzeChangedFiles(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config, ...) Result
- func AnalyzeWithConfig(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config) Result
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 Config ¶
type Config struct {
Enabled bool
Languages map[string]bool
DisabledLanguages map[string]bool
Timeout time.Duration
// TimeoutPinned marks an explicit user-set timeout (GROVE_NATIVE_TIMEOUT*)
// — size-scaling is skipped so the pin is honored exactly.
TimeoutPinned bool
}
func ConfigFromEnv ¶
func ConfigFromEnv() Config
func DefaultConfig ¶
func DefaultConfig() Config
type Request ¶
type Request struct {
Root string
Symbols []core.SymbolRecord
Files []string
// ChangedFiles, when non-empty, allows the analyzer to scope expensive
// per-package work to the packages containing these files (plus their
// reverse importers). An analyzer that scopes MUST report the analyzed
// package dirs in Result.Partial so the indexer carries the stored
// native edges of every other package forward.
ChangedFiles []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
// Partial maps a language to the package dirs its analyzer actually
// re-analyzed this run. The indexer carries stored native edges of that
// language whose source file lives OUTSIDE those dirs.
Partial map[string][]string
}
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 AnalyzeChangedFiles ¶ added in v0.17.0
func AnalyzeChangedFiles(ctx context.Context, root string, symbols []core.SymbolRecord, cfg Config, changedLanguages map[string]bool, changedFiles []string) Result
AnalyzeChangedFiles additionally passes the changed file list so analyzers can scope per-package work (see Request.ChangedFiles).