From e44cb05e178be55d686326fc894e5ce22c8cb2d0 Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Thu, 6 Aug 2020 13:02:45 -0400 Subject: Add deprecations for more firrtl.Compiler methods (#1791) Adds missing deprecation warnings to firrtl.Compiler methods: compile and compileAndEmit. This provides a more informative message to the user about how to actually migrate. Without this, the user only has the generic deprecation warning about class Compiler. Signed-off-by: Schuyler Eldridge Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- src/main/scala/firrtl/Compiler.scala | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/scala/firrtl/Compiler.scala b/src/main/scala/firrtl/Compiler.scala index 1b437be4..359e83bc 100644 --- a/src/main/scala/firrtl/Compiler.scala +++ b/src/main/scala/firrtl/Compiler.scala @@ -540,7 +540,10 @@ trait Compiler extends Transform with DependencyAPIMigration { * @param customTransforms Any custom [[Transform]]s that will be inserted * into the compilation process by [[CompilerUtils.mergeTransforms]] */ - @deprecated("Please use compileAndEmit or other compile method instead", "firrtl 1.0") + @deprecated( + "Migrate to '(new FirrtlStage).execute(args: Array[String], annotations: AnnotationSeq)'." + + "This will be removed in 1.4.", + "FIRRTL 1.0") def compile(state: CircuitState, writer: Writer, customTransforms: Seq[Transform] = Seq.empty): CircuitState = { @@ -561,6 +564,10 @@ trait Compiler extends Transform with DependencyAPIMigration { * into the compilation process by [[CompilerUtils.mergeTransforms]] * @return result of compilation with emitted circuit annotated */ + @deprecated( + "Migrate to '(new FirrtlStage).execute(args: Array[String], annotations: AnnotationSeq)'." + + "This will be removed in 1.4.", + "FIRRTL 1.3.3") def compileAndEmit(state: CircuitState, customTransforms: Seq[Transform] = Seq.empty): CircuitState = { val emitAnno = EmitCircuitAnnotation(emitter.getClass) @@ -576,6 +583,10 @@ trait Compiler extends Transform with DependencyAPIMigration { * process by [[CompilerUtils.mergeTransforms]] * @return result of compilation */ + @deprecated( + "Migrate to '(new FirrtlStage).execute(args: Array[String], annotations: AnnotationSeq)'." + + "This will be removed in 1.4.", + "FIRRTL 1.3.3") def compile(state: CircuitState, customTransforms: Seq[Transform]): CircuitState = { val transformManager = new stage.transforms.Compiler ( targets = (emitter +: customTransforms ++: transforms).map(Dependency.fromTransform), -- cgit v1.2.3