Documentation ¶
Overview ¶
Package bzlmod contains functions for working with MODULE.bazel files.
Index ¶
- func AddRepoUsages(useRepos []*build.CallExpr, repos ...string)
- func AllProxies(f *build.File, proxy string) []string
- func NewUseRepo(f *build.File, proxies []string) (*build.File, *build.CallExpr)
- func Proxies(f *build.File, rawExtBzlFile string, extName string, dev bool) []string
- func RemoveRepoUsages(useRepos []*build.CallExpr, repos ...string)
- func UseRepos(f *build.File, proxies []string) []*build.CallExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRepoUsages ¶
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 ¶
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 ¶
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 ¶
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 ¶
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).
Types ¶
This section is empty.