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

Indicate defaults in comandline help #44223

Merged
merged 11 commits into from
Feb 25, 2022
Merged

Conversation

laborg
Copy link
Contributor

@laborg laborg commented Feb 17, 2022

Fixes #12682
Fixes #43949
Fixes #36017

  • * indicates the default if the options is unspecified
  • Fixed a couple of inconsistencies (e.g. use ` instead of ")
  • The man page and the command-line-options.md have been updated too
$ ./julia --help

    julia [switches] -- [programfile] [args...]

Switches (a '*' marks the default value, if applicable):

 -v, --version              Display version information
 -h, --help                 Print this message (--help-hidden for more)
 --help-hidden              Uncommon options not shown by `-h`

 --project[={<dir>|@.}]     Set <dir> as the home project/environment
 -J, --sysimage <file>      Start up with the given system image file
 -H, --home <dir>           Set location of `julia` executable
 --startup-file={yes*|no}   Load `JULIA_DEPOT_PATH/config/startup.jl`; if `JULIA_DEPOT_PATH`
                            environment variable is unset, load `~/.julia/config/startup.jl`
 --handle-signals={yes*|no} Enable or disable Julia's default signal handlers
 --sysimage-native-code={yes*|no}
                            Use native code from system image if available
 --compiled-modules={yes*|no}
                            Enable or disable incremental precompilation of modules

 -e, --eval <expr>          Evaluate <expr>
 -E, --print <expr>         Evaluate <expr> and display the result
 -L, --load <file>          Load <file> immediately on all processors

 -t, --threads {N|auto}     Enable N threads; "auto" tries to infer a useful default number
                            of threads to use but the exact behavior might change in the future.
                            Currently, "auto" uses the number of CPUs assigned to this julia
                            process based on the OS-specific affinity assignment interface, if
                            supported (Linux and Windows). If this is not supported (macOS) or
                            process affinity is not configured, it uses the number of CPU
                            threads.
 -p, --procs {N|auto}       Integer value N launches N additional local worker processes
                            "auto" launches as many workers as the number of local CPU threads (logical cores)
 --machine-file <file>      Run processes on hosts listed in <file>

 -i                         Interactive mode; REPL runs and `isinteractive()` is true
 -q, --quiet                Quiet startup: no banner, suppress REPL warnings
 --banner={yes|no|auto*}    Enable or disable startup banner
 --color={yes|no|auto*}     Enable or disable color text
 --history-file={yes*|no}   Load or save history

 --depwarn={yes|no*|error}  Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)
 --warn-overwrite={yes|no*} Enable or disable method overwrite warnings
 --warn-scope={yes*|no}     Enable or disable warning for ambiguous top-level scope

 -C, --cpu-target <target>  Limit usage of CPU features up to <target>; set to `help` to see the available options
 -O, --optimize={0,1,2*,3}  Set the optimization level (level 3 if `-O` is used without a level)
 --min-optlevel={0*,1,2,3}  Set a lower bound on the optimization level
 -g [{0,1*,2}]              Set the level of debug info generation (level 2 if `-g` is used without a level)
 --inline={yes*|no}         Control whether inlining is permitted, including overriding @inline declarations
 --check-bounds={yes|no|auto*}
                            Emit bounds checks always, never, or respect @inbounds declarations
 --math-mode={ieee,fast}    Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)

 --code-coverage[={none*|user|all}]
                            Count executions of source lines (omitting setting is equivalent to `user`)
 --code-coverage=tracefile.info
                            Append coverage information to the LCOV tracefile (filename supports format tokens)
 --track-allocation[={none*|user|all}]
                            Count bytes allocated by each source line (omitting setting is equivalent to `user`)
 --bug-report=KIND          Launch a bug report session. It can be used to start a REPL, run a script, or evaluate
                            expressions. It first tries to use BugReporting.jl installed in current environment and
                            fallbacks to the latest compatible BugReporting.jl if not. For more information, see
                            --bug-report=help.
$ ./julia --help-hidden

    julia [switches] -- [programfile] [args...]

Switches (a '*' marks the default value, if applicable):

 --compile={yes*|no|all|min}
                          Enable or disable JIT compiler, or request exhaustive or minimal compilation

 --output-o <name>        Generate an object file (including system image data)
 --output-ji <name>       Generate a system image data file (.ji)
 --strip-metadata         Remove docstrings and source location info from system image
 --strip-ir               Remove IR (intermediate representation) of compiled functions

 --output-unopt-bc <name> Generate unoptimized LLVM bitcode (.bc)
 --output-bc <name>       Generate LLVM bitcode (.bc)
 --output-asm <name>      Generate an assembly file (.s)
 --output-incremental={yes|no*}
                          Generate an incremental output file (rather than complete)
 --trace-compile={stderr,name}
                          Print precompile statements for methods compiled during execution or save to a path
 --image-codegen          Force generate code in imaging mode

@vtjnash
Copy link
Member

vtjnash commented Feb 17, 2022

Can you add a brief note at the top of each of these docs saying that "A '*' marks the default value, if applicable."

@laborg laborg marked this pull request as draft February 22, 2022 18:48
@vtjnash
Copy link
Member

vtjnash commented Feb 22, 2022

still draft, or ready for review now?

@laborg laborg marked this pull request as ready for review February 22, 2022 19:44
@laborg
Copy link
Contributor Author

laborg commented Feb 23, 2022

Its ready for review. Not sure if the CI failures should tell me something.

doc/man/julia.1 Outdated Show resolved Hide resolved
doc/src/manual/command-line-options.md Outdated Show resolved Hide resolved
laborg and others added 2 commits February 23, 2022 18:23
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Feb 23, 2022
@KristofferC KristofferC merged commit c6b5fa2 into JuliaLang:master Feb 25, 2022
@laborg laborg deleted the cmddefaults branch February 25, 2022 10:16
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Feb 25, 2022
staticfloat pushed a commit to JuliaCI/julia-buildkite-testing that referenced this pull request Mar 2, 2022
Co-authored-by: Gerhard Aigner <aigner@trium.de>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@IanButterworth IanButterworth added the backport 1.8 Change should be backported to release-1.8 label Mar 7, 2022
@IanButterworth
Copy link
Member

Marking this for 1.8 backport as I don't see any reason not to, and at least one PR for backport is on top of this

IanButterworth pushed a commit that referenced this pull request Mar 7, 2022
Co-authored-by: Gerhard Aigner <aigner@trium.de>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
(cherry picked from commit c6b5fa2)
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Co-authored-by: Gerhard Aigner <aigner@trium.de>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants