reslog

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalResolutionSummary

type ExternalResolutionSummary struct {
	Modules    []string
	Products   []Product
	Unresolved []string
}

type ModuleLabel

type ModuleLabel struct {
	Module string
	Label  string
}

type Product

type Product struct {
	Identity string
	Name     string
	Label    string
}

type ResolutionLogger

type ResolutionLogger interface {
	// Log the rule resolution
	Log(rr *RuleResolution) error

	// Flush the log
	Flush() error
}

func NewLoggerFromWriter

func NewLoggerFromWriter(w io.Writer) ResolutionLogger

func NewNoopLogger

func NewNoopLogger() ResolutionLogger

type RuleResolution

type RuleResolution struct {
	From              label.Label
	Rule              *rule.Rule
	Imports           []string
	Builtins          mapset.Set[string]
	LocalRes          map[string][]resolve.FindResult
	ExtResModuleNames []string
	ExtResResult      *swift.ModuleResolutionResult
	HTTPArchiveRes    map[string]swift.Modules
	UnresModuleNames  mapset.Set[string]
	Deps              mapset.Set[string]
}

func NewRuleResolution

func NewRuleResolution(from label.Label, r *rule.Rule, moduleNames []string) *RuleResolution

func (*RuleResolution) AddBuiltin

func (rr *RuleResolution) AddBuiltin(moduleName string)

func (*RuleResolution) AddDep

func (rr *RuleResolution) AddDep(deps ...string)

func (*RuleResolution) AddExternal

func (rr *RuleResolution) AddExternal(moduleNames []string, mrr *swift.ModuleResolutionResult)

func (*RuleResolution) AddHTTPArchive

func (rr *RuleResolution) AddHTTPArchive(moduleName string, modules swift.Modules)

func (*RuleResolution) AddLocal

func (rr *RuleResolution) AddLocal(moduleName string, frs []resolve.FindResult)

func (*RuleResolution) AddUnresolved

func (rr *RuleResolution) AddUnresolved(moduleNames ...string)

func (*RuleResolution) Summary

func (rr *RuleResolution) Summary() RuleResolutionSummary

type RuleResolutionSummary

type RuleResolutionSummary struct {
	Name           string                    `yaml:"name"`
	Kind           string                    `yaml:"kind"`
	Imports        []string                  `yaml:"imports"`
	Builtins       []string                  `yaml:"builtins,omitempty"`
	LocalRes       []ModuleLabel             `yaml:"local_resolution,omitempty"`
	ExtRes         ExternalResolutionSummary `yaml:"external_resolution,omitempty"`
	HTTPArchiveRes []ModuleLabel             `yaml:"http_archive_resolution,omitempty"`
	Unresolved     []string                  `yaml:"unresolved,omitempty"`
	Deps           []string                  `yaml:"deps"`
}

Jump to

Keyboard shortcuts

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