"Fossies" - the Fresh Open Source Software Archive

Member "scala-2.13.9/doc/tools/fsc.html" (19 Sep 2022, 5951 Bytes) of package /windows/misc/scala-2.13.9.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 <?xml version="1.1" encoding="iso-8859-1"?>
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    4 
    5 <head>
    6 <title>fsc man page</title>
    7 <meta http-equiv="Content-Language" content="en"/>
    8 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    9 <meta name="Author" content="Lex Spoon"/>
   10 <style type="text/css">
   11   <!--
   12   blockquote, pre { margin:1em 4em 1em 4em; }
   13   dt { margin: 0.6em 0 0 0; }
   14   p { margin:0.6em 2em 0.6em 2em; text-align:justify; }
   15   //-->
   16 </style>
   17 </head>
   18 
   19 <body>
   20 <!-- header -->
   21 <div style="margin: 0 0 2em 0;">
   22 <div style="float:left;">
   23 fsc(1)
   24 </div>
   25 <div style="float:right;">
   26 fsc(1)
   27 </div>
   28 <div style="text-align:center;">
   29 USER COMMANDS
   30 </div>
   31 </div>
   32 
   33 <h3 id="name">NAME</h3>
   34 <p>
   35 <code><b>fsc</b></code> &#8211; Fast offline compiler for the <a href="https://scala-lang.org/">Scala 2</a> language</p>
   36 
   37 <h3 id="synopsis">SYNOPSIS</h3>
   38 <p>
   39 <code><b>fsc</b></code><code>  [ &lt;<i>options</i>&gt; ] &lt;<i>source files</i>&gt;</code></p>
   40 
   41 <h3 id="parameters">PARAMETERS</h3>
   42 <p>
   43 <ins><dl>
   44 <dt>
   45 <code>&lt;<i>options</i>&gt;</code>
   46 </dt>
   47 <dd>
   48 Command line options. See <a href="#options"><b>OPTIONS</b></a> below.</dd>
   49 <dt>
   50 <code>&lt;<i>source files</i>&gt;</code>
   51 </dt>
   52 <dd>
   53 One or more source files to be compiled (such as <code>MyClass.scala</code>).</dd>
   54 </dl></ins>
   55 </p>
   56 
   57 <h3 id="options">OPTIONS</h3>
   58 <p>
   59 The offline compiler supports <a href="scalac.html#options">all options of <code><b>scalac</b></code></a> plus the following:</p>
   60 <p>
   61 <ins><dl>
   62 <dt>
   63 <code><b>&#8211;reset</b> </code>
   64 </dt>
   65 <dd>
   66 Reset compile server caches.</dd>
   67 <dt>
   68 <code><b>&#8211;shutdown</b> </code>
   69 </dt>
   70 <dd>
   71 Shut down the compilation daemon.  The daemon attempts to restart itself as necessary, but sometimes an explicit shutdown is required. A common example is if jars on the class path have changed.</dd>
   72 <dt>
   73 <code><b>&#8211;server</b> &lt;<i>hostname:portnumber</i>&gt; </code>
   74 </dt>
   75 <dd>
   76 Specify compile server host at port number.  Usually this option is not needed.  Note that the hostname must be for a host that shares the same filesystem.</dd>
   77 <dt>
   78 <code><b>&#8211;J</b>&lt;<i>flag</i>&gt; </code>
   79 </dt>
   80 <dd>
   81 Pass <code>&lt;<i>flag</i>&gt;</code> directly to the Java VM for the compilation daemon.</dd>
   82 </dl></ins>
   83 </p>
   84 
   85 <h3 id="description">DESCRIPTION</h3>
   86 <p>
   87 The <code><b>fsc</b></code> tool submits Scala compilation jobs to a compilation daemon. The first time it is executed, the daemon is started automatically. On subsequent runs, the same daemon can be reused, thus resulting in a faster compilation. The tool is especially effective when repeatedly compiling with the same class paths, because the compilation daemon can reuse a compiler instance.</p>
   88 <p>
   89 The compilation daemon is smart enough to flush its cached compiler when the class path changes.  However, if the contents of the class path change, for example due to upgrading a library, then the daemon should be explicitly shut down with <code><b>-shutdown</b></code>.</p>
   90 <p>
   91 Note that the <a href="scala.html"><code><b>scala</b></code></a> script runner will also use the offline compiler by default, with the same advantages and caveats.</p>
   92 
   93 <h3 id="example">EXAMPLE</h3>
   94 <p>
   95 The following session shows a typical speed up due to using the offline compiler.</p>
   96 <pre>&gt; fsc -verbose -d /tmp test.scala
   97 \&amp;...
   98 [Port number: 32834]
   99 [Starting new Scala compile server instance]
  100 [Classpath = ...]
  101 [loaded directory path ... in 692ms]
  102 \&amp;...
  103 [parsing test.scala]
  104 \&amp;...
  105 [total in 943ms]
  106 
  107 &gt; fsc -verbose -d /tmp test.scala
  108 \&amp;...
  109 [Port number: 32834]
  110 [parsing test.scala]
  111 \&amp;...
  112 [total in 60ms]
  113 
  114 &gt; fsc -verbose -d /tmp test.scala
  115 \&amp;...
  116 [Port number: 32834]
  117 [parsing test.scala]
  118 \&amp;...
  119 [total in 42ms]
  120 
  121 &gt; fsc -verbose -shutdown
  122 [Scala compile server exited]
  123 </pre>
  124 
  125 <h3 id="environment">ENVIRONMENT</h3>
  126 <p>
  127 <ins><dl>
  128 <dt>
  129 <code><b>JAVACMD</b></code>
  130 </dt>
  131 <dd>
  132 Specify the <code><b>java</b></code> command to be used for running the Scala code.  Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion.</dd>
  133 <dt>
  134 <code><b>JAVA_HOME</b></code>
  135 </dt>
  136 <dd>
  137 Specify JDK/JRE home directory. This directory is used to locate the <code><b>java</b></code> command unless <code><b>JAVACMD</b></code> variable set.</dd>
  138 <dt>
  139 <code><b>JAVA_OPTS</b></code>
  140 </dt>
  141 <dd>
  142 <div>
  143 Specify the options to be passed to the <code><b>java</b></code> command defined by <code><b>JAVACMD</b></code>.
  144 </div>
  145 <div>
  146 One might for example configure the memory usage of the JVM with: <code>JAVA_OPTS="-Xmx2G -Xss16M"</code>
  147 </div>
  148 </dd>
  149 </dl></ins>
  150 </p>
  151 
  152 <h3 id="exit_status">EXIT STATUS</h3>
  153 <p>
  154 <code><b>fsc</b></code> returns a zero exit status if it succeeds to compile the specified input files. Non zero is returned in case of failure.</p>
  155 
  156 <h3 id="author">AUTHOR</h3>
  157 <p>
  158 Written by Martin Odersky and other members of the <a href="https://www.scala-lang.org/news/2014/01/22/10-years-of-scala.html">Scala team</a>.</p>
  159 
  160 <h3 id="reporting_bugs">REPORTING BUGS</h3>
  161 <p>
  162 Report bugs to <code>https://github.com/scala/bug/issues</code>.</p>
  163 
  164 <h3 id="copyright">COPYRIGHT</h3>
  165 <p>
  166 This is open-source software, available to you under the Apache License 2.0. See accompanying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
  167 
  168 <h3 id="see_also">SEE ALSO</h3>
  169 <p>
  170 <a href="scala.html"><b>scala</b>(1)</a>, <a href="scalac.html"><b>scalac</b>(1)</a>, <a href="scaladoc.html"><b>scaladoc</b>(1)</a>, <a href="scalap.html"><b>scalap</b>(1)</a></p>
  171 <!-- footer -->
  172 <div style="margin: 2em 0 0 0;">
  173 <div style="float:left;">
  174 version 0.5
  175 </div>
  176 <div style="float:right;">
  177 fsc(1)
  178 </div>
  179 <div style="text-align:center;">
  180 March 2012
  181 </div>
  182 </div>
  183 </body>
  184 </html>