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 format #9279

Merged
merged 5 commits into from
May 7, 2021
Merged

Fix proto format #9279

merged 5 commits into from
May 7, 2021

Conversation

robert-zaremba
Copy link
Collaborator

@robert-zaremba robert-zaremba commented May 6, 2021

Description

Fix proto formatting


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@robert-zaremba robert-zaremba added A:automerge Automatically merge PR once all prerequisites pass. T:Bug labels May 6, 2021
Copy link
Contributor

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

I'm still receiving the following error when running make proto-all:

make: *** [Makefile:397: proto-format] Error 1

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

i get the same error:

find: -exec requires an argument
make: *** [proto-format] Error 1

On macOS if thats helpful at all!

@github-actions github-actions bot added the T:Docs Changes and features related to documentation. label May 7, 2021
@robert-zaremba
Copy link
Collaborator Author

Let's have a call on Discord and will try to solve it together. I don't have Mac OS, so can't debug it. On Linux it works.

@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #9279 (4564c50) into master (1986104) will decrease coverage by 0.10%.
The diff coverage is n/a.

❗ Current head 4564c50 differs from pull request most recent head 41d155b. Consider uploading reports for the commit 41d155b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9279      +/-   ##
==========================================
- Coverage   60.30%   60.20%   -0.11%     
==========================================
  Files         591      591              
  Lines       36937    37017      +80     
==========================================
+ Hits        22276    22285       +9     
- Misses      12691    12758      +67     
- Partials     1970     1974       +4     
Impacted Files Coverage Δ
x/gov/keeper/deposit.go 70.58% <0.00%> (-5.89%) ⬇️
x/gov/types/msgs.go 47.11% <0.00%> (-1.93%) ⬇️
x/authz/simulation/operations.go 80.11% <0.00%> (-1.82%) ⬇️
x/gov/client/cli/tx.go 16.12% <0.00%> (-1.73%) ⬇️
x/feegrant/simulation/operations.go 77.19% <0.00%> (-1.66%) ⬇️
x/staking/client/cli/tx.go 16.66% <0.00%> (-1.32%) ⬇️
x/distribution/client/cli/tx.go 3.58% <0.00%> (-0.30%) ⬇️
x/gov/types/proposal.go 19.78% <0.00%> (ø)
x/params/client/cli/tx.go 0.00% <0.00%> (ø)
x/genutil/client/testutil/suite.go 100.00% <0.00%> (ø)
... and 3 more

@robert-zaremba robert-zaremba changed the title Robert/fix proto format Fix proto format May 7, 2021
Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

works after running:

docker rm cosmos-sdk-proto-fmt-v0.2;

@robert-zaremba robert-zaremba removed the A:automerge Automatically merge PR once all prerequisites pass. label May 7, 2021
@robert-zaremba robert-zaremba added the A:automerge Automatically merge PR once all prerequisites pass. label May 7, 2021
@mergify mergify bot merged commit 3e4d81c into master May 7, 2021
@mergify mergify bot deleted the robert/fix-proto-format branch May 7, 2021 21:33
@sunnya97
Copy link
Member

sunnya97 commented May 8, 2021

I'm getting the following error:

$ make proto-all
Formatting Protobuf files
Error: unknown command "lint" for "buf"
Run 'buf --help' for usage.
unknown command "lint" for "buf"
make: *** [proto-lint] Error 1

@robert-zaremba @technicallyty any ideas?

@technicallyty
Copy link
Contributor

technicallyty commented May 8, 2021

I'm getting the following error:

$ make proto-all
Formatting Protobuf files
Error: unknown command "lint" for "buf"
Run 'buf --help' for usage.
unknown command "lint" for "buf"
make: *** [proto-lint] Error 1

@robert-zaremba @technicallyty any ideas?

this seemed to work for @ryanchrypto

replace the proto-format if line with:

if [ -z 1 ] ; then echo ok; else find ./ -not -path "./third_party/*" -name "*.proto" -exec echo {} ";" ; fi

@sunnya97

actually I just realized what your error said - I have buf installed locally on my machine, maybe it's that ?

@robert-zaremba
Copy link
Collaborator Author

@sunnya97 , most probably you are using an old container which doesn't like the previous syntax. Could you try to remove the container and re run:

docker rm cosmos-sdk-proto-fmt-v0.2
make proto-format

The if line was used for debugging (I don't have MacOS, so was sending that line to check if the if statement was parsed as expected on Mac, without running a docker). We already checked it on mac and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. T:Bug T:Docs Changes and features related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants