deptree

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 Imported by: 0

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

func New(rootDir string, installDirs []string, dependencies []pack.Pack) (*DependencyTree, error)

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. ;)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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