stevedlawrence commented on a change in pull request #223: Daffodil 1444 schema 
comp simple types
URL: https://github.com/apache/incubator-daffodil/pull/223#discussion_r290262183
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/compiler/Compiler.scala
 ##########
 @@ -315,9 +313,8 @@ class Compiler(var validateDFDLSchemas: Boolean = true)
    */
   def compileSource(schemaSource: DaffodilSchemaSource): ProcessorFactory =
     Compiler.synchronized {
-      val noParent = null // null indicates this is the root, and has no parent
-      val sset = new SchemaSet(rootSpec, externalDFDLVariables, 
Seq(schemaSource), validateDFDLSchemas, checkAllTopLevel, noParent, tunablesObj)
-      val pf = new ProcessorFactory(sset)
+      lazy val sset: SchemaSet = new SchemaSet(Some(pf), rootSpec, 
externalDFDLVariables, Seq(schemaSource), validateDFDLSchemas, 
checkAllTopLevel, tunablesObj)
+      lazy val pf: ProcessorFactory = new ProcessorFactory(sset)
       val err = pf.isError
 
 Review comment:
   Ah, I don't think i've seen the mutual reference pattern before. Good to 
know about. Makes sense to me. A comment would definitely be useful.

----------------------------------------------------------------
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