diff options
| author | Jack Koenig | 2020-08-12 21:17:14 -0700 |
|---|---|---|
| committer | GitHub | 2020-08-13 04:17:14 +0000 |
| commit | 39f510a9081d09d94d56eb89ceb97a678993fda1 (patch) | |
| tree | 02dcadb37c768d5763f6eae87b84b5aeeead6df1 /src/main/scala/firrtl/Driver.scala | |
| parent | e1d3a0c64a48b4c9999ad59f15922db7c155c361 (diff) | |
Remove LegacyAnnotation and [most] MoultingYaml (#1833)
* Remove LegacyAnnotation and MoultingYaml
It has been deprecated since 1.1
* Remove all uses of ConvertLegacyAnnotations
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/scala/firrtl/Driver.scala')
| -rw-r--r-- | src/main/scala/firrtl/Driver.scala | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/main/scala/firrtl/Driver.scala b/src/main/scala/firrtl/Driver.scala index c6842f52..2050b235 100644 --- a/src/main/scala/firrtl/Driver.scala +++ b/src/main/scala/firrtl/Driver.scala @@ -5,9 +5,7 @@ package firrtl import scala.collection._ import scala.util.{Failure, Try} import java.io.{File, FileNotFoundException} -import net.jcazevedo.moultingyaml._ import annotations._ -import firrtl.annotations.AnnotationYamlProtocol._ import firrtl.transforms._ import firrtl.Utils.throwInternalError import firrtl.stage.{FirrtlExecutionResultView, FirrtlStage} @@ -93,33 +91,20 @@ object Driver { // Warnings to get people to change to drop old API if (firrtlConfig.annotationFileNameOverride.nonEmpty) { - val msg = "annotationFileNameOverride is deprecated! " + + val msg = "annotationFileNameOverride has been removed, file will be ignored! " + "Use annotationFileNames" - dramaticWarning(msg) + dramaticError(msg) } else if (usingImplicitAnnoFile) { - val msg = "Implicit .anno file from top-name is deprecated!\n" + + val msg = "Implicit .anno file from top-name has been removed, file will be ignored!\n" + (" "*9) + "Use explicit -faf option or annotationFileNames" - Driver.dramaticWarning(msg) + dramaticError(msg) } val loadedAnnos = annoFiles.flatMap { file => if (!file.exists) { throw new AnnotationFileNotFoundException(file) } - // Try new protocol first - JsonProtocol.deserializeTry(file).recoverWith { case jsonException => - // Try old protocol if new one fails - Try { - val yaml = FileUtils.getText(file).parseYaml - val result = yaml.convertTo[List[LegacyAnnotation]] - val msg = s"$file is a YAML file!\n" + - (" "*9) + "YAML Annotation files are deprecated! Use JSON" - Driver.dramaticWarning(msg) - result - }.orElse { // Propagate original JsonProtocol exception if YAML also fails - Failure(jsonException) - } - }.get + JsonProtocol.deserialize(file) } val targetDirAnno = List(BlackBoxTargetDirAnno(optionsManager.targetDirName)) @@ -131,9 +116,7 @@ object Driver { (if (firrtlConfig.dontCheckCombLoops) Seq(DontCheckCombLoopsAnnotation) else Seq()) ++ (if (firrtlConfig.noDCE) Seq(NoDCEAnnotation) else Seq()) - val annos = targetDirAnno ++ outputAnnos ++ globalAnnos ++ - firrtlConfig.annotations ++ loadedAnnos - LegacyAnnotation.convertLegacyAnnos(annos) + targetDirAnno ++ outputAnnos ++ globalAnnos ++ firrtlConfig.annotations ++ loadedAnnos } private sealed trait FileExtension |
