diff --git a/pb-jelly-gen/codegen/codegen.py b/pb-jelly-gen/codegen/codegen.py index 2f16ad9..ca31f93 100755 --- a/pb-jelly-gen/codegen/codegen.py +++ b/pb-jelly-gen/codegen/codegen.py @@ -1938,11 +1938,6 @@ def mod_tree_dfs( content = RS_HEADER + LIB_RS_HEADER + librs.content.getvalue() yield filename, content - def get_build_file(self) -> Iterator[Tuple[Text, Text]]: - for crate in self.deps_map: - build_file = BUILD_TEMPLATE.format(crate=crate) - yield crate, build_file - def get_spec_toml_file( self, derive_serde: bool, include_sso: bool ) -> Iterator[Tuple[Text, Text]]: @@ -2030,22 +2025,6 @@ def crate_from_proto_filename( return crate_name, mod_parts[1:] -BUILD_TEMPLATE = """ -package(default_visibility = ["//visibility:public"]) - -rust_library( - name = "{crate}", - crate_type = "lib", - edition = "2018", -) - - -rust_doc( - name = "{crate}_doc", - crate = ":{crate}", - edition = "2018", -) -""" SPEC_TOML_TEMPLATE = ( """# @""" @@ -2180,10 +2159,11 @@ def add_mod(writer: CodeWriter) -> None: output.content = content if "generate_build_files" in request.parameter: - for crate, build_file in ctx.get_build_file(): + for crate in ctx.deps_map: + # Create a stub file for later generation output = response.file.add() output.name = file_prefix + crate + "/BUILD.in-gen-proto~" - output.content = build_file + output.content = "" elif "generate_spec_toml" in request.parameter: for crate, spec_toml_file in ctx.get_spec_toml_file(derive_serde, include_sso): output = response.file.add()