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

Fix #195: options --help and --version #197

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

andreasabel
Copy link
Contributor

Fix #195: options --help and --version

Preparatory patch: Since we have GHC>=8 (base >=4.9), we can simplify package.yaml

  • remove conditional semigroups dependency
  • add -Wall and -Wcompat (GHC 8) to all goals

yaml2json

Using optparse-applicative, let yaml2json understand options

--help | -h
--version | -V | --numeric-version

in a robust way.

Otherwise, no change of cmdline syntax:

yaml2json file.yml     # read from file
yaml2json -            # read from stdin

Tested build with GHC 8.0 - 9.0.

json2yaml

NYI, if everything is fine with the yaml2json half, I implement it for json2yaml likewise.

- remove conditional semigroups dependency
- add -Wall and -Wcompat (GHC 8) to all goals
Using optparse-applicative, let yaml2json understand options

    --help | -h
    --version | -V | --numeric-version

in a robust way.

Otherwise, no change of cmdline syntax:

    yaml2json file.yml     # read from file
    yaml2json -            # read from stdin

Tested build with GHC 8.0 - 9.0.
Copy link
Owner

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Thanks!

@snoyberg snoyberg merged commit 2ba7d84 into snoyberg:master Sep 15, 2021
@snoyberg
Copy link
Owner

Looks great! I'm adding a ChangeLog entry and version bump. From your last comment, it sounds like you're planning a follow-up PR for json2yaml, so I'll hold off on releasing until then. Thank you!

@andreasabel
Copy link
Contributor Author

Looks great! I'm adding a ChangeLog entry and version bump. From your last comment, it sounds like you're planning a follow-up PR for json2yaml, so I'll hold off on releasing until then. Thank you!

Very good! I get to work asap!

@andreasabel
Copy link
Contributor Author

Very good! I get to work asap!

See #198.

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.

json2yaml does not understand --help; both do not understand --version
2 participants