Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continue prost #286

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

continue prost #286

wants to merge 9 commits into from

Conversation

jokemanfire
Copy link
Contributor

work continue with #173

@jokemanfire jokemanfire changed the title continue prost continue prost (not complete) Feb 24, 2025
@Tim-Zhang
Copy link
Member

Tim-Zhang commented Feb 25, 2025

@jokemanfire I appreciate you taking on this work very much.
Why don't we directly reopen #173 and continue the work?
Just let me know if there are any difficulties.

Thanks agian.

@jokemanfire
Copy link
Contributor Author

@jokemanfire I appreciate you taking on this work very much. Why don't we directly reopen #173 and continue the work? Just let me know if there are any difficulties.

Thanks agian.

There are some conflicts and API changes that need to be resolved and some code needs to be packaged to adapt to the current API. It's not easy to operate with the previous version of PR. I need to add some commit to complete this feature. I have communicated with the original author.

@jokemanfire
Copy link
Contributor Author

@Tim-Zhang @justxuewei Local test all pass but i don't know how to install protoc in CI.

@jokemanfire jokemanfire changed the title continue prost (not complete) continue prost Mar 13, 2025
@jokemanfire jokemanfire force-pushed the prost branch 3 times, most recently from 21ebbd3 to 4a76b7b Compare April 1, 2025 12:19
@jokemanfire jokemanfire force-pushed the prost branch 3 times, most recently from a29312f to 5fadae0 Compare April 9, 2025 09:50
@jokemanfire
Copy link
Contributor Author

jokemanfire commented Apr 9, 2025

Basically enough @Tim-Zhang @justxuewei just take a look . :)

@justxuewei
Copy link
Contributor

justxuewei commented Apr 10, 2025

Nice work, thanks @jokemanfire! Could you cleanup your commits? It makes us easier to review and maintain.

  1. Use git rebase instead of git merge.
  2. Modify the commit title to {subsystem}: {brief title for your changes}, and give it a brief introduction in the commit message.
  3. Split your commits, and don't mix bugfixes, refactoring and new features.
  4. Please modify this PR title to something like "codegen: Introduce a new codegen using prost".

Thanks!

justxuewei and others added 7 commits April 10, 2025 11:19
This commit refactors the ttrpc-codegen and the compiler, and merges the two
crates into a single crate, named "codegen". The codegen uses prost crate, a
protobuf compiler for Rust.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
The ttrpc provides a "prost" feature to support the new version of
codegen. An "example2" has been added to demonstrate how to use the
codegen.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
Install protoc when executing `make deps` of the ttrpc. Add codegen's
check and build, and example2' build to the ci testing.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
Fix all issues reported by cargo clippy to make ci testing pass.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
merge from remote branch.
ref: containerd#173

Co-authored-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
fix ci for protoc

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
because of the api change
1. fix the marco in prost
2. fix the test

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
fix rebase error.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
@jokemanfire
Copy link
Contributor Author

Nice work, thanks @jokemanfire! Could you cleanup your commits? It makes us easier to review and maintain.好的工作,谢谢!你能清理一下你的提交吗?这让我们更容易审查和维护。

  1. Use git rebase instead of git merge.使用 git rebase 代替 git merge
  2. Modify the commit title to {subsystem}: {brief title for your changes}, and give it a brief introduction in the commit message.修改提交标题为 {subsystem}: {brief title for your changes} ,并在提交信息中简要介绍。
  3. Split your commits, and don't mix bugfixes, refactoring and new features.拆分您的提交,不要混合修复错误、重构和新功能。
  4. Please modify this PR title to something like "codegen: Introduce a new codegen using prost".请将此 PR 标题修改为类似于“codegen:引入使用 prost 的新代码生成器”的标题。

Thanks!  谢谢!

I have changed it.

@jokemanfire jokemanfire force-pushed the prost branch 2 times, most recently from aa000cc to 4da8148 Compare April 10, 2025 06:54
@jokemanfire jokemanfire force-pushed the prost branch 2 times, most recently from b25b1a0 to 00fce61 Compare April 10, 2025 07:24
skip build example2 in windows

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
@justxuewei
Copy link
Contributor

Once this feature gets merged, I prefer to bump a major version to 2 to avoid some compatibility issues, as it nearly changes the entire codegen engine. WDYT? @jokemanfire @Tim-Zhang

@jokemanfire
Copy link
Contributor Author

Once this feature gets merged, I prefer to bump a major version to 2 to avoid some compatibility issues, as it nearly changes the entire codegen engine. WDYT? 一旦这个功能合并,我更倾向于将主版本号提升到 2,以避免一些兼容性问题,因为它几乎改变了整个代码生成引擎。你怎么看?@jokemanfire @Tim-Zhang

This modification is indeed quite significant, and I agree. It depends on the maintainer's thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants