-
Hi Tal: I created a very simple CSAR file. I can't attach the zip file here. So here is the content: TOSCA-Metadata/TOSCA.meta
Definitions/main.yaml tosca_definitions_version: tosca_simple_yaml_1_2
description: Find the puccini infinite loop
node_types:
jpc.dummynode:
derived_from: tosca.nodes.Root
properties:
dummyprop:
type: string
topology_template:
substitution_mappings:
node_type: jpc.dummynode
node_templates:
topnode:
type: jpc.dummynode
properties:
dummyprop: dummy
// in puccini-tosca/commands/parse.go, inside "var parseCommand"
if (filter == "") && (len(dumpPhases) == 0) {
logJPC.Debug("JPC before Print")
formatpkg.Print(s, format, terminal.Stdout, strict, pretty) // NEVER RETURNS!!!
logJPC.Debug("JPC after Print")
} Adding I see that formatpkg is defined in imports as EDIT: I think that the problem is caused by puccini creating a circula reference that then is followed ad infinitum by formatpkg. if (filter == "") && (len(dumpPhases) == 0) {
logJPC.Debug("JPC before Print")
//formatpkg.Print(s, format, terminal.Stdout, strict, pretty)
fmt.Println(s)
fmt.Println(s.Substitution)
fmt.Println(s.Substitution.ServiceTemplate)
logJPC.Debug("JPC after Print")
} and the output is:
The first and third lines are identical. The servicetemplate points to a substitution that points back to the same servicetemplate --> circular reference. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thanks! This is definitely a bug and deserving of an "issue". As for debugging other libraries, here's how you do it:
|
Beta Was this translation helpful? Give feedback.
Thanks! This is definitely a bug and deserving of an "issue".
As for debugging other libraries, here's how you do it: