aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Driver.scala
Commit message (Collapse)AuthorAgeFilesLines
* Make `FancyConsoleReporter` and `Highlighting` obey color settingFelix Mulder2016-10-101-5/+1
| | | | | | | Fancy console reporter and the string interpolator for highlighting now obey the color setting - this means that the next step towards unifying the reporters is to make sure the tests work with `FancyConsoleReporter` under the `-color:never` flag.
* Add modifiers to highlightingFelix Mulder2016-10-101-1/+5
|
* Properly report errors when cli flags are malformedGuillaume Martres2016-06-021-1/+1
| | | | | Previously we returned an empty Reporter with no errors so partest reported the test as a success.
* Get rid of prompt in DriverMartin Odersky2016-03-181-2/+0
| | | | It's used only in Resident, where it should be defined.
* Add a `dotty-interfaces` packageGuillaume Martres2016-02-281-5/+37
| | | | | | | | | | | | | | | | | | | | | | We introduce a new entry point for the compiler in `dotty.tools.dotc.Driver`: ``` def process(args: Array[String], simple: interfaces.SimpleReporter, callback: interfaces.CompilerCallback): interfaces.ReporterResult ``` Except for `args` which is just an array, the argument types and return type of this method are Java interfaces defined in a new package called `dotty-interfaces` which has a stable ABI. This means that you can programmatically run a compiler with a custom reporter and callbacks without having to recompile it against every version of dotty: you only need to have `dotty-interfaces` present at compile-time and call the `process` method using Java reflection. See `test/test/InterfaceEntryPointTest.scala` for a concrete example. This design is based on discussions with the IntelliJ IDEA Scala plugin team. Thanks to Nikolay Tropin for the discussions and his PR proposal (see #1011).
* Remove dotty.tools.dotc.FatalError; use dotty.tools.FatalError instead.Sébastien Doeraene2016-02-241-3/+1
|
* Fix FatalError's constructor to forward `msg` to super.Sébastien Doeraene2016-02-241-1/+1
| | | | | Previously, getMessage() always returned `null`, causing NPEs when trying to report a FatalError.
* newCompiler now takes a context parameterMartin Odersky2016-02-171-2/+2
| | | | | Makes side-effecting initialization of interpreter unnecessary.
* Better compiler entry pointsGuillaume Martres2016-02-041-10/+48
| | | | | | | | | - Document the entry points - It is now possible to set a custom reporter without using a custom context - Use `null` for optional arguments to make it easier to run the compiler using reflection or from Java. - DPDirectCompiler does not use a custom context anymore
* Driver: properly use root Context passed as argumentGuillaume Martres2016-02-041-6/+4
| | | | | | | | | | | | | | | Also CompilerTest no longer runs the compiler with the context DottyTest#ctx. Previously, we got away with this because Compiler#process ignored it and created a new Context, but this commit fixes this, and it is now very important that we use a different context for every test we compile. Since DottyTest#ctx was the only part of DottyTest we used, CompilerTest no longer extends DottyTest to make sure that we do not use it accidentally. If we want to use DottyTest as a base class for tests again, we will have to remove its implicit Context field first. Also do not try to initialize the definitions in the context used by partest, this is not necessary.
* Add initial CompilerCallback implementation for IntelliJGuillaume Martres2015-12-031-1/+8
| | | | | This adds some simple callbacks to Dotty that should be enough to get basic integration from IntelliJ.
* Preload scala.util.control.NonFatalGuillaume Martres2015-11-261-1/+6
|
* Make it easier to call the compiler using reflectionGuillaume Martres2015-10-291-1/+7
|
* Keep separate chain of outer reporters for StoreReportersMartin Odersky2015-10-261-1/+1
| | | | | | | | Used in rewritten `errorsReported` method. This fixes #866. The problem before was that `TyperState#trywithFallBack` temporarily updates the reporter, so crawling up the context chain to check for reporters with errors missed some reported errors, which triggered the assertion in `Tree#withType`.
* Shorten ctx.typerState.reporter to ctx.reporterMartin Odersky2015-10-261-1/+1
| | | | ... making use of method in `ctx`.
* Refactor DriverMartin Odersky2015-06-291-17/+24
| | | | | | - Make parts more reusable - Introduce hook "sourcesRequired" that controls whether no sources on the command line give a help message.
* Partest 1/3: Pass PrintWriter as argument for context creationvsalvis2015-06-241-4/+5
|
* Remove catch-rethrow in DriverDmitry Petrashko2014-12-171-2/+0
|
* Replace Throwable catches with NonFatalMartin Odersky2014-12-151-8/+6
| | | | | | Previously, stackoverflows led to infinite loops because the catch immediately threw another stack overflow. Anyway, one should never catch Throwable.
* Allow to provide parent Context for Driver.processDmitry Petrashko2014-04-111-3/+3
|
* Rename methods on FreshContext to make mutation obviousDmitry Petrashko2014-03-271-1/+1
| | | | And avoid name clashes
* New scheme for attachments.Martin Odersky2014-02-111-1/+1
| | | | | | | Added general way to put attachments on some base type (which needs to inherit from Attachment.Container). Used it to turn typedTree map into an attachment. Also, moved DotClass to dotc.util.
* Checking for already existing symbols before creating new ones.Martin Odersky2014-02-061-1/+1
| | | | | Otherwise we get spurious "compiled twice" errors on every symbol defined in a run after the first one. Also, fixed a bug so that now run ids are correctly incremented.
* New benchmark class that allows tuning for #compilers and #runsMartin Odersky2014-02-031-1/+1
| | | | | | | | by command line options like #compilers 3 #runs 10 This would create one after another 3 compiler instances and perform 10 runs in each.
* Added unit testing supportMartin Odersky2013-11-181-7/+12
|
* Fixes problem with printing summary after compilationMartin Odersky2013-09-281-1/+1
| | | | Used wrong context/wrong reporter before.
* Some additions to module completionMartin Odersky2013-08-191-2/+1
| | | | … more to come. Plus some bugfixes.
* Added main runner and driver.Martin Odersky2013-08-121-0/+44
Left dummies for Compiler and Run.