This doesn't "fix" Bug 6236, but works around it - and gives us a low
hanging fruit build performance improvement.
If this change gets accepted, I would make the odlparent -Pq profile set
this to true by default.
In parallel, I'm trying to get a root cause fix in a future Xtend
version. (At which point this could be removed again.)
Change-Id: I108f401fa2fbca6f17a8b23cb098910c5a6021fb
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit
535737b1a8c91de648c5215d6430df693dba52bc)
class YangTemplate {
+ private static val String SKIP_PROPERTY_NAME = "mdsal.skip.verbose"
+
+ private static val SKIP = Boolean.getBoolean(SKIP_PROPERTY_NAME);
+
def static String generateYangSnipet(SchemaNode schemaNode) {
if (schemaNode == null)
return ''
-
+ if (SKIP)
+ return '''(Empty due to «SKIP_PROPERTY_NAME» property = true)'''
'''
«IF schemaNode instanceof DataSchemaNode»
«writeDataSchemaNode(schemaNode)»
def static String generateYangSnipet(Set<? extends SchemaNode> nodes) {
if (nodes.nullOrEmpty)
return ''
-
+ if (SKIP)
+ return '''(Empty due to «SKIP_PROPERTY_NAME» property = true)'''
'''
«FOR node : nodes»
«IF node instanceof NotificationDefinition»
}
def static String generateYangSnipet(Module module) {
-
+ if (SKIP)
+ return '''(Empty due to «SKIP_PROPERTY_NAME» property = true)'''
'''
module «module.name» {
yang-version «module.yangVersion»;