8000 -Xprint and -Xshow-phases are undocumented in -help/-X · Issue #11710 · scala/bug · GitHub
[go: up one dir, main page]

Skip to content
-Xprint and -Xshow-phases are undocumented in -help/-X #11710
@ches

Description

@ches

Amusingly, -Xprint is mentioned in the notes section at the bottom of -X, but not actually in the option listing:

Phases are a list of names, ids, or ranges of ids: -Xprint:parser,typer,5-10

And of course, it'd be ever so helpful to know how to find that list of phase names from right here on the command line without intermediate Googling step ☺️

$ scalac -version
Scala compiler version 2.13.0 -- Copyright 2002-2019, LAMP/EPFL and Lightbend, Inc.

$ scalac -X
Usage: scalac <options> <source files>

Available advanced options:
  -Xcheckinit                      Wrap field accessors to throw an exception on uninitialized access.
  -Xdev                            Indicates user is a developer - issue warnings about anything which seems amiss
  -Xdisable-assertions             Generate no assertions or assumptions.
  -Xelide-below <n>                Calls to @elidable methods are omitted if method priority is lower than argument
  -Xgenerate-phase-graph <file>    Generate the phase graphs (outputs .dot files) to fileX.dot.
  -Xlint:<warnings>                Enable recommended warnings
  -Xmacro-settings:<option>        Custom settings for macros.
  -Xmain-class <path>              Class for manifest's Main-Class entry (only useful with -d <jar>)
  -Xmaxerrs <n>                    Maximum errors to print
  -Xmaxwarns <n>                   Maximum warnings to print
  -Xmigration:<version>            Warn about constructs whose behavior may have changed since version.
  -Xmixin-force-forwarders:<mode>  Generate forwarder methods in classes inhering concrete methods from traits. Default: `true`, `help` to list choices.
  -Xno-forwarders                  Do not generate static forwarders in mirror classes.
  -Xno-patmat-analysis             Don't perform exhaustivity/unreachability analysis. Also, ignore @switch annotation.
  -Xno-uescape                     Disable handling of \u unicode escapes.
  -Xnojline                        Do not use JLine for editing.
  -Xplugin:<paths>                 Load a plugin from each classpath.
  -Xplugin-disable:<plugin>        Disable plugins by name.
  -Xplugin-list                    Print a synopsis of loaded plugins.
  -Xplugin-require:<plugin>        Abort if a named plugin is not loaded.
  -Xpluginsdir <path>              Path to search for plugin archives.
  -Xprompt                         Display a prompt after each error (debugging option).
  -Xreporter <classname>           Specify a custom reporter for compiler messages.
  -Xresident                       Compiler stays resident: read source filenames from standard input.
  -Xscript <object>                Treat the source file as a script and wrap it in a main method.
  -Xsource:<version>               Treat compiler input as Scala source for the specified version, see scala/bug#8126.
  -Xsource-reader <classname>      Specify a custom method for reading source files.
  -Xverify                         Verify generic signatures in generated bytecode.
  -Xxml:<propertys>                Configure XML parsing.

Deprecated settings:
  -Xexperimental                   Former graveyard for language-forking extensions.
                                     deprecated: Not used since 2.13.
  -Xfuture                         Replaced by -Xsource.
                                     deprecated: Not used since 2.13.

-- Note --
Boolean settings are false unless set: -Xdev -Xcheck-init:true -Xprompt:false
Multi-valued settings are comma-separated: -Xlint:infer-any,unused,-missing-interpolator
Phases are a list of names, ids, or ranges of ids: -Xprint:parser,typer,5-10 -Ylog:-4
Use _ to enable all: -language:_ -Xprint:_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0