Skip to content

fix: Output deprecation warning in JSON format when option --json is set #1631

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

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

sfauvel
Copy link
Collaborator

@sfauvel sfauvel commented Apr 11, 2024

Content

This PR outputs client deprecation warning formatted in JSON when the --json option is used

With --json option, the output is:
{"warning": "`snapshot` command is deprecated, use `cardano-db` instead", "type": "deprecation"}

without the option, the output is:
`snapshot` command is deprecated, use `cardano-db` instead

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #1616

@sfauvel sfauvel changed the title Output deprecation warning in JSON format when option --json is set fix: Output deprecation warning in JSON format when option --json is set Apr 11, 2024
Copy link

github-actions bot commented Apr 11, 2024

Test Results

    3 files  ±0     42 suites  ±0   12m 14s ⏱️ + 1m 35s
  914 tests ±0    914 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 008 runs  ±0  1 008 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit f3c0469. ± Comparison against base commit d3064e6.

♻️ This comment has been updated with latest results.

@sfauvel sfauvel temporarily deployed to testing-preview April 11, 2024 15:06 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-sanchonet April 11, 2024 15:06 — with GitHub Actions Inactive
@sfauvel sfauvel requested review from dlachaume and jpraynaud April 11, 2024 15:11
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@sfauvel sfauvel temporarily deployed to testing-preview April 11, 2024 16:02 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-sanchonet April 11, 2024 16:02 — with GitHub Actions Inactive
@sfauvel sfauvel merged commit 8725527 into main Apr 11, 2024
@sfauvel sfauvel deleted the sfa/1616-write-deprecation-notice-in-json branch April 11, 2024 16:07
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.

Client deprecation notice should be written in JSON when --json option is used
4 participants