Repository navigation
Generate code with other lang - #52
Merged
Merged
Conversation
chenkasirer
reviewed
Sep 8, 2025
|
|
||
| @invoke.task() | ||
| def create_class_assets(ctx): | ||
| base_dir = Path(ctx.base_folder) |
Member
There was a problem hiding this comment.
isn't ctx.base_folder already Path?
| proto_out_folder = Path(ctx.proto_out_folder) / "compas_pb" / "generated" / target_language | ||
| proto_out_folder.mkdir(parents=True, exist_ok=True) | ||
| else: | ||
| print(f"Target language '{target_language}' not supported.") |
Member
There was a problem hiding this comment.
this we can probably check at the very beginning of the task function
chenkasirer
approved these changes
Sep 8, 2025
chenkasirer
left a comment
Member
There was a problem hiding this comment.
left some minor comments, otherwise LGTM
chenkasirer
reviewed
Sep 17, 2025
| "proto_include_paths": [Path("./src") / "compas_pb"/"protobuf_defs"], | ||
| "proto_out_folder": Path("./src"), | ||
| # typescript,javascript, and go need other compiler plugins | ||
| "proto_target_languages": ["cpp", "csharp", "java", "objc", "php", "ruby"], |
Member
There was a problem hiding this comment.
I'm not sure this belongs here, if the user adds more languages it won't make them supported..
perhaps we move this inside the invocations.py module as a module attribute which we can update in the future if we add support for more languages?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add feature of #27
generate_proto_classesenable to generate the proto for different language.create_class_assetsto package the generated file for .zip.build.ymlfor test and in release to take the.zipto assets.file path name:
compas_pb-generated-{target-language}-31.1.zip\compas_pb\generated\.zip