Entry point to the compiler using a custom Context
.
Entry point to the compiler using a custom Context
.
In most cases, you do not need a custom Context
and should
instead use one of the other overloads of process
. However,
the other overloads cannot be overriden, instead you
should override this one which they call internally.
Usage example: https://github.com/lampepfl/dotty/tree/master/test/test/OtherEntryPointsTest.scala
in method runCompilerWithContext
Arguments to pass to the compiler.
The root Context to use.
The Reporter
used. Use Reporter#hasErrors
to check
if compilation succeeded.
Entry point to the compiler with no optional arguments.
Entry point to the compiler with no optional arguments.
This overload is provided for compatibility reasons: the
RawCompiler
of sbt expects this method to exist and calls
it using reflection. Keeping it means that we can change
the other overloads without worrying about breaking compatibility
with sbt.
Principal entry point to the compiler.
Principal entry point to the compiler.
Usage example: https://github.com/lampepfl/dotty/tree/master/test/test/OtherEntryPointsTest.scala
in method runCompiler
Arguments to pass to the compiler.
Used to log errors, warnings, and info messages.
The default reporter is used if this is null
.
Used to execute custom code during the compilation
process. No callbacks will be executed if this is null
.
The Reporter
used. Use Reporter#hasErrors
to check
if compilation succeeded.
Entry point to the compiler that can be conveniently used with Java reflection.
Entry point to the compiler that can be conveniently used with Java reflection.
This entry point can easily be used without depending on the dotty
package,
you only need to depend on dotty-interfaces
and call this method using
reflection. This allows you to write code that will work against multiple
versions of dotty without recompilation.
The trade-off is that you can only pass a SimpleReporter to this method and not a normal Reporter which is more powerful.
Usage example: https://github.com/lampepfl/dotty/tree/master/test/test/InterfaceEntryPointTest.scala
Arguments to pass to the compiler.
Used to log errors, warnings, and info messages.
The default reporter is used if this is null
.
Used to execute custom code during the compilation
process. No callbacks will be executed if this is null
.
Throws an UnsupportedOperationException
with the given method name.
Throws an UnsupportedOperationException
with the given method name.
A compiler which stays resident between runs. This is more of a PoC than something that's expected to be used often
Usage:
> scala dotty.tools.dotc.Resident <options> <initial files>
dotc> "more options and files to compile"
...
dotc> :reset // reset all options to the ones passed on the command line
...
dotc> :q // quit