dartloader

package
v0.9.9 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dartloader turns the Dart code of a registered repository into semantic facts by driving the Dart analysis server.

Index

Constants

View Source
const PayloadVersion = 1

Variables

This section is empty.

Functions

func ExternalPackageRepositories

func ExternalPackageRepositories(root, configured string) []workspace.Repository

ExternalPackageRepositories turns the package roots resolved by Pub into explicit providers. They are only returned when the caller opts in; the main repository remains the only default unit and package-cache source is never silently added to a graph.

func Run

func Run(ctx context.Context, command, sdkPath string, repository workspace.Repository, includeGenerated, includeTests bool) (facts.SemanticPayload, error)

Run indexes a Dart project through the SDK's LSP Analysis Server. The server supplies declarations and resolved references; Kivgraph only uses source text to classify an already-resolved occurrence as a call.

func RunWithOptions

func RunWithOptions(ctx context.Context, options Options) (facts.SemanticPayload, error)

RunWithOptions is the configurable Dart entry point used by the full indexer. The Analysis Server owns semantic resolution; this package only translates its results into the versioned Kivgraph payload.

func RunWithRepositories

func RunWithRepositories(ctx context.Context, command, sdkPath string, repository workspace.Repository, includeGenerated, includeTests bool, providers []workspace.Repository) (facts.SemanticPayload, error)

RunWithRepositories is Run with the registered repository roots available for provider identity mapping. The loader still publishes only the consumer repository's files; provider files are read only to identify an analyzer target that crosses a registered repository boundary.

func SDKRoot

func SDKRoot(command string) (string, error)

SDKRoot resolves the Dart SDK directory from the configured dart command. It is exported for the full indexer, which can register the SDK as an explicit provider only when include_sdk is enabled.

Types

type Options

type Options struct {
	Command             string
	SDKPath             string
	Repository          workspace.Repository
	IncludeGenerated    bool
	IncludeTests        bool
	IncludeExternal     bool
	IncludeSDK          bool
	PackageConfig       string
	WaitForAnalysis     bool
	MaximumAnalysisTime time.Duration
	Providers           []workspace.Repository
}

Options controls one authoritative Dart analysis pass. The defaults preserve the historical loader behaviour, while the additional switches make package configuration and bounded analysis explicit to callers.

Jump to

Keyboard shortcuts

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