File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1161,7 +1161,7 @@ def _crate_impl(module_ctx):
11611161 manifests = {str (module_ctx .path (m )): str (m ) for m in cfg .manifests }
11621162
11631163 packages = {
1164- p .package : _package_to_json (p )
1164+ p .package_alias or p . package : _package_to_json (p )
11651165 for p in common_specs + repo_specific_specs .get (cfg .name , [])
11661166 }
11671167
@@ -1431,6 +1431,9 @@ _spec = tag_class(
14311431 doc = "The explicit name of the package." ,
14321432 mandatory = True ,
14331433 ),
1434+ "package_alias" : attr .string (
1435+ doc = "Alias for the package." ,
1436+ ),
14341437 "path" : attr .string (
14351438 doc = "The local path of the remote crate. Cannot be used with `version` or `git`." ,
14361439 ),
Original file line number Diff line number Diff line change @@ -515,6 +515,13 @@ no_cargo.spec(
515515 repositories = ["no_cargo" ],
516516 version = "0.4" ,
517517)
518+ no_cargo .spec (
519+ features = ["util" ],
520+ package = "tower" ,
521+ package_alias = "tower_new" , # used in package_alias test
522+ repositories = ["no_cargo" ],
523+ version = "0.5.3" ,
524+ )
518525no_cargo .spec (
519526 features = ["trace" ],
520527 package = "tower-http" ,
Original file line number Diff line number Diff line change 1+ alias (
2+ name = "tower-new" ,
3+ actual = "@no_cargo//:tower_new" , # ensures the package_alias works
4+ )
You can’t perform that action at this time.
0 commit comments