From 67ca82a1a86c6a08b56865c0edbcb7c700092f82 Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Fri, 5 Jan 2018 10:49:46 -0800 Subject: Fix FirrtlExecutionOptions backward incompatible change (#704). (#720) Fix FirrtlExecutionOptions backward incompatible change (#704). New options should be added to the end of the list to reduce backward compatibility problems. Update comment to mention backwards compatibility issue. --- src/main/scala/firrtl/ExecutionOptionsManager.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/scala/firrtl/ExecutionOptionsManager.scala b/src/main/scala/firrtl/ExecutionOptionsManager.scala index e5bd95ef..de5c9898 100644 --- a/src/main/scala/firrtl/ExecutionOptionsManager.scala +++ b/src/main/scala/firrtl/ExecutionOptionsManager.scala @@ -13,7 +13,9 @@ import scala.collection.Seq /** * Use this trait to define an options class that can add its private command line options to a externally - * declared parser + * declared parser. + * '''NOTE''' In all derived trait/classes, if you intend on maintaining backwards compatibility, + * be sure to add new options at the end of the current ones and don't remove any existing ones. */ trait ComposableOptions @@ -177,13 +179,13 @@ case class FirrtlExecutionOptions( firrtlSource: Option[String] = None, customTransforms: Seq[Transform] = List.empty, annotations: List[Annotation] = List.empty, - annotationFileNames: List[String] = List.empty, annotationFileNameOverride: String = "", outputAnnotationFileName: String = "", emitOneFilePerModule: Boolean = false, dontCheckCombLoops: Boolean = false, - noDCE: Boolean = false) - extends ComposableOptions { + noDCE: Boolean = false, + annotationFileNames: List[String] = List.empty) +extends ComposableOptions { require(!(emitOneFilePerModule && outputFileNameOverride.nonEmpty), "Cannot both specify the output filename and emit one file per module!!!") -- cgit v1.2.3