report

package
v0.0.0-...-c52ba3c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveCommit

func ResolveCommit(ctx context.Context, rtx *Context, commit *app.ProjectCommit) (*app.GitCommit, []string, error)

Resolve commit into git commit info

func ResolveHostTools

func ResolveHostTools(ctx context.Context, hostToolPath string) (*app.HostReport, error)

Find host tools

func RunPaths

func RunPaths(ctx context.Context, rtx *Context, target string, singlePath bool, files []string) []*app.BuildPath

Get paths

func RunQuery

func RunQuery(ctx context.Context, rtx *Context, req *app.QueryRequest) (*app.QueryResponse, error)

Run query report based on the input request.

For each input file query the target and create a set of the inputs and outputs associated with all the input files.

func RunReport

func RunReport(ctx context.Context, rtx *Context, req *app.ReportRequest) (*app.Report, error)

Run report request

Setup routines to:

  • resolve the manifest projects
  • resolve build queries

Once the manifest projects have been resolved the build queries can be fully resolved

Types

type BuildDependencies

type BuildDependencies interface {
	Command(ctx context.Context, target string) (*app.BuildCommand, error)
	Input(ctx context.Context, target string) (*app.BuildInput, error)
	Query(ctx context.Context, target string) (*app.BuildQuery, error)
	Path(ctx context.Context, target string, dependency string) (*app.BuildPath, error)
	Paths(ctx context.Context, target string, dependency string) ([]*app.BuildPath, error)
	Deps(ctx context.Context) (*app.BuildDeps, error)
}

type Context

type Context struct {
	RepoBase         string              // Absolute path to repo base
	Repo             RepoDependencies    // Repo interface
	Build            BuildDependencies   // Build interface
	Project          ProjectDependencies // Project interface
	WorkerCount      int                 // Number of worker threads
	BuildWorkerCount int                 // Number of build worker threads
	Info             *ProjectInfo        // Project information
}

Report context

func (*Context) ResolveProjectMap

func (rtx *Context) ResolveProjectMap(ctx context.Context, manifest string, upstreamBranch string)

Resolve the manifest

type ProjectDependencies

type ProjectDependencies interface {
	Project(ctx context.Context, path string, gitDir string, remote string, revision string) (*app.GitProject, error)
	PopulateFiles(ctx context.Context, proj *app.GitProject, upstream string) error
	CommitInfo(ctx context.Context, proj *app.GitProject, sha string) (*app.GitCommit, error)
}

type ProjectInfo

type ProjectInfo struct {
	ProjMap   map[string]*project // Map project name to project
	FileCache map[string]*project // Map source files to project
}

Project information containing a map of projects, this also contains a map between a source file and the project it belongs to allowing a quicker lookup of source file to project

type RepoDependencies

type RepoDependencies interface {
	Manifest(filename string) (*app.RepoManifest, error)
}

type RepoMan

type RepoMan struct {
}

func (*RepoMan) Manifest

func (r *RepoMan) Manifest(filename string) (*app.RepoManifest, error)

Jump to

Keyboard shortcuts

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