You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/01/14 17:42:53 UTC

[GitHub] stevedlawrence commented on a change in pull request #164: Avoid CircularDefinition error for appinfo

stevedlawrence commented on a change in pull request #164: Avoid CircularDefinition error for appinfo
URL: https://github.com/apache/incubator-daffodil/pull/164#discussion_r247589175
 
 

 ##########
 File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/ModelGroup.scala
 ##########
 @@ -153,14 +153,7 @@ abstract class ModelGroup
   final override def isRequiredOrComputed = true
   final override def isArray = false
 
-  private def prettyIndex = LV('prettyIndex) {
-    myPeers.map { peers =>
-      {
-        if (peers.length == 1) "" // no index expression if we are the only one
-        else "[" + (peers.indexOf(this) + 1) + "]" // 1-based indexing in XML/XSD
-      }
-    }.getOrElse("")
-  }.value
+  private def prettyIndex = "[" + index + "]" // 1-based indexing in XML/XSD
 
 Review comment:
   Looks like this change caused some CLI tests to fail. I'd guess because we now always output "[X]" even if there are no peers. I think this change is fine since this is more a debug thing, so always outputting the index doesn't matter, but we should update the CLI tests so they all pass. To runt he CLI tests, you can run  ``sbt it:test``.

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


With regards,
Apache Git Services