File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,13 @@ def _rust_proto_library_impl(ctx):
114
114
# we have to create a shallow copy.
115
115
toolchain = ctx .toolchains ["@rules_rust//rust:toolchain_type" ]
116
116
fields = {field : getattr (crate_info , field ) for field in dir (crate_info )}
117
- pkg , name = _user_visible_label (ctx ).rsplit (":" )
118
117
119
118
# Construct a label and compute the crate name.
120
- # Package and workspace root are only relevant when 1P crate renaming is enabled.
119
+ # The label's package and workspace root are only relevant when 1P crate renaming is enabled.
121
120
# The current implementation of crate renaming supports only monorepos which
122
- # means that it will only rename wen label.workspace_root is empty.
123
- label = struct (** {"name" : name , "package" : pkg , "workspace_root" : "" })
121
+ # means that it will only rename when label.workspace_root is empty.
122
+ label_str = _user_visible_label (ctx )
123
+ label = Label (label_str )
124
124
fields ["name" ] = label_to_crate_name (ctx , label , toolchain )
125
125
126
126
# These two fields present on the dir(crate_info) but break on some versions of Bazel when
You can’t perform that action at this time.
0 commit comments