bzlmod

package
v0.0.0-...-93fe2d4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package bzlmod contains functions for working with MODULE.bazel files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRepoUsages

func AddRepoUsages(useRepos []*build.CallExpr, repos ...string)

AddRepoUsages adds the given repos to the given use_repo calls without introducing duplicate arguments. useRepos must not be empty. Keyword arguments are preserved but adding them is currently not supported.

func AllProxies

func AllProxies(f *build.File, proxy string) []string

AllProxies returns the names of all extension proxies (i.e. the names of variables to which the result of a use_extension call is assigned) corresponding to the same extension usage as the given proxy. For an isolated extension usage, a list containing only the given proxy is returned. For a non-isolated extension usage, the proxies of all non-isolated extension usages of the same extension with the same value for the dev_dependency parameter are returned. If the given proxy is not an extension proxy, nil is returned.

func NewUseRepo

func NewUseRepo(f *build.File, proxies []string) (*build.File, *build.CallExpr)

NewUseRepo inserts and returns a new use_repo call after the last usage of any of the given proxies, where a usage is either a use_extension call or a tag definition.

func Proxies

func Proxies(f *build.File, rawExtBzlFile string, extName string, dev bool) []string

Proxies returns the names of extension proxies (i.e. the names of variables to which the result of a use_extension call is assigned) for the given extension with the given value of the dev_dependency attribute. Extension proxies created with "isolate = True" are ignored.

func RemoveRepoUsages

func RemoveRepoUsages(useRepos []*build.CallExpr, repos ...string)

RemoveRepoUsages removes the given repos from the given use_repo calls. Repositories are identified via their names as exported by the module extension (i.e. the value rather than the key in the case of keyword arguments).

func UseRepos

func UseRepos(f *build.File, proxies []string) []*build.CallExpr

UseRepos returns the use_repo calls that use the given proxies.

Types

This section is empty.

Jump to

Keyboard shortcuts

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