You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/01/14 00:43:08 UTC

[GitHub] [daffodil] tuxji commented on a change in pull request #726: Fix C compilation errors due to name collisions

tuxji commented on a change in pull request #726:
URL: https://github.com/apache/daffodil/pull/726#discussion_r784429241



##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -1440,11 +1440,10 @@ object Main {
               tunables, generateOpts.language)
 
             // Ask the CodeGenerator to generate source code from the DFDL schema
-            val rootNS = generateOpts.rootNS.toOption
             val outputDir = generateOpts.outdir.toOption.getOrElse(".")
             val rc = generator match {
               case Some(generator) => {
-                Timer.getResult("generating", generator.generateCode(rootNS, outputDir))
+                Timer.getResult("generating", generator.generateCode(outputDir))

Review comment:
       > Is this just decluttering, or is there a different way to deal with namespaces here? Eventually we'll want to support them.
   
   I'm just decluttering the generateCode calls because it turns out that the root element's QName is already passed to the generator via the processor factory & schema compiler, so we were passing the rootNS redundantly.  We still use rootNS to pick the correct root element for 1) schema compilation to build the grammar objects, and 2) code generation from those grammar objects. 




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

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org