fsresolver

package
v0.0.0-...-62694dd Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package fsresolver resolves class names to Bazel rules using the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver uses the file system to resolve class names to Bazel rules.

func NewResolver

func NewResolver(contentRoots []string, workspaceDir string, loader pkgloading.Loader) *Resolver

NewResolver returns a new Resolver.

func (*Resolver) Name

func (r *Resolver) Name() string

Name returns a description of the resolver.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, classNames []jadeplib.ClassName, consumingRules map[bazel.Label]map[bazel.Label]bool) (map[jadeplib.ClassName][]*bazel.Rule, error)

Resolve finds Bazel rules that provide the classes in 'classnames', by looking at the local filesystem. A classname 'a.b.c.D' is transformed into the filename '[content root]/a/b/c/D.java". We then look for a Bazel rule that has that filename in its 'srcs' attribute.

Returns: (1) a map from each classname to a list of java_library rules that provide the classnames (2) a list of classnames that could not be resolved by this file system approach.

Jump to

Keyboard shortcuts

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