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

Switched to npm hosted boost lib #11469

Closed
wants to merge 2 commits into from

Conversation

bestander
Copy link
Contributor

@bestander bestander commented Dec 14, 2016

Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.

Other alternatives considered:

  • CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
  • File sharing like DropBox are not for mass anonymous downloads
  • Github is not good for binary files and is throttled for anonymous raw file downloads
  • S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has

In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.

Test plan (required)

  • Circle (testing with caches cleaned)
  • ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
  • REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @rigdern and @javache to be potential reviewers.

@bestander
Copy link
Contributor Author

cc @mkonicek

@bestander
Copy link
Contributor Author

Restarted build with no caches: https://circleci.com/gh/facebook/react-native/14122

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 14, 2016
@bestander
Copy link
Contributor Author

The npm package is temporary, don't merge yet.

@hey99xx
Copy link

hey99xx commented Dec 15, 2016

Github is not good for binary files and is throttled for anonymous raw file downloads

How is this different that rest of the dependencies such as glog or folly? As far as I see they're also hosted in Github and there's no throttling happening when we download their zip files.

Is this a problem only because Boost has a larger size than the others? I think if that's possible (uploading either the zip file or the source code to Github), it would be more consistent with the rest of the gradle script.

Also is there a documentation about throttling? This page https://help.github.com/articles/distributing-large-binaries/ reads it's a valid use case.

@ide
Copy link
Contributor

ide commented Dec 15, 2016

What if we kept just the source code (the entire boost subdirectory) plus license, tar.gz'd it back up, and then just committed that tarball to this repo and added it to .npmignore? I did a quick experiment, with gzip -9 the tarball is about 9.7MB, it's literally over 10x smaller. Also I find it decompresses faster.

boost_1_57_0-lite.tar.gz

@bestander
Copy link
Contributor Author

@ide, it would be better from licensing points of view if it is not committed to RN GitHub repo.
Would you be able to push an npm package with your boost?

@ide
Copy link
Contributor

ide commented Dec 15, 2016

@bestander I put the files up on GitHub, this way other people can maintain it too: https://github.com/react-native-community/boost-for-react-native/releases/tag/v1.57.0-0. There's both a .tar.gz (9.6MB) and .zip file (12MB).

@hey99xx
Copy link

hey99xx commented Dec 16, 2016

@ide Thanks for taking the initiative. However @bestander has a point about licensing. IANAL but Boost's license at http://www.boost.org/users/license.html reads to be very permissive, so we're likely to be ok.

fcp.exclude()
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this extra code rather than only replacing the URL?

@mkonicek
Copy link
Contributor

Thanks for doing this @bestander, thank you for the help @ide!

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 16, 2016
@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this pull request Dec 19, 2016


Summary:
Improvement over #11469.
Depends on react-native-community/boost-for-react-native#1, **don't merge before it is fixed**.

It would be more in line with other dependencies  to depend only on github for thirdparty bridge dependencies.

**Test plan (required)**

- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes #11511

Differential Revision: D4348098

fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
ide pushed a commit that referenced this pull request Dec 29, 2016
Summary:
Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.

Other alternatives considered:
- CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
- File sharing like DropBox are not for mass anonymous downloads
- Github is not good for binary files and is throttled for anonymous raw file downloads
- S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has

In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.

**Test plan (required)**

- Circle (testing with caches cleaned)
- `./gradlew ReactAndroid:packageReactNdkLibsForBuck` (check twice to make sure caches work)
- `REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./
Closes #11469

Differential Revision: D4339446

Pulled By: mkonicek

fbshipit-source-id: ccc9196e9b675c16a235a318c4861aaa4e263d6e
ide pushed a commit that referenced this pull request Dec 29, 2016


Summary:
Improvement over #11469.
Depends on react-native-community/boost-for-react-native#1, **don't merge before it is fixed**.

It would be more in line with other dependencies  to depend only on github for thirdparty bridge dependencies.

**Test plan (required)**

- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes #11511

Differential Revision: D4348098

fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017
Summary:
Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.

Other alternatives considered:
- CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
- File sharing like DropBox are not for mass anonymous downloads
- Github is not good for binary files and is throttled for anonymous raw file downloads
- S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has

In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.

**Test plan (required)**

- Circle (testing with caches cleaned)
- `./gradlew ReactAndroid:packageReactNdkLibsForBuck` (check twice to make sure caches work)
- `REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./
Closes facebook#11469

Differential Revision: D4339446

Pulled By: mkonicek

fbshipit-source-id: ccc9196e9b675c16a235a318c4861aaa4e263d6e
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017


Summary:
Improvement over facebook#11469.
Depends on react-native-community/boost-for-react-native#1, **don't merge before it is fixed**.

It would be more in line with other dependencies  to depend only on github for thirdparty bridge dependencies.

**Test plan (required)**

- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes facebook#11511

Differential Revision: D4348098

fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
berrytj pushed a commit to mdcollab/react-native that referenced this pull request Jan 23, 2017


Summary:
Improvement over facebook#11469.
Depends on react-native-community/boost-for-react-native#1, **don't merge before it is fixed**.

It would be more in line with other dependencies  to depend only on github for thirdparty bridge dependencies.

**Test plan (required)**

- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes facebook#11511

Differential Revision: D4348098

fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
bnns pushed a commit to bloomfire/react-native that referenced this pull request Feb 7, 2017
since the old boost location was giving ssl errors, facebook has moved it to
ashared repo. for more info, see:
facebook#11469
LoopIndigo pushed a commit to loophq/react-native that referenced this pull request Jun 16, 2017
Summary:
Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.

Other alternatives considered:
- CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
- File sharing like DropBox are not for mass anonymous downloads
- Github is not good for binary files and is throttled for anonymous raw file downloads
- S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has

In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.

**Test plan (required)**

- Circle (testing with caches cleaned)
- `./gradlew ReactAndroid:packageReactNdkLibsForBuck` (check twice to make sure caches work)
- `REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./
Closes facebook#11469

Differential Revision: D4339446

Pulled By: mkonicek

fbshipit-source-id: ccc9196e9b675c16a235a318c4861aaa4e263d6e
LoopIndigo pushed a commit to loophq/react-native that referenced this pull request Jun 16, 2017


Summary:
Improvement over facebook#11469.
Depends on react-native-community/boost-for-react-native#1, **don't merge before it is fixed**.

It would be more in line with other dependencies  to depend only on github for thirdparty bridge dependencies.

**Test plan (required)**

- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes facebook#11511

Differential Revision: D4348098

fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
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.

5 participants