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
doc="The Git url to use for the crate. Cannot be used with `version`.",
1403
+
doc="The Git url to use for the crate. Cannot be used with `version` or `path`.",
1403
1404
),
1404
1405
"lib": attr.bool(
1405
1406
doc="If using `artifact = 'bin'`, additionally setting `lib = True` declares a dependency on both the package's library and binary, as opposed to just the binary.",
@@ -1408,6 +1409,9 @@ _spec = tag_class(
1408
1409
doc="The explicit name of the package.",
1409
1410
mandatory=True,
1410
1411
),
1412
+
"path": attr.string(
1413
+
doc="The local path of the remote crate. Cannot be used with `version` or `git`.",
1414
+
),
1411
1415
"repositories": attr.string_list(
1412
1416
doc="A list of repository names specified from `crate.from_cargo(name=...)` that this spec is applied to. Defaults to all repositories.",
1413
1417
default= [],
@@ -1419,7 +1423,7 @@ _spec = tag_class(
1419
1423
doc="The git tag of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified. Specifying `rev` is recommended for fully-reproducible builds.",
1420
1424
),
1421
1425
"version": attr.string(
1422
-
doc="The exact version of the crate. Cannot be used with `git`.",
1426
+
doc="The exact version of the crate. Cannot be used with `git` or `path`.",
Copy file name to clipboardExpand all lines: crate_universe/private/crate.bzl
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ def _spec(
27
27
git=None,
28
28
branch=None,
29
29
tag=None,
30
-
rev=None):
30
+
rev=None,
31
+
path=None):
31
32
"""A constructor for a crate dependency.
32
33
33
34
See [specifying dependencies][sd] in the Cargo book for more details.
@@ -36,15 +37,16 @@ def _spec(
36
37
37
38
Args:
38
39
package (str, optional): The explicit name of the package (used when attempting to alias a crate).
39
-
version (str, optional): The exact version of the crate. Cannot be used with `git`.
40
+
version (str, optional): The exact version of the crate. Cannot be used with `git` or `path`.
40
41
artifact (str, optional): Set to "bin" to pull in a binary crate as an artifact dependency. Requires a nightly Cargo.
41
42
lib (bool, optional): If using `artifact = "bin"`, additionally setting `lib = True` declares a dependency on both the package's library and binary, as opposed to just the binary.
42
43
default_features (bool, optional): Maps to the `default-features` flag.
43
44
features (list, optional): A list of features to use for the crate
44
-
git (str, optional): The Git url to use for the crate. Cannot be used with `version`.
45
+
git (str, optional): The Git url to use for the crate. Cannot be used with `version` or `path`.
45
46
branch (str, optional): The git branch of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified. Specifying `rev` is recommended for fully-reproducible builds.
46
47
tag (str, optional): The git tag of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified. Specifying `rev` is recommended for fully-reproducible builds.
47
48
rev (str, optional): The git revision of the remote crate. Tied with the `git` param. Only one of branch, tag or rev may be specified.
49
+
path (str, optional): The local path of the remote crate. Cannot be used with `version` or `git`.
0 commit comments