You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fail("Defined two crate universes with the same name in the same MODULE.bazel file. Use the name tag to give them different names.")
167
221
elifcfg.nameinall_repos:
168
222
fail("Defined two crate universes with the same name in different MODULE.bazel files. Either give one a different name, or use use_extension(isolate=True)")
fail("Annotation specified for repo %s, but the module defined repositories %s"% (repo, local_repos))
234
+
173
235
_from_cargo=tag_class(
174
236
doc="Generates a repo @crates from a Cargo.toml / Cargo.lock pair",
175
237
attrs=dict(
@@ -183,9 +245,54 @@ _from_cargo = tag_class(
183
245
),
184
246
)
185
247
248
+
# This should be kept in sync with crate_universe/private/crate.bzl.
249
+
_annotation=tag_class(
250
+
attrs=dict(
251
+
repositories=attr.string_list(doc="A list of repository names specified from `crate.from_cargo(name=...)` that this annotation is applied to. Defaults to all repositories.", default= []),
252
+
crate=attr.string(doc="The name of the crate the annotation is applied to", mandatory=True),
253
+
version=attr.string(doc="The versions of the crate the annotation is applied to. Defaults to all versions.", default="*"),
254
+
additive_build_file_content=attr.string(doc="Extra contents to write to the bottom of generated BUILD files."),
255
+
additive_build_file=attr.label(doc="A file containing extra contents to write to the bottom of generated BUILD files."),
256
+
alias_rule=attr.string(doc="Alias rule to use instead of `native.alias()`. Overrides [render_config](#render_config)'s 'default_alias_rule'."),
257
+
build_script_data=_relative_label_list(doc="A list of labels to add to a crate's `cargo_build_script::data` attribute."),
258
+
build_script_tools=_relative_label_list(doc="A list of labels to add to a crate's `cargo_build_script::tools` attribute."),
259
+
build_script_data_glob=attr.string_list(doc="A list of glob patterns to add to a crate's `cargo_build_script::data` attribute"),
260
+
build_script_deps=_relative_label_list(doc="A list of labels to add to a crate's `cargo_build_script::deps` attribute."),
261
+
build_script_env=attr.string_dict(doc="Additional environment variables to set on a crate's `cargo_build_script::env` attribute."),
262
+
build_script_proc_macro_deps=_relative_label_list(doc="A list of labels to add to a crate's `cargo_build_script::proc_macro_deps` attribute."),
263
+
build_script_rundir=attr.string(doc="An override for the build script's rundir attribute."),
264
+
build_script_rustc_env=attr.string_dict(doc="Additional environment variables to set on a crate's `cargo_build_script::env` attribute."),
265
+
build_script_toolchains=attr.label_list(doc="A list of labels to set on a crates's `cargo_build_script::toolchains` attribute."),
266
+
compile_data=_relative_label_list(doc="A list of labels to add to a crate's `rust_library::compile_data` attribute."),
267
+
compile_data_glob=attr.string_list(doc="A list of glob patterns to add to a crate's `rust_library::compile_data` attribute."),
268
+
crate_features=attr.string_list(doc="A list of strings to add to a crate's `rust_library::crate_features` attribute."),
269
+
data=_relative_label_list(doc="A list of labels to add to a crate's `rust_library::data` attribute."),
270
+
data_glob=attr.string_list(doc="A list of glob patterns to add to a crate's `rust_library::data` attribute."),
271
+
deps=_relative_label_list(doc="A list of labels to add to a crate's `rust_library::deps` attribute."),
272
+
extra_aliased_targets=attr.string_dict(doc="A list of targets to add to the generated aliases in the root crate_universe repository."),
273
+
gen_binaries=attr.string_list(doc="As a list, the subset of the crate's bins that should get `rust_binary` targets produced."),
274
+
gen_all_binaries=attr.bool(doc="If true, generates `rust_binary` targets for all of the crates bins"),
275
+
disable_pipelining=attr.bool(doc="If True, disables pipelining for library targets for this crate."),
276
+
gen_build_script=attr.string(
277
+
doc="An authorative flag to determine whether or not to produce `cargo_build_script` targets for the current crate. Supported values are 'on', 'off', and 'auto'.",
278
+
values=_OPT_BOOL_VALUES.keys(),
279
+
default="auto",
280
+
),
281
+
patch_args=attr.string_list(doc="The `patch_args` attribute of a Bazel repository rule. See [http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args)"),
282
+
patch_tool=attr.string_list(doc="The `patch_tool` attribute of a Bazel repository rule. See [http_archive.patch_tool](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_tool)"),
283
+
patches=attr.label_list(doc="The `patches` attribute of a Bazel repository rule. See [http_archive.patches](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patches)"),
284
+
proc_macro_deps=_relative_label_list(doc="A list of labels to add to a crate's `rust_library::proc_macro_deps` attribute."),
285
+
rustc_env=attr.string_dict(doc="Additional variables to set on a crate's `rust_library::rustc_env` attribute."),
286
+
rustc_env_files=_relative_label_list(doc="A list of labels to set on a crate's `rust_library::rustc_env_files` attribute."),
287
+
rustc_flags=attr.string_list(doc="A list of strings to set on a crate's `rust_library::rustc_flags` attribute."),
288
+
shallow_since=attr.string(doc="An optional timestamp used for crates originating from a git repository instead of a crate registry. This flag optimizes fetching the source code."),
0 commit comments