aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2020-08-06 13:02:45 -0400
committerGitHub2020-08-06 17:02:45 +0000
commite44cb05e178be55d686326fc894e5ce22c8cb2d0 (patch)
tree3d6efce9f4913c78beb1944125006db1dced9c12 /src
parentf41ac7dab62d234ad807be2b86d64f7bdd441597 (diff)
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 <schuyler.eldridge@ibm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/Compiler.scala13
1 files changed, 12 insertions, 1 deletions
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),