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

Share code in fields of queries #985

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Nov 29, 2024

Changelog

- description: |
    Share code in fields of queries
# 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

Fixes #983

How to trust this PR

  • This is one of the PRs where, if it typechecks, it works.
  • -292+225

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/share-code-in-fields-of-queries branch from 4aff890 to 4a6f48c Compare November 29, 2024 17:22
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

We should exclude the output file from the refactor. It's a UI wart IMO but the rest of the refactor is 👍. I'm sure @CarlosLopezDeLara would agree here. I also think leaving the original out-file help is more informative.

--op-cert-file FILEPATH Filepath of the node's operational certificate.
--out-file FILEPATH Optional output file. Default is to write to stdout.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the change? It was more informative before.

( --mainnet
| --testnet-magic NATURAL
)
[--out-file FILEPATH]
--address ADDRESS
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the downside of the refactor. It affects the parsers and I would argue having --out-file as the last argument is more natural. More and more I wish for monadic parsers.

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.

Reduce duplication in Commands/Query.hs
2 participants