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

fix:proto nesting causes template generation problems #2718

Merged
merged 4 commits into from
Mar 26, 2023

Conversation

songzhibin97
Copy link
Member

fix #2717

@songzhibin97 songzhibin97 requested a review from daemon365 March 10, 2023 02:51
@songzhibin97
Copy link
Member Author


func (s *TemplateService) CreateTemplate(ctx context.Context, req *pb.CreateTemplate_Request) (*pb.CreateTemplate_Response, error) {
	return &pb.CreateTemplate_Response{}, nil
}
func (s *TemplateService) GetTemplates(ctx context.Context, req *pb.GetTemplates_Request) (*pb.GetTemplates_Response, error) {
	return &pb.GetTemplates_Response{}, nil
}
func (s *TemplateService) GetTemplateById(ctx context.Context, req *pb.GetTemplateById_Request) (*pb.GetTemplateById_Response, error) {
	return &pb.GetTemplateById_Response{}, nil
}
func (s *TemplateService) SaveTemplateById(ctx context.Context, req *pb.SaveTemplateById_Request) (*pb.SaveTemplateById_Response, error) {
	return &pb.SaveTemplateById_Response{}, nil
}
func (s *TemplateService) DeleteTemplateById(ctx context.Context, req *pb.DeleteTemplateById_Request) (*pb.DeleteTemplateById_Response, error) {
	return &pb.DeleteTemplateById_Response{}, nil
}

@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2023

Codecov Report

Merging #2718 (45d7a7d) into main (f47a238) will decrease coverage by 0.06%.
The diff coverage is n/a.

❗ Current head 45d7a7d differs from pull request most recent head 4b8e838. Consider uploading reports for the commit 4b8e838 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #2718      +/-   ##
==========================================
- Coverage   84.78%   84.73%   -0.06%     
==========================================
  Files          88       88              
  Lines        3891     3891              
==========================================
- Hits         3299     3297       -2     
- Misses        418      420       +2     
  Partials      174      174              

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@shenqidebaozi
Copy link
Member

help supplement the unit test

Short: "Generate the proto client code",
Long: "Generate the proto client code. Example: kratos proto client helloworld.proto",
Short: "Generate the proto Client code",
Long: "Generate the proto Client code. Example: kratos proto client helloworld.proto",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change to uppercase?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smooth and consistent with Server

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a hint. use is client?

@daemon365 daemon365 added the LGTM label Mar 23, 2023
@shenqidebaozi shenqidebaozi merged commit 446774f into go-kratos:main Mar 26, 2023
@fttx2020
Copy link

this fix will cause google.protobuf.Empty parse failed
please fix it!
source file:kratos/cmd/kratos/internal/proto/server/template.go
lines:120
code: const empty = "google.protobuf.Empty"
expected to: const empty = "google_protobuf_Empty"

@songzhibin97
Copy link
Member Author

this fix will cause google.protobuf.Empty parse failed please fix it! source file:kratos/cmd/kratos/internal/proto/server/template.go lines:120 code: const empty = "google.protobuf.Empty" expected to: const empty = "google_protobuf_Empty"

后面好像有pr已经fix了

@henryjhenry
Copy link

this fix will cause google.protobuf.Empty parse failed please fix it! source file:kratos/cmd/kratos/internal/proto/server/template.go lines:120 code: const empty = "google.protobuf.Empty" expected to: const empty = "google_protobuf_Empty"

后面好像有pr已经fix了

目前还存在这个问题
kratos: 2.7.3

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

Successfully merging this pull request may close these issues.

proto nesting causes template generation problems
6 participants