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 CommandSpec without args and help #2721

Merged
merged 3 commits into from
Jun 1, 2018
Merged

Fix CommandSpec without args and help #2721

merged 3 commits into from
Jun 1, 2018

Conversation

mfelsche
Copy link
Contributor

And Actually run the cli tests (that weren't passing).

To fix the case of a CommandSpec.leaf without args and with help i added a _type fields and getters for properly determining if a CommandSpec is a parent or a leaf. I would be more comfortable with having two different classes here that share a common trait, but i tried going that route and it entails some breaking API changes that need to go through the RFC process. I decided to ease the pain for now with this fix, but will most likely do a separate RFC soon.

Matthias Wahl added 3 commits May 29, 2018 12:38
and fix OptionStop test
which was considered CommandSpec.parent and thus got a subcommand added in add_help.

Added a _type field to differentiate the two types of CommandSpecs properly.
@mfelsche mfelsche added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label May 29, 2018
@jemc jemc merged commit 59ca48d into master Jun 1, 2018
ponylang-main added a commit that referenced this pull request Jun 1, 2018
@jemc
Copy link
Member

jemc commented Jun 1, 2018

Thanks for taking care of this.

dipinhora pushed a commit to dipinhora/ponyc that referenced this pull request Jun 5, 2018
* fix cli example for Env.vars now being a field

* include cli tests in stdlib test suite

and fix OptionStop test

* fix CommandSpec.leaf without args and with help added

which was considered CommandSpec.parent and thus got a subcommand added in add_help.

Added a _type field to differentiate the two types of CommandSpecs properly.
dipinhora pushed a commit to dipinhora/ponyc that referenced this pull request Jun 5, 2018
@jemc jemc deleted the cli-tests branch January 8, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants