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

Fix dev setup for React Native #1301

Closed
shilman opened this issue Jun 17, 2017 · 9 comments
Closed

Fix dev setup for React Native #1301

shilman opened this issue Jun 17, 2017 · 9 comments
Labels
maintenance User-facing maintenance tasks react-native

Comments

@shilman
Copy link
Member

shilman commented Jun 17, 2017

why

Our dev setup for React Native is messed up right now:

  1. Facebook's react-native packager doesn't currently work with link-style dependencies.
  2. As a workaround, we are using file: dependencies for RN examples, which copies the directory instead of linking to it. However:
    1. file: links are no longer handled in the same way in npm5, which creates links instead and is deprecating this type of dependency
    2. It is also inconsistent with lerna bootstrap, which we are using the manage deps for the rest of our projects, which creates links.

what

It would be cleaner/simpler to use lerna bootstrap across the board. One option is to use the haul packager, support for which has been introduced in: #1294

NOTE: I have prototyped this on my local machine and verified that it works with lerna bootstrap

Another option is to revert to npm@4 and keep our current setup, but this doesn't solve the lerna bootstrap inconsistency.

@shilman shilman added react-native maintenance User-facing maintenance tasks labels Jun 17, 2017
@shilman
Copy link
Member Author

shilman commented Jun 17, 2017

Thoughts @tmeasday @ndelangen @orta @Gongreg @ajwhite @slorber @ericwooley ? Did I get this all right?

@orta
Copy link
Member

orta commented Jun 17, 2017

From a long term perspective, I think yarn workspaces are eventually what you're after - but that's not fully baked yet, so using haul seems like a reasonable answer for right now

@ericwooley
Copy link
Contributor

This is an issue worth tracking if your hitting these pain points facebook/metro#1 (comment)

@tmeasday
Copy link
Member

This issue is also covered by #1286 -- symlinks are similarly a problem for Jest. Still, a solution for RN is great!

@shilman
Copy link
Member Author

shilman commented Jun 21, 2017

@tmeasday To clarify, are you saying that even if we fix the RN issue, we are still going to have problems with Jest?

@tmeasday
Copy link
Member

@shilman: correct

@ericwooley
Copy link
Contributor

Yea, it's a huge problem. It has to do with node haste. See the issue linked above.

Hopefully with yarn workspaces, facebook will have some incentive to fix the issue. It's not easy to solve

@tmeasday
Copy link
Member

Interesting workaround we could consider: facebook/metro#1 (comment)

@danielduan
Copy link
Member

This feels like it's been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks react-native
Projects
None yet
Development

No branches or pull requests

5 participants