Skip to content

Commit

Permalink
Correct compiler initialization, ensuring defines are set properly
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Nov 26, 2023
1 parent ff24edd commit 7408030
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import javax.annotation.Nullable;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -202,7 +203,6 @@ static class InProcessJsCompRunner extends CommandLineRunner {
super(args);
this.compiler = compiler;
this.compiler.setErrorManager(new SortingErrorManager(Collections.singleton(new LoggingErrorReportGenerator(compiler, log))));
this.compiler.setPassConfig(new ServiceLoadingPassConfig(createOptions()));
this.exportTestFunctions = exportTestFunctions;
this.checkAssertions = checkAssertions;
setExitCodeReceiver(exitCode -> {
Expand All @@ -228,6 +228,12 @@ protected CompilerOptions createOptions() {

return options;
}

@Override
protected void setRunOptions(CompilerOptions options) throws IOException {
super.setRunOptions(options);
this.compiler.setPassConfig(new ServiceLoadingPassConfig(options));
}
}


Expand Down

0 comments on commit 7408030

Please sign in to comment.