-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove read stdin loop #4097
Remove read stdin loop #4097
Conversation
Replaced the Scanner input read loop with upgraded joptsimple dependency. Cli now takes a single, non-option program argument, runs it and exits. Also removed the "stop client" command because there is no input loop, but shutdown() is called for orderly channel shudown before the jvm terminates. Also changed cmd syntax from camel case to lowercase, mimicking bitcoin-cli. Configured logback to supress all debug & info level netty output, and bypassed logback to print results to System.out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments and suggested changes. There are additional changes I'd make as well, but time is limited and this is good enough to go forward. Thanks.
Change member name OptionParser cmdParser -> parser. Change client port 8888 -> 9998. Change constructor argument from String[] param -> args. Print the result only, w/out exec time. Print help to stdout, not stderr. Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
Change member name OptionParser cmdParser -> parser. Change server listening port to 9998, client port to 9998. Change constructor argument from String[] param -> args. Print the result only, w/out exec time. Print help to stdout, not stderr. Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
aa5b5a0
to
d3e60fa
Compare
Change member name OptionParser cmdParser -> parser. Change server listening port to 9998, client port to 9998. Change constructor argument from String[] param -> args. Print the result only, w/out exec time. Handle help command, print help to stdout, not stderr. Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
cefb679
to
c451769
Compare
Change member name OptionParser cmdParser -> parser. Change server listening port to 9998, client port to 9998. Change constructor argument from String[] param -> args. Print the result only, w/out exec time. Handle help command & print that to stdout; print help triggered by user error to stderr. Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
c451769
to
aba595b
Compare
Please have another look at how help / usage output is handled in |
Please disregard this message. I wrote it via mobile, where I hadn't seen @ghubstan's #4097 (comment). |
I would generally recommend against force pushing on PR branches, especially where feedback is being folded in. It destroys history / information, and messes with merging / rebasing if someone (like myself) is coming along with review commits as well. I don't know why you did these force pushes, perhaps there was a great reason, just mentioning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, the changes look good. Thanks @ghubstan.
Sorry. No good enough reason for squashing too many intermediate commits, just a lot of interruptions today, preventing me from correctly implementing all of your requested changes in one push before the end of your, @cbeams' day. I thought one clean (2nd) commit message was more important. I'll be more careful and patient next time. |
All good, thanks! |
Change member name OptionParser cmdParser -> parser. Change server listening port to 9998, client port to 9998. Change constructor argument from String[] param -> args. Print the result only, w/out exec time. Handle help command & print that to stdout; print help triggered by user error to stderr. Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
Replaced the Scanner input read loop with upgraded joptsimple
dependency. Cli now takes a single, non-option program argument, runs
it and exits. Also removed the "stop client" command because there is
no input loop, but shutdown() is called for orderly channel shudown
before the jvm terminates. Also changed cmd syntax from camel case
to lowercase, mimicking bitcoin-cli.
Configured logback to supress all debug & info level netty output, and
bypassed logback to print results to System.out (replaces #4091).