Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jslegers opened this issue Nov 23, 2017 · 0 comments

Comments

@jslegers
Copy link

jslegers commented Nov 23, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant