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

Add docs for how to easily test & use react native forks #653

Closed
kelset opened this issue Oct 31, 2018 · 22 comments
Closed

Add docs for how to easily test & use react native forks #653

kelset opened this issue Oct 31, 2018 · 22 comments
Labels
👻 Missing Docs Documentation is missing Stale Issues/PR that are not getting much activity and are closer to be closed

Comments

@kelset
Copy link
Contributor

kelset commented Oct 31, 2018

More clear guidelines on how to do this will allow the community to make patch or share feature easily.

Related issue:
#21776
#21967


Original issue: facebook/react-native#22030 by @gengjiawen.

@bartolkaruza
Copy link
Contributor

bartolkaruza commented Nov 9, 2018

Relevant issues from rn repo for context:
facebook/react-native#22118
facebook/react-native#19358

@bartolkaruza
Copy link
Contributor

In addition to documentation, would it help if this was a script that handles setting up a fork? This script could make sure you are not on the facebook/react-native repo, check the common error of wrong Android NDK version, remove the relevant line from .gitignore and run the ./gradlew :installArchives step.

@kelset
Copy link
Contributor Author

kelset commented Nov 9, 2018

Sounds like a good second step, but I think that we should start with the docs first 😄

Btw what's this step about?

run the ./gradlew :installArchives step

I don't think I've ever run it 😅

@bartolkaruza
Copy link
Contributor

bartolkaruza commented Nov 9, 2018

It's the gradle task that builds the Android .aar/.jar binaries. They are not committed in the source repo, only built on publishing to NPM. As far as I know, it's the only part of RN that makes this forking business a bit complicated, because all other dependencies are just there in the main repo as source files.

@kelset
Copy link
Contributor Author

kelset commented Nov 9, 2018

Understood - @grabbou once the PR is up would you mind doublechecking it? I feel you have way more experience than me in this 😅

@grabbou
Copy link
Contributor

grabbou commented Nov 9, 2018

Sure, would love to take a look. In fact, at Callstack, we are constantly setting up various React Native forks for internal purposes and this process is usually taking more than we would like it to take. Happy to look into any improvements.

@bartolkaruza
Copy link
Contributor

I can write the first draft tomorrow if no-one else has anything written up yet? I want to take the time to run through the process end-to-end on a current version. It has been a few RN releases since I've had to set up a fork.

@gengjiawen
Copy link
Contributor

Also for non android dev and ci users, we can use docker to demonstrate how to do the android release.
see react-native-community/discussions-and-proposals#36.

@bartolkaruza
Copy link
Contributor

I've noticed gradle 4.4 hanging on the installArchives task, in the configuration phase. This symptom can be resolved by using the --no-daemon flag, but I think there is something wrong in the gradle plugins that is causing this in the first place.

@gengjiawen
Copy link
Contributor

gengjiawen commented Nov 11, 2018

Building aar using docker

docker run --rm --name rn-build -v $PWD:/pwd -w /pwd gengjiawen/react-native /bin/sh -c "./gradlew installArchives"

Then remove /android/ in .gitignore.
push it to github or npm.

@gengjiawen
Copy link
Contributor

@bartolkaruza Maybe network issue, I have not run into this issue using docker.

@bartolkaruza
Copy link
Contributor

bartolkaruza commented Nov 11, 2018

It could be an OS difference as well, isn't docker running a Linux base image? I was building on OSX. @gengjiawen would you like to add the docker approach to #675 ?

@kelset
Copy link
Contributor Author

kelset commented Nov 12, 2018

BTW, check also this section https://facebook.github.io/react-native/docs/building-from-source as I feel there may be some overlap.

@bartolkaruza
Copy link
Contributor

@kelset that is where I've added the fork information, as you need all the steps in that page in addition to the steps to publish the fork on a git branch. It may not be the place where someone would look for this information, though 'building from source' doesn't suggest 'set up a fork'. Can you think of another place where it would make sense to put this information?

@gengjiawen
Copy link
Contributor

Maybe deserve a single page.

bartolkaruza pushed a commit to bartolkaruza/react-native-website that referenced this issue Nov 26, 2018
@bartolkaruza
Copy link
Contributor

@gengjiawen I've moved it to a separate page and added you as contributor to my fork of the website, feel free to add your addition/modification. I've split the page into two sections; building/publishing. Building suggests building from source or using your docker image, recommending the latter.

@gengjiawen
Copy link
Contributor

@bartolkaruza Just create the pr, I will review it.

@bartolkaruza
Copy link
Contributor

@bartolkaruza Just create the pr, I will review it.

#675

cpojer pushed a commit that referenced this issue Feb 7, 2019
* Add section for how to make a git dependency branch (#653)

* move publishing a fork to separate page (#653)

* updated review comments

* link back from building android sources and updated docker link

* changed to —force instead of changing .gitignore

* Update publishing.md
sunnylqm referenced this issue in reactnativecn/react-native-website Feb 8, 2019
* [android] document required Network Security Config for React Native packager (#772)

* add documentation for applying Network Security Config cleartext policy exceptions for RN packager IPs

* add documentation for applying Network Security Config cleartext policy exceptions for RN packager IPs

* Update navigation.md (#770)

Use createAppContainer instead of createAppNavigator 
see function declaration here https://github.com/react-navigation/react-navigation/blob/master/src/react-navigation.js#L5

* Update README.md

Fixed a few spelling errors in README.md

* Deprecating NavigatorIOS (#776)

* Deprecating NavigatorIOS

* Remove navigator ios

* Remove TabBarIOS, TabBarIOS.Item, NavigatorIOS from docs

* Make Hello World prettier (#760)

Fix #743

* Remove outdated Stetho documentation.

* Fix Fresco docs link on the Image Style Props page (#783)

* Remove CLI docs (#782)

* Update scrollview.md to reflect duration argument (#115)

* Update scrollview.md to reflect duration argument

facebook/react-native#17422 adds the ability to control the duration of a scrollView animation, for Android only.

* sync comments with ScrollView.js

* add documentation about `.native.js` extensions (#346)

* add documentation about `.native.js` extensions

Lots of projects use the `.native.js` to share code between ReactJS and React Native (including core projects, like Jest) but there's no official documentation about it. I'm adding some info so projects can easily discover and refer to this feature.

* fix comments and add pro-tip about `.native.js`

Fixed the comment on a code block and added a pro-tip telling users to ignore `.native.js` extensions in their web bundlers in order to optimize final bundle size.

* Update platform-specific-code.md

* Link to all KeyboardType screenshots (#774)

* Node version requirement made more prevalent (#775)

Reading the first page of https://facebook.github.io/react-native/docs/getting-started.html, it is not clear that the node version needs to be 8+. Just adding this here to help others with installation, specially those of us who already have node running and need to upgrade.

* Explicitly state that `activeOpacity` requires `underlayColor` (#781)

* Explicitly state that `activeOpacity` requires `underlayColor`

It's clear from facebook/react-native#11834 that the underlying issue won't be fixed, so we should update the documentation so people understand that for `activeOpacity` to work, they need to set `underlayColor`.

* Update touchablehighlight.md

* Add section : Known Issues with fetch and [..] (#769)

* Add section : Known Issues with fetch and [..]

Cookie based authentication is currently wobbly. Had it not been for the problematic redirect scenario using fetch workarounds could be found (e.g clearing cookies before every single request and manually adding them to the headers). However, because of the 302 issue there is a scenario where using cookies can result in halt of development.

The rest of the issues are merely added here so that people that can follow workarounds ( please take a look as unintended consequences might occur )

* Minor text changes and remove the last paragraph.

* Document how to publish custom React Native version (#675)

* Add section for how to make a git dependency branch (#653)

* move publishing a fork to separate page (#653)

* updated review comments

* link back from building android sources and updated docker link

* changed to —force instead of changing .gitignore

* Update publishing.md

* Update correct signing information for iOS (#766)

Ran into this problem while following this guide verbatim.

* Update Wix link and title in showcast.json (#763)

* change showcast wix logo app

* fix file name

* Update Wix link and title in showcast

* Change wording to improve sentence (#759)

* Text/TextInput: Android now supports `maxFontSizeMultiplier` prop (#755)

Introduced by this commit: facebook/react-native@4936d28

* Fix typo (#738)

* Fix typo

* Update linking-libraries-ios.md

* update to rn-diff-purge (#761)

* Prettify

* Sync guides
@charpeni charpeni added the 👻 Missing Docs Documentation is missing label Feb 11, 2019
@joshglenn
Copy link

It would definitely be nice to have some documentation on how to build react native from source. The docs only tell how to build the android side of things.

What about iOS? Any special build steps?

How is the project structured?

My biggest hurdle right now with this topic:

I want to know how to use my own fork of the react-native npm package as a dependency in my own react-native project. Then, after getting to know it and understanding it, maybe I'll be able to contribute.

So, I try it using yarn add file:../path/to/my/react-native/fork. When I do this and then run yarn start and yarn ios, I get all kinds of errors. Then, I install the same version of react native again from npm, and everything works fine.

I am not writing this to make a separate issue out of my immediate problem-at-hand. But the problem I am facing at the moment underscores the need for docs to help potential contributors. (I have spent 5 hours or more on this and have came up empty so far)

Specifically:

  • help us get to know the structure of the react-native project
  • the specific steps to take in order to build for iOS
  • the specific steps needed to fork the react-native repo, use it in our own project, make a change to it, and see the result.

@stale
Copy link

stale bot commented Aug 16, 2020

👋 Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Issues/PR that are not getting much activity and are closer to be closed label Aug 16, 2020
@kelset kelset removed the Stale Issues/PR that are not getting much activity and are closer to be closed label Aug 17, 2020
@github-actions
Copy link

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues/PR that are not getting much activity and are closer to be closed label Jan 19, 2022
@github-actions
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 Missing Docs Documentation is missing Stale Issues/PR that are not getting much activity and are closer to be closed
Projects
None yet
Development

No branches or pull requests

6 participants