-
Notifications
You must be signed in to change notification settings - Fork 351
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
Problem: Protobuf code generation is not consistent with cosmos-sdk #851
Problem: Protobuf code generation is not consistent with cosmos-sdk #851
Conversation
Solution: Generate proto code using buf with similar configuration as cosmos-sdk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems the third party Git sub-modules are no longer needed after this (the needed protobuf definitions are fetched via buf?)? so could they be removed?
@@ -0,0 +1,19 @@ | |||
# This module represents the "proto" root. | |||
version: v1 | |||
name: buf.build/crypto-org-chain/chain-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this name/url gives 404 -- do we need to register it on buf.build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, for releases, we can perhaps specify an action to do it: https://docs.buf.build/ci-cd/github-actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #852
Codecov Report
@@ Coverage Diff @@
## master #851 +/- ##
==========================================
+ Coverage 18.36% 18.88% +0.51%
==========================================
Files 96 92 -4
Lines 12361 11896 -465
==========================================
- Hits 2270 2246 -24
+ Misses 9596 9168 -428
+ Partials 495 482 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
They're still needed for swagger documentation. |
Shall we update the |
--grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \ | ||
$(find "${dir}" -maxdepth 1 -name '*.proto') | ||
|
||
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SC2044: For loops over find output are fragile. Use find -exec or a while read loop.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
$(find "${dir}" -maxdepth 1 -name '*.proto') | ||
|
||
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do | ||
if grep "option go_package" $file &> /dev/null ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 3 similar findings have been found in this PR
SC2086: Double quote to prevent globbing and word splitting.
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
scripts/protocgen.sh | 28 |
scripts/protoc-swagger-gen.sh | 13 |
scripts/protoc-swagger-gen.sh | 14 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Done |
you need to regenerate the swagger to make it up to date. |
done |
and statik needs to be updated too ;D |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…rypto-org-chain#851) * Problem: Protobuf code generation is not consistent with cosmos-sdk Solution: Generate proto code using buf with similar configuration as cosmos-sdk * update config.json * Regenerate swagger.yaml * Update statik.go * Update gomod2nix.toml * Generate gomod2nix.toml * update statik.go
…851) * Problem: Protobuf code generation is not consistent with cosmos-sdk Solution: Generate proto code using buf with similar configuration as cosmos-sdk * update config.json * Regenerate swagger.yaml * Update statik.go * Update gomod2nix.toml * Generate gomod2nix.toml * update statik.go
Solution: Generate proto code using buf with similar configuration as cosmos-sdk