-
Notifications
You must be signed in to change notification settings - Fork 11
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
call stop instead of quit #5
Conversation
- build vignettes for checking - install rst2pdf - warnings are errors
Overall, looks great. Comments will be forthcoming on things that could be I usually ask contributors give me an Unlimited license to their Thanks, Trevor On Sun, Nov 24, 2013 at 1:15 AM, Kirill Müller [email protected]:
|
Congratulations, and good luck! Thanks. You could still apply #4 first, #5 (or a modified version) can be applied on top. One more reason not to call Unlimited license to use my contributions under any open-source license is granted herewith. |
Calling quit does technically break CRAN policy but whenever I submit a new version of optparse or argparse to CRAN I usually draw attention to it with something like "NB. As previously disclosed and documented this package, if the parser sees an help option, will call quit() after printing a usage message.". So it looks like, at least for the moment (although CRAN is known for changing directions), for this very narrow use case CRAN won't make me change this especially if the examples and tests don't directly call quit. The package isn't intended for interactive use where the use of "quit" is most surprising and malicious. The new forcibly emitted error message would surprise and bug current package users. Theoretically you could indirectly test whether it was quitting properly by writing a utility Rscript that cats info at the end after it calls parse_args. You could then use system function and intern the output to see if it was working correctly by checking whether the help message was being printed out and the extra info was not being catted out. The package vignette effectively runs this test in a non-automated fashion. |
But what about interactive use in RStudio et al.? Although not designed for interactive use, I have "hybrid" scripts that should work in both RStudio and standalone. There should be a way not to call Users who rely on quitting can use
We can provide a wrapper or an optional parameter in Actually, there would be ways to mock |
What are your specific interactive via RStudio use cases? Already if you want to interactively see help in R without quitting you can use
The primary purpose of the package is to be used non-interactively in a Rscript. Users have been writing scripts with |
Github won't let me re-open this thread about |
It's just that I really need to be careful not to pass Why don't we call |
See also the help to
|
Seems reasonable. Made commit so that development version now only calls On Sun, Dec 15, 2013 at 4:30 PM, Kirill Müller [email protected]:
|
Calling
quit()
is not testable and may be too harsh and even conflict with CRAN policy:OTOH,
stop()
forcibly prints an error message which I have been unable to mute.Fixes #4 (=includes it).