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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix downloading prebuilt hermes from the Github release #33935

Closed

Conversation

fortmarek
Copy link
Contributor

Summary

This:

source[:http] = `https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz`

currently fails with the following error:

[!] Failed to load 'hermes-engine' podspec: 
[!] Invalid `hermes-engine.podspec` file: No such file or directory - https://github.com/facebook/react-native/releases/download/v0.69.0-rc.4/hermes-runtime-darwin-v0.69.0-rc.4.tar.gz.

For some reasons, the string with backticks is treated differently than with double quotes since this works:

source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz"

Changelog

[Internal] - Fix downloading prebuilt hermes from the Github release

Test Plan

  • npx react-native init RN069RC4 --version 0.69.0-rc.4
  • in the created project, run pod install with hermes enabled
  • run git init && git add . && git commit -m "Initial commit" && git remote add origin https://github.com/fortmarek/some-fake-repository (this is necessary due to an unrelated bug in the RC4)
  • observe error
  • update node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec with the change from this commit
  • run pod install
  • 馃帀

@fortmarek fortmarek requested a review from cortinico May 31, 2022 10:24
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Shopify Partner: Shopify Partner labels May 31, 2022
@cortinico
Copy link
Contributor

cc @hramos @cipolleschi for visibility

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 31, 2022
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,788,244 +0
android hermes armeabi-v7a 7,191,825 +0
android hermes x86 8,099,598 +0
android hermes x86_64 8,077,103 +0
android jsc arm64-v8a 9,656,305 +0
android jsc armeabi-v7a 8,428,809 +0
android jsc x86 9,608,478 +0
android jsc x86_64 10,203,027 +0

Base commit: f4123b0
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: f4123b0
Branch: main

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @fortmarek in 91452fc.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 31, 2022
fortmarek added a commit that referenced this pull request May 31, 2022
Summary:
This:
```ruby
source[:http] = `https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz`
```
currently fails with the following error:
```
[!] Failed to load 'hermes-engine' podspec:
[!] Invalid `hermes-engine.podspec` file: No such file or directory - https://github.com/facebook/react-native/releases/download/v0.69.0-rc.4/hermes-runtime-darwin-v0.69.0-rc.4.tar.gz.
```

For some reasons, the string with backticks is treated differently than with double quotes since this works:
```ruby
source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz"
```

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Fix downloading prebuilt hermes from the Github release

Pull Request resolved: #33935

Test Plan:
- `npx react-native init RN069RC4 --version 0.69.0-rc.4`
- in the created project, run `pod install` with hermes enabled
- run `git init && git add . && git commit -m "Initial commit" && git remote add origin https://github.com/fortmarek/some-fake-repository` (this is necessary due to an unrelated bug in the RC4)
- observe error
- update `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` with the change from this commit
- run `pod install`
- 馃帀

Reviewed By: dmitryrykun

Differential Revision: D36775047

Pulled By: cortinico

fbshipit-source-id: 3772adca32fe9898cde33c187d19b7b181af3677
@leotm
Copy link
Contributor

leotm commented May 31, 2022

saw the nightly was yday and rc5's bit away, so went for the patch

updating .../hermes-engine.podspec kept reverting each pod install on Yarn 3

but was easy enough

  • yarn patch react-native
  • update .../sdks/hermes-engine/hermes-engine.podspec
  • yarn patch-commit -s ...
  • rm -rf node_modules
  • yarn

before

Screenshot 2022-05-31 at 14 45 59

after

Screenshot 2022-05-31 at 15 37 48

thx again @fortmarek

btw i presume these backticks remain fine

source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip

@leotm
Copy link
Contributor

leotm commented May 31, 2022

just for completeness

spec.platforms = { :osx => "10.13", :ios => "11.0" }

-  spec.platforms   = { :osx => "10.13", :ios => "11.0" } 
+ spec.platforms   = { :osx => "10.13", :ios => "12.4" } 

think we need to deprecate iOS/tvOS SDK 11.0 support, now that 12.4+ is required

@leotm
Copy link
Contributor

leotm commented May 31, 2022

ref: reactwg/react-native-releases#21 (comment) (result of the patch above on rc4, aka rc5)

facebook-github-bot pushed a commit that referenced this pull request May 31, 2022
Summary:
Deprecate iOS/tvOS SDK 11.0 support now that 12.4+ is required

Context: #33935 (comment)

## Changelog

[iOS] [Fixed] - Deprecate iOS/tvOS SDK 11.0 support now that 12.4+ is required

Pull Request resolved: #33939

Reviewed By: hramos

Differential Revision: D36780553

Pulled By: cortinico

fbshipit-source-id: 64dd12742d1f9f949a89306dd3353ea24a31983d
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. Merged This PR has been merged. p: Shopify Partner: Shopify Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants