dotty.tools.dotc.sbt.interfaces.ProgressCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala3-compiler_3 Show documentation
Show all versions of scala3-compiler_3 Show documentation
scala3-compiler-bootstrapped
package dotty.tools.dotc.sbt.interfaces;
import dotty.tools.dotc.CompilationUnit;
public interface ProgressCallback {
/** Record that the cancellation signal has been received during the Zinc run. */
default void cancel() {}
/** Report on if there was a cancellation signal for the current Zinc run. */
default boolean isCancelled() { return false; }
/** Record that a unit has started compiling in the given phase. */
default void informUnitStarting(String phase, CompilationUnit unit) {}
/** Record the current compilation progress.
* @param current `completedPhaseCount * totalUnits + completedUnitsInCurrPhase + completedLate`
* @param total `totalPhases * totalUnits + totalLate`
* @return true if the compilation should continue (callers are expected to cancel if this returns false)
*/
default boolean progress(int current, int total, String currPhase, String nextPhase) { return true; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy