-
Notifications
You must be signed in to change notification settings - Fork 15
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
Help hints at JSON formatting output with --out-file option #537
Conversation
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.
Thanks. You need to delete and regenerate golden file test/cardano-cli-golden/files/golden/help/shelley_address_key-hash.cli
to make the test pass:
CREATE_GOLDEN_FILES=1 cabal test
@carbolymer I am trying to fix the golden files but it's slightly annoying because I need to run the test, check the error, remove the file, and run again to get the next error. I wanted to refactor the test to use |
I propose to use This way you should be able to run the test once and manually spot check every golden file that was changed to check if the change was intended. |
🤔 Does |
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.
I'm sorry, but I have to block this change. Our current serialization is in a bit messy state, so we're not guaranteeing that file will contain JSON and stdout will be human readable.
The description you're proposing would be misleading for some commands. An example: cardano-cli query ledger-state
:
case mOutFile of |
@carbolymer I completely understand, no worries. Let me just close this and revisit at better times. |
It will recreate all of them, but the effect should be the same because passing golden tests will generate golden files that are identical to what is already there anyway. |
Oh right, they are using the same seed 🤦 |
Changelog
Documents JSON-formatted output in CLI's help.
Context
This is a very minor change to the documentation whose presence could have a saved me a few hours of head-banging. I wasn't aware (or forgot) one could get JSON-formatted output from the
query utxo
command and therefore coded a parser for UTxOs 🤦I am not sure where this information is readily available, but having it as part of the command-line help seems useful.
How to trust this PR
🤔
Checklist