Skip to content

Recursion bug? #80

Open
Open

Description

@thehydroimpulse

It appears like there's a recursion bug in the builder.

Let's say you have the following modules:

app (current directory)
module2
moduleExample
...

the app component would require (as a dependency - local, that is) module2 and module2 would require moduleExample. moduleExample would then require the app component. This creates a RangeError: Maximum call stack size exceeded error which unfriendly.

I guess this would be a circular dependency. A solution (runtime isn't the issue, I have that sorted out, it's just compilation that needs to work) would be to skip an already processed component. So when app is processed the second time you can skip it.

Thoughts? (I can submit a PR if you'd like)

Activity

  1. rschmukler commented on May 3, 2013

    @rschmukler

    +1 I ran into this today as well. Also with local components.

    @thehydroimpulse did you find any solution?

  2. thehydroimpulse commented on May 4, 2013

    @thehydroimpulse
    Author

    @rschmukler I implemented the fix in my fork but instead looked at my design and reworked it to remove the circular dependency.

  3. rschmukler commented on May 4, 2013

    @rschmukler

    @visionmedia Any stance on whether components shouldn't be referencing each other in a circular structure, or is this not behaving as intended?

  4. tj commented on May 6, 2013

    @tj
    Contributor

    hmm, that's usually a little weird, I cant say I've had the need for that in our ~400 components or so but it probably shouldn't break either

  5. Jody-Geers commented on Nov 26, 2013

    @Jody-Geers

    I've just come across this, going down @thehydroimpulse route and going to rework code, so all's cool, but in an effort to be helpful, i made a little crude mock example:

    https://github.com/Jody-Geers/testing-builder-issue-80-131125

  6. matthewmueller commented on Nov 30, 2013

    @matthewmueller

    Just ran into this too haha... still need to diagnose.

    edit: haha, fail. required the component itself in the component.json because of component install.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions