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

Removing test-driver symlink in ios third party install script #14638

Closed

Conversation

ArturKlajnerok
Copy link
Contributor

@ArturKlajnerok ArturKlajnerok commented Jun 20, 2017

Motivation (required)

After execution of scripts/ios-install-third-party.sh a symlink is created :
<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver
that is pointing to test-driver -> /usr/share/automake-1.14/test-driver
This can be executed indirectly by react-native run-ios.

This breaks the bundle process if the system don't contain a given file under the link and having this strict dependency on the system setup is not a good practice.

Once the test-driver symlink is created android app release is failing, for :
./gradlew assembleRelease
the :app:bundleReleaseJsAndAssets returns :

FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.

Related issues:
#14417
#14464
#14548

Test Plan (required)

  1. Create new project with react-native init <YOUR-APP>
  2. cd <YOUR-APP>/
  3. Run app on iOS react-native run-ios so scripts/ios-install-third-party.sh is executed.
  4. cd android/
  5. Run android app release ./gradlew assembleRelease (it will work properly after this fix and fail if the test-driver symlink exists)

Summary

IMHO we should resolve the issue with this quick fix and apply the proper fix later after the new version of google/glog will be released.
The proper cleanup of files generated by autotools was already applied : google/glog#188

Please let me know if I should provide more details : @javache, @mhorowitz, @hramos

When ios-install-third-party script installs google glog library it creates a symlinks that breaks production release bundeling
@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jun 20, 2017
@javache
Copy link
Member

javache commented Jun 20, 2017

Can you do this as part of ios-configure-glog.sh?

When ios-install-third-party script installs google glog library it creates a symlinks that breaks production release bundeling
@ArturKlajnerok
Copy link
Contributor Author

@javache done in : 75651f7

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Jun 21, 2017
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ArturKlajnerok ArturKlajnerok deleted the test-driver-symlink-fix branch June 22, 2017 12:05
grabbou pushed a commit that referenced this pull request Jul 17, 2017
Summary:
After execution of `scripts/ios-install-third-party.sh` a symlink is created :
`<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver`
that is pointing to `test-driver -> /usr/share/automake-1.14/test-driver`
This can be executed indirectly by `react-native run-ios`.

This breaks the bundle process if the system don't contain a given file under the link and having this strict dependency on the system setup is not a good practice.

Once the `test-driver` symlink is created android app release is failing, for :
`./gradlew assembleRelease`
the `:app:bundleReleaseJsAndAssets` returns :
```
FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
```
Related issues:
#14417
#14464
#14548

1. Create new project with `react-native init <YOUR-APP>`
2. cd `<YOUR-APP>/`
3. Run app on iOS `react-native run-ios` so `scripts/ios-install-third-party.sh` is executed.
4. cd `android/`
5. Run android app release `./gradlew assembleRelease` (it will work properly after this fix and fail if the `test-driver` symlink exists)

IMHO we should resolve the issue with this quick fix and apply the proper fix later after the new version of `google/glog` will be released.
The proper cleanup of files generated by autotools was already applied : google/glog#188

Please let me know if I should provide more details : javache, mhorowitz, hramos
Closes #14638

Differential Revision: D5292362

Pulled By: javache

fbshipit-source-id: 81ff2273420ea078d624a76e781a5b67b96e6a4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants