-
Notifications
You must be signed in to change notification settings - Fork 457
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
Removed all cyclic dependencies. #55
Conversation
Probably don't rebuild the Otherwise LGTM 👍 |
Hm... Doesn't LGTM. I use cyclic dependencies in all my project, as the way to deliver features to different parts of its internals. What about posting an issue at React Native instead? Fixing recursive requires is very simple. |
@indutny on the plus side, you get a |
@dcousens all modules are used :) And we have tests for obvious errors. |
@indutny true, but, assuming there are no other reasons not too, there is no downside to merging this PR? |
@dcousens the downside is that it sort of code style for me:
It is a matter of principle for me :) Especially, considering that the root of the issue is not in this project anyway. |
@originalgremlin nevertheless, I appreciate your contribution! It just does seem to me that we are trying to fix the problem at the wrong place. |
@indutny fair enough 👻 |
@indutny Yes, I agree that the react-native packager is far from complete and should deal with cyclic dependencies with more grace than a full lockup. I don't really expect you to change all your codebases, considering that this is your preferred style. To get my current code working the easiest and most direct way was to modify these few libraries rather than dig into the bowels of the packager. I personally find cyclic dependencies to be a bit confusing to work with and prone to error. They're certainly not in fashion in the wider community. But for now I'll point my dependencies to my forks and start pestering the react-native folks. Cheers. |
Agreed, I personally don't find it easy to reason about their exact semantics, especially not at face value since it depends a lot on how Javascript works internally. |
Closing, sorry! |
Hi. In my attempts to include this code in a React Native project I discovered a number of cyclic dependencies that prevented their default packager from completing. With the liberal rewriting of a few requires all the cycles have been eliminated (according to pahen/madge).
These changes are all superficial. All tests continue to pass.