Proper handling of compiler messages
We used to have a triple (errorStream, messageRenderer, verbose) to represent the error reporting strategy. Now we have a single MessageCollector abstraction for this. As the MessageCollector abstraction was extracted, the need to CompilerMessageLocation and CompilerMessageSeverity arose, too.
This commit is contained in:
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.compiler.CompileEnvironment;
|
||||
import org.jetbrains.jet.compiler.CompileEnvironmentException;
|
||||
import org.jetbrains.jet.compiler.CompilerPlugin;
|
||||
import org.jetbrains.jet.compiler.messages.MessageCollector;
|
||||
import org.jetbrains.jet.lang.resolve.java.CompilerDependencies;
|
||||
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
|
||||
|
||||
@@ -49,7 +50,7 @@ public class BytecodeCompiler {
|
||||
* @return compile environment instance
|
||||
*/
|
||||
private CompileEnvironment env( String stdlib, String[] classpath ) {
|
||||
CompileEnvironment env = new CompileEnvironment(CompilerDependencies.compilerDependenciesForProduction(CompilerSpecialMode.REGULAR));
|
||||
CompileEnvironment env = new CompileEnvironment(MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR, CompilerDependencies.compilerDependenciesForProduction(CompilerSpecialMode.REGULAR));
|
||||
|
||||
if (( stdlib != null ) && ( stdlib.trim().length() > 0 )) {
|
||||
env.setStdlib( stdlib );
|
||||
|
||||
Reference in New Issue
Block a user