fuchsia_sdk_repository

Loads a particular version of the Fuchsia IDK.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this repository. Name required -
repo_mapping In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.

For example, an entry "@foo": "@bar" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target).

This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension's implementation function).
String Dict optional -
parent_sdk If specified, libraries in current SDK that also exist in the parent SDK will always resolve to the parent. In practice,
this means that a library defined in the current SDK that is also defined in parent_sdk will be ignored in the current SDK,
and references to it will be replaced with @<parent_sdk>//<library>. This is useful when SDKs are layered, for example an
internal SDK and a public SDK.
Label optional None
parent_sdk_local_paths If parent_sdk is specified, parent_sdk_local_paths has to contain the same values as the local_paths attribute of the parent SDK.
This is required because Bazel does not have a way to evaluate the existance of a Label, so we process the metadata of the parent
SDK again when using layered SDKs.
TODO: look for a better approach if this is limiting or causing performance issues.
String List optional []
local_paths Paths to local SDK directories. String List optional []
local_sdk_version_file An optional file used to mark the version of the SDK pointed to by local_paths. Label optional None
use_rules_fuchsia Use the @rules_fuchsia repository name to load all Fuchsia Bazel SDK rules in the generated
repository files. Defaults to @fuchsia_sdk otherwise for compatibility reasons. For details
see https://fxbug.dev/381126633.
Boolean optional False
buildifier An optional label to the buildifier tool, used to reformat all generated Bazel files. Label optional None

ENVIRONMENT VARIABLES

This repository rule depends on the following environment variables:

  • LOCAL_FUCHSIA_PLATFORM_BUILD