Documentation ¶
Overview ¶
Package deptree encapsulates Oyafile file dependency resolution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyTree ¶
type DependencyTree struct {
// contains filtered or unexported fields
}
DependencyTree defines a project's dependencies, allowing for loading them.
func New ¶
New returns a new dependency tree. BUG(bilus): It's called a 'tree' but it currently does not take into account inter-pack dependencies. This will likely change and then the name will fit like a glove. ;)
func (*DependencyTree) Explode ¶
func (dt *DependencyTree) Explode() error
Explode takes the initial list of dependencies and builds the full list, taking into account packs' dependencies and using Minimal Version Selection.
func (*DependencyTree) Find ¶
func (dt *DependencyTree) Find(importPath types.ImportPath) (pack.Pack, bool, error)
Find lookups pack by its import path.
func (*DependencyTree) ForEach ¶
func (dt *DependencyTree) ForEach(f func(pack.Pack) error) error
ForEach iterates through the packs.
func (*DependencyTree) Load ¶
func (dt *DependencyTree) Load(importPath types.ImportPath) (*oyafile.Oyafile, bool, error)
Load loads an pack's Oyafile based on its import path. It supports two types of import paths: - referring to the project's Require: section (e.g. github.com/tooploox/oya-packs/docker), in this case it will load, the required version; - path relative to the project's root (e.g. /) -- does not support versioning, loads Oyafile directly from the path (<root dir>/<import path>).
type ErrResolvingDeps ¶ added in v0.0.9
type ErrResolvingDeps struct { }
func (ErrResolvingDeps) Error ¶ added in v0.0.9
func (e ErrResolvingDeps) Error() string
Notes ¶
Bugs ¶
It's called a 'tree' but it currently does not take into account inter-pack dependencies. This will likely change and then the name will fit like a glove. ;)