Skip to content

Circular dependencies in Dojo cause stack overflow issue when trying to pack them with r.js #974

Open

Description

@jslegers

My project contains some legacy Dojo code under the hood. And unfortunately, some of these Dojo modules use circular dependencies.

To be more specific, dojo/dom-construct depends on dojo/dom-attr, which depends on dojo/dom-prop, which depends on dojo/dom-construct.

This causes a stack overflow when using r.js to pack it :

{ Error: RangeError: Maximum call stack size exceeded
In module tree:
    symbology/main
      luciad/symbology/SymbologyProvider
        luciad/symbology/JsonSymbologyParser
          luciad/symbology/MS2525Symbology
            luciad/symbology/HierarchicalSymbology
              luciad/symbology/DelegatingLabelCanvasUtil
                luciad/view/style/DelegatingLabelCanvas
                  luciad/view/style/HTML5LabelCanvas
                    luciad/view/style/DrawAsyncPointLabelHtmlContents
                      luciad/view/style/StyleUtil
                        luciad/view/style/SimpleStrokeStyle
                          luciad/view/style/HTML5DrawStrokeCommandMixin
                            luciad/view/style/HTML5CanvasUtil
                              luciad/dojo/dom-construct
                                luciad/dojo/dom-attr
                                  luciad/dojo/dom-prop
                                    luciad/dojo/dom-construct
                                      luciad/dojo/dom-attr
                                        luciad/dojo/dom-prop
                                          luciad/dojo/dom-construct
                                            luciad/dojo/dom-attr
                                              luciad/dojo/dom-prop
                                                luciad/dojo/dom-construct
                                                  luciad/dojo/dom-attr
                                                    luciad/dojo/dom-prop
                                                      luciad/dojo/dom-construct
                                                        luciad/dojo/dom-attr
                                                          luciad/dojo/dom-prop
                                                            luciad/dojo/dom-construct
                                                              luciad/dojo/dom-attr
                                                                  ...

How can I get around this without modifying the code of these Dojo modules?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions