-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Replace --quiet with --banner #23343
Merged
JeffBezanson
merged 10 commits into
JuliaLang:master
from
HarrisonGrodin:rename/quiet-to-banner
Aug 21, 2017
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6713d86
Replace --quiet with --banner
HarrisonGrodin ab11f26
Merge branch 'master' of https://github.com/JuliaLang/julia into rena…
HarrisonGrodin 097ea08
Set default to --banner=yes
HarrisonGrodin fbbe19a
Fix cmdlineargs test
HarrisonGrodin 88c0dbe
Readd --quiet with deprecation warning
HarrisonGrodin 5c692d4
Clarify banner logic
HarrisonGrodin 9615340
Note deprecation in base/deprecation.jl and update NEWS.md
HarrisonGrodin 46389d2
Merge branch 'master' into rename/quiet-to-banner
HarrisonGrodin d1a64f5
Move NEWS.md update to 0.7 section
HarrisonGrodin 1a10f16
Merge branch 'rename/quiet-to-banner' of https://github.com/HarrisonG…
HarrisonGrodin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ JL_DLLEXPORT const char *jl_get_default_sysimg_path(void) | |
} | ||
|
||
|
||
jl_options_t jl_options = { 0, // quiet | ||
jl_options_t jl_options = { 1, // banner | ||
NULL, // julia_home | ||
NULL, // julia_bin | ||
NULL, // eval | ||
|
@@ -102,7 +102,7 @@ static const char opts[] = | |
|
||
// interactive options | ||
" -i Interactive mode; REPL runs and isinteractive() is true\n" | ||
" -q, --quiet Quiet startup (no banner)\n" | ||
" --banner={yes|no} Enable or disable startup banner\n" | ||
" --color={yes|no} Enable or disable color text\n" | ||
" --history-file={yes|no} Load or save history\n\n" | ||
|
||
|
@@ -170,7 +170,8 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) | |
opt_output_ji, | ||
opt_use_precompiled, | ||
opt_use_compilecache, | ||
opt_incremental | ||
opt_incremental, | ||
opt_banner | ||
}; | ||
static const char* const shortopts = "+vhqH:e:E:L:J:C:ip:O:g:"; | ||
static const struct option longopts[] = { | ||
|
@@ -180,6 +181,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) | |
{ "version", no_argument, 0, 'v' }, | ||
{ "help", no_argument, 0, 'h' }, | ||
{ "quiet", no_argument, 0, 'q' }, | ||
{ "banner", required_argument, 0, opt_banner }, | ||
{ "home", required_argument, 0, 'H' }, | ||
{ "eval", required_argument, 0, 'e' }, | ||
{ "print", required_argument, 0, 'E' }, | ||
|
@@ -280,9 +282,6 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) | |
case 'h': // help | ||
jl_printf(JL_STDOUT, "%s%s", usage, opts); | ||
jl_exit(0); | ||
case 'q': // quiet | ||
jl_options.quiet = 1; | ||
break; | ||
case 'g': // debug info | ||
if (optarg != NULL) { | ||
if (!strcmp(optarg,"0")) | ||
|
@@ -315,6 +314,18 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) | |
jl_options.image_file = strdup(optarg); | ||
jl_options.image_file_specified = 1; | ||
break; | ||
case 'q': // quiet | ||
jl_printf(JL_STDERR, "-q and --quiet are deprecated, use --banner=no instead\n"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should add a comment in the 0.7 section of base/deprecated.jl so this gets staged for removal at the right time also should add a NEWS.md note about the changed command-line flag |
||
jl_options.banner = 0; | ||
break; | ||
case opt_banner: // banner | ||
if (!strcmp(optarg,"yes")) | ||
jl_options.banner = 1; | ||
else if (!strcmp(optarg,"no")) | ||
jl_options.banner = 0; | ||
else | ||
jl_errorf("julia: invalid argument to --banner={yes|no} (%s)", optarg); | ||
break; | ||
case opt_use_precompiled: | ||
if (!strcmp(optarg,"yes")) | ||
jl_options.use_precompiled = JL_OPTIONS_USE_PRECOMPILED_YES; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's a bit strange to depend on
banner
for this warning.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.
True, but I would argue that's beyond the scope of this PR. It's just that the better option name made it clear how weird it is that this works this way, so that's a good sign for this change. I've opened a separate issue about this: #23380.
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.
quiet
could be (in the future) an umbrella option for a bag of others, includingbanner
and supressing this warning above; but until there are more candidates to be controlled byquiet
, it seems fine to have banner control this warning.