From 9c75143382ae76aa786f284d4f1f7b6f65f0ff2d Mon Sep 17 00:00:00 2001 From: Grzegorz Kossakowski Date: Thu, 24 Oct 2013 12:21:53 +0200 Subject: [PATCH] Remove AnalysisCallback.{beginSource, endSource} methods. As pointed out by @harrah in #705, both beginSource and endSource are not used in sbt internally for anything meaningful. We've discussed an option of deprecating those methods but since they are not doing anything meaningful Mark prefers to have compile-time error in case somebody implements or calls those methods. I agree with that hence removal. --- interface/src/main/java/xsbti/AnalysisCallback.java | 4 ---- interface/src/test/scala/TestCallback.scala | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/interface/src/main/java/xsbti/AnalysisCallback.java b/interface/src/main/java/xsbti/AnalysisCallback.java index d00f5b7ed..55a90f011 100644 --- a/interface/src/main/java/xsbti/AnalysisCallback.java +++ b/interface/src/main/java/xsbti/AnalysisCallback.java @@ -7,8 +7,6 @@ import java.io.File; public interface AnalysisCallback { - /** Called before the source at the given location is processed. */ - public void beginSource(File source); /** Called to indicate that the source file source depends on the source file * dependsOn. Note that only source files included in the current compilation will * passed to this method. Dependencies on classes generated by sources not in the current compilation will @@ -24,8 +22,6 @@ public interface AnalysisCallback /** Called to indicate that the source file source produces a class file at * module contain class name.*/ public void generatedClass(File source, File module, String name); - /** Called after the source at the given location has been processed. */ - public void endSource(File sourcePath); /** Called when the public API of a source file is extracted. */ public void api(File sourceFile, xsbti.api.SourceAPI source); /** Provides problems discovered during compilation. These may be reported (logged) or unreported. diff --git a/interface/src/test/scala/TestCallback.scala b/interface/src/test/scala/TestCallback.scala index 061457723..5c0de068e 100644 --- a/interface/src/test/scala/TestCallback.scala +++ b/interface/src/test/scala/TestCallback.scala @@ -5,20 +5,15 @@ package xsbti class TestCallback extends AnalysisCallback { - val beganSources = new ArrayBuffer[File] - val endedSources = new ArrayBuffer[File] val sourceDependencies = new ArrayBuffer[(File, File, Boolean)] val binaryDependencies = new ArrayBuffer[(File, String, File, Boolean)] val products = new ArrayBuffer[(File, File, String)] val apis = new ArrayBuffer[(File, xsbti.api.SourceAPI)] - def beginSource(source: File) { beganSources += source } - def sourceDependency(dependsOn: File, source: File, inherited: Boolean) { sourceDependencies += ((dependsOn, source, inherited)) } def binaryDependency(binary: File, name: String, source: File, inherited: Boolean) { binaryDependencies += ((binary, name, source, inherited)) } def generatedClass(source: File, module: File, name: String) { products += ((source, module, name)) } - def endSource(source: File) { endedSources += source } def api(source: File, sourceAPI: xsbti.api.SourceAPI) { apis += ((source, sourceAPI)) } def problem(category: String, pos: xsbti.Position, message: String, severity: xsbti.Severity, reported: Boolean) {} -} \ No newline at end of file +}