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