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

Recursion bug? #80

Open
thehydroimpulse opened this issue Apr 16, 2013 · 6 comments
Open

Recursion bug? #80

thehydroimpulse opened this issue Apr 16, 2013 · 6 comments
Labels

Comments

@thehydroimpulse
Copy link

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)

@rschmukler
Copy link

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

@thehydroimpulse did you find any solution?

@thehydroimpulse
Copy link
Author

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

@rschmukler
Copy link

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

@tj
Copy link
Contributor

tj commented May 6, 2013

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

@Jody-Geers
Copy link

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

@matthewmueller
Copy link

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
Labels
Projects
None yet
Development

No branches or pull requests

5 participants