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

Remove ledger-tool-specific output format enum #34473

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

CriesofCarrots
Copy link
Contributor

@CriesofCarrots CriesofCarrots commented Dec 15, 2023

Problem

Support for json output from cli tools has developed in a haphazard way. As result, there are inconsistent and sometimes duplicate implementations of things. For example, solana-ledger-tool uses both solana_cli_output::OutputFormat and its own hand-rolled output format enum in various places to track the desired output format. This makes it harder than it needs to be to make consistent the actual strings that get printed.

Summary of Changes

Remove solana_ledger_tool::LedgerOutputMethod
This makes no functional changes to the subcomands that used it; ie. the actual output format is still hard-coded in the subcommand match

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #34473 (f58f9bc) into master (aaccbdd) will increase coverage by 0.0%.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34473   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         819      819           
  Lines      220894   220894           
=======================================
+ Hits       180753   180809   +56     
+ Misses      40141    40085   -56     

Copy link
Contributor

@steviez steviez left a comment

Choose a reason for hiding this comment

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

LGTM!

@CriesofCarrots CriesofCarrots merged commit a58e462 into solana-labs:master Dec 15, 2023
34 checks passed
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.

2 participants