Skip to content

Simplify query format flag #1191

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 1 commit into from
May 23, 2025
Merged

Simplify query format flag #1191

merged 1 commit into from
May 23, 2025

Conversation

newhoggy
Copy link
Contributor

Changelog

- description: |
    Fix `--output-json` and `--output-text` help description
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

Comment on lines 1362 to 1366
cioWriteTextOutput
:: Maybe (File content Out)
-> Text
-> CIO e ()
cioWriteTextOutput mOutput t =
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cioWriteTextOutput
:: Maybe (File content Out)
-> Text
-> CIO e ()
cioWriteTextOutput mOutput t =
writeTextOutput
:: Maybe (File content Out)
-> Text
-> CIO e ()
writeTextOutput mOutput t =

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed it to maybeWriteTextOutput because writeTextOutput is already exported by cardano-api.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe in the name is misleading IMHO, because it'll always write output, but just to a different place. Why not writeOutput or something simpler? Ideally, we should create a type class for various output types (I saw Text, lazy and strict ByteStrings). But that's out of scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to writeOutput.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's still maybeWriteTextOutput in the PR 😅

@newhoggy newhoggy force-pushed the newhoggy/simplify-query-flag branch from 4c998f2 to 4cbe194 Compare May 19, 2025 14:15
@newhoggy newhoggy requested a review from carbolymer May 19, 2025 14:45
@newhoggy newhoggy force-pushed the newhoggy/simplify-query-flag branch from 4cbe194 to 9af8d99 Compare May 20, 2025 09:48
@newhoggy newhoggy enabled auto-merge May 20, 2025 10:01
@newhoggy newhoggy added this pull request to the merge queue May 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 20, 2025
@newhoggy newhoggy added this pull request to the merge queue May 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 21, 2025
@newhoggy newhoggy force-pushed the newhoggy/simplify-query-flag branch from 9af8d99 to 199c2fc Compare May 21, 2025 13:31
@newhoggy newhoggy force-pushed the newhoggy/simplify-query-flag branch from 199c2fc to 616fc78 Compare May 22, 2025 12:37
@newhoggy newhoggy enabled auto-merge May 22, 2025 12:37
@newhoggy newhoggy added this pull request to the merge queue May 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2025
@newhoggy newhoggy added this pull request to the merge queue May 23, 2025
Merged via the queue into master with commit e0f4fa9 May 23, 2025
26 checks passed
@newhoggy newhoggy deleted the newhoggy/simplify-query-flag branch May 23, 2025 11:26
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.

3 participants