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

Follow golang naming convention for constants #344

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

masih
Copy link
Member

@masih masih commented Jun 14, 2024

The codebase inconsistently follows the MaxCaps golang naming convention for constant.

Consistently use MaxCaps for all constants, except for PHASEs to keep the code easier to read.

@masih masih requested review from Stebalien and Kubuxu June 14, 2024 16:04
@masih masih enabled auto-merge June 14, 2024 16:05
@Stebalien
Copy link
Member

I'd say to wait for code freeze.

@masih
Copy link
Member Author

masih commented Jun 14, 2024

I'd say to wait for code freeze.

Would it make that much of a difference? There are not that many PRs open and it's unlikely for open PRs/ongoing-work to have renamed constants meaning hopefully no conflicts, or easy to fix ones at that. I would just rip the bandaid.

Having said that, I have no strong opinions.

@Stebalien
Copy link
Member

There aren't that many open PRs, but this will conflict with anything anyone is working on locally. Given that we can make this change programatically at any time, I'd prefer to wait.

But I also don't have strong opinions on this.

Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

I don't like the change for the phase names in particular, but if this is a clearly established convention I'm not going to argue.

gpbft/gpbft.go Outdated Show resolved Hide resolved
@masih masih added this pull request to the merge queue Jun 17, 2024
@anorth anorth removed this pull request from the merge queue due to a manual request Jun 17, 2024
@anorth
Copy link
Member

anorth commented Jun 17, 2024

I removed from the merge queue just to leave space for a second thought about when to merge this or if we indeed want to change everything.

@masih masih marked this pull request as draft June 19, 2024 08:57
@masih
Copy link
Member Author

masih commented Jun 19, 2024

Marked as draft to revisit just before code freeze as recommended by the team.

Copy link

codecov bot commented Jul 6, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 81.33%. Comparing base (cbb522b) to head (8022303).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #344      +/-   ##
==========================================
+ Coverage   81.28%   81.33%   +0.05%     
==========================================
  Files          40       40              
  Lines        3574     3574              
==========================================
+ Hits         2905     2907       +2     
+ Misses        392      391       -1     
+ Partials      277      276       -1     
Files Coverage Δ
ec/fake_ec.go 83.11% <100.00%> (ø)
gpbft/gpbft.go 88.75% <100.00%> (ø)
gpbft/participant.go 86.81% <100.00%> (ø)
gpbft/vrf.go 86.66% <100.00%> (ø)
host.go 67.80% <100.00%> (-0.29%) ⬇️
gpbft/chain.go 92.00% <25.00%> (ø)

... and 1 file with indirect coverage changes

The codebase inconsistently follows the MaxCaps golang naming convention
for constant.

Consistently use MaxCaps for all constants, except for PHASEs to keep
the code easier to read.
@masih masih marked this pull request as ready for review July 12, 2024 14:26
@masih masih added this pull request to the merge queue Jul 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 12, 2024
@masih masih added this pull request to the merge queue Jul 12, 2024
@masih masih removed this pull request from the merge queue due to a manual request Jul 12, 2024
@masih masih added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit bc35325 Jul 12, 2024
12 of 13 checks passed
@masih masih deleted the masih/max-cap-constants branch July 12, 2024 14:59
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.

4 participants