Skip to content

Stack level too deep #335

@mrtj

Description

@mrtj

I am working with a schema that has recursive references (eg. comments on comments) and the document generator fails with the following error:

/Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/schema.rb:103:in `merge': stack level too deep (SystemStackError)
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/schema.rb:103:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/schema.rb:103:in `inject'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/schema.rb:103:in `dereference'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/templates/schemata/helper.erb:86:in `block in extract_schemata_refs'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/templates/schemata/helper.erb:84:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/templates/schemata/helper.erb:84:in `extract_schemata_refs'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/templates/schemata/helper.erb:88:in `block in extract_schemata_refs'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/templates/schemata/helper.erb:84:in `each'
	 ... 9814 levels...
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/lib/prmd/cli.rb:95:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/prmd-0.13.0/bin/prmd:6:in `<top (required)>'
	from /usr/local/bin/prmd:22:in `load'
	from /usr/local/bin/prmd:22:in `<main>'

Is there any support planned for recursive schemas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions