java_export_index

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JavaExportIndex

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

JavaExportIndex holds information about `java_export` targets and which symbols they make available, so that other java targets can depend on the right `java_export` instead of fine-grained dependencies.

func NewJavaExportIndex

func NewJavaExportIndex(langName string, logger zerolog.Logger) *JavaExportIndex

func (*JavaExportIndex) FinalizeIndex

func (jei *JavaExportIndex) FinalizeIndex()

func (*JavaExportIndex) IsExportedByJavaExport

func (jei *JavaExportIndex) IsExportedByJavaExport(lbl label.Label) (*JavaExportResolveInfo, bool)

func (*JavaExportIndex) IsJavaExport

func (jei *JavaExportIndex) IsJavaExport(lbl label.Label) bool

func (*JavaExportIndex) NewJavaExportResolveInfoFromRule

func (jei *JavaExportIndex) NewJavaExportResolveInfoFromRule(repoName string, r *rule.Rule, file *rule.File) *JavaExportResolveInfo

func (*JavaExportIndex) RecordJavaExport

func (jei *JavaExportIndex) RecordJavaExport(repoName string, r *rule.Rule, f *rule.File)

RecordJavaExport lets the index know about a java_export rule, for later resolution. Must be called before FinalizeIndex.

func (*JavaExportIndex) RecordRuleWithResolveInput

func (jei *JavaExportIndex) RecordRuleWithResolveInput(repoName string, file *rule.File, r *rule.Rule, resolveInput types.ResolveInput)

RecordRuleWithResolveInput lets the index know about a rule that might declare some packages, and might depend on some other packages later. Must be called before FinalizeIndex.

func (*JavaExportIndex) VisibilityForLabel

func (jei *JavaExportIndex) VisibilityForLabel(lbl label.Label) *sorted_set.SortedSet[label.Label]

VisibilityForLabel returns the visibility that a target label.Label should have, according to the JavaExportIndex. Returns nil if the JavaExportIndex doesn't have an opinion on what visibility a target should have.

type JavaExportResolveInfo

type JavaExportResolveInfo struct {
	Rule               *rule.Rule
	Label              label.Label
	DirectDependencies map[label.Label]bool
	InternalVisibility *sorted_set.SortedSet[label.Label]
}

JavaExportResolveInfo captures metadata about a java_export rule. We could capture this in private attributes, but we need to access it from every java_library exported by the given java_export, and we can't access other rule.Rule instances during resolve.

Jump to

Keyboard shortcuts

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