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`.",
1273
+
doc="The Git url to use for the crate. Cannot be used with `version` or `path`.",
1273
1274
),
1274
1275
"lib": attr.bool(
1275
1276
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.",
@@ -1278,6 +1279,9 @@ _spec = tag_class(
1278
1279
doc="The explicit name of the package.",
1279
1280
mandatory=True,
1280
1281
),
1282
+
"path": attr.string(
1283
+
doc="The local path of the remote crate. Cannot be used with `version` or `git`.",
1284
+
),
1281
1285
"repositories": attr.string_list(
1282
1286
doc="A list of repository names specified from `crate.from_cargo(name=...)` that this spec is applied to. Defaults to all repositories.",
1283
1287
default= [],
@@ -1289,7 +1293,7 @@ _spec = tag_class(
1289
1293
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.",
1290
1294
),
1291
1295
"version": attr.string(
1292
-
doc="The exact version of the crate. Cannot be used with `git`.",
1296
+
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