Documentation
¶
Overview ¶
Package assetusage finds statically referenced generated assets in cartridge source.
Index ¶
- Constants
- type Options
- type Result
- func Analyze(directory, modulePath string, names []string) Result
- func AnalyzeUI(directory, modulePath string, names []string) Result
- func AnalyzeUIWithComponents(directory, modulePath string, names []string, ...) Result
- func AnalyzeUIWithOptions(directory, modulePath string, names []string, ...) Result
- func AnalyzeWithOptions(directory, modulePath string, names []string, ...) Result
- func AnalyzeWithUI(directory, modulePath string, names []string, ...) Result
Constants ¶
const ( ReasonTypedReference = "typed reference" ReasonStaticName = "static logical name" ReasonDynamicLookup = "dynamic texture lookup retains the project texture scope" ReasonAnalysisFailed = "type analysis was incomplete; retaining the project texture scope" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶ added in v0.0.2
type Options struct {
Compiler string
}
Options selects the cartridge compiler whose source constraints are analyzed. An empty Compiler selects the standard Go WASI target.
type Result ¶
Result describes the conservative live texture set.
func Analyze ¶
Analyze type-checks the generated engine package together with project source. An analysis uncertainty retains all assets instead of risking a false strip.
func AnalyzeUI ¶
AnalyzeUI retains named UI references and conservatively retains the complete UI scope when a lookup is dynamic, a method escapes, or typing is incomplete.
func AnalyzeUIWithComponents ¶ added in v0.0.2
func AnalyzeUIWithComponents(directory, modulePath string, names []string, components []uicompiler.Component) Result
AnalyzeUIWithComponents shares the exact compiled component graph with build.
func AnalyzeUIWithOptions ¶ added in v0.0.2
func AnalyzeUIWithOptions(directory, modulePath string, names []string, components []uicompiler.Component, options Options) Result
AnalyzeUIWithOptions selects source for the cartridge's compiler and target.
func AnalyzeWithOptions ¶ added in v0.0.2
func AnalyzeWithOptions(directory, modulePath string, names []string, components []uicompiler.Component, options Options) Result
AnalyzeWithOptions uses the same WASI source selection as the cartridge build.
func AnalyzeWithUI ¶ added in v0.0.2
func AnalyzeWithUI(directory, modulePath string, names []string, components []uicompiler.Component) Result
AnalyzeWithUI uses the build's resolved components, including package exports. Nil components preserve standalone project discovery and conservative fallback.