mbeckerle commented on a change in pull request #343: WIP: Daf 2302 ext var
URL: https://github.com/apache/incubator-daffodil/pull/343#discussion_r400537766
 
 

 ##########
 File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
 ##########
 @@ -686,17 +687,14 @@ object Main extends Logging {
   }
 
   def createProcessorFromSchema(schema: URI, rootNS: Option[RefQName], path: 
Option[String],
-    extVars: Seq[Binding],
     tunables: Map[String, String],
     mode: ValidationMode.Type) = {
-    val compiler = Compiler()
-
-    compiler.setExternalDFDLVariables(extVars)
-    compiler.setTunables(tunables)
-
-    rootNS match {
-      case None => // nothing
-      case Some(RefQName(_, root, ns)) => 
compiler.setDistinguishedRootNode(root, ns.toStringOrNullIfNoNS)
+    val compiler = {
+      val c = Compiler().withTunables(tunables)
+      rootNS match {
+        case None => c
+        case Some(RefQName(_, root, ns)) => c.withDistinguishedRootNode(root, 
ns.toStringOrNullIfNoNS)
 
 Review comment:
   Here is the rock/hard-place I ended up.
   
   If we need to still support the deprecated functionality, then we need the 
"withDistinguishedRootNode" method in order to still have a non-deprecated way 
to implement the deprecated behavior.
   
   Until there is a way to silence deprecation warnings that are created from 
inside other deprecated things, there's no good way to do this other than 
introduce another "interim" API, albeit one that works more functionally. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to