Header changes required for 0.40#670
Conversation
|
Hi @christopherdro, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
@christopherdro Thanks for the PR. Would this be a duplicate of #665 ? |
|
@axemclion Are the changes in #665 suppose to achieve the same thing? I had to cherry pick the 2 open PR's plus these changes to get our app to build properly. Here is how our forked version currently looks. |
|
Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience! |
|
Any updates on this? This PR alone fixed errors for me on RN 0.40.0 (without needing the other things in the rn-40 branch of @christopherdro's fork.) |
|
+1 |
| @@ -1,5 +1,5 @@ | |||
| #if __has_include("RCTEventEmitter.h") | |||
| #import "RCTEventEmitter.h" | |||
| #import <React/RCTEventEmitter.h> | |||
There was a problem hiding this comment.
To make CodePush able to work both with react-native@0.40.0 and react-native@0.39.2 we probably should use:
#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
#elif __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else
#import "React/RCTEventEmitter.h" // Required when used as a Pod in a Swift project
#endif| #import <React/RCTConvert.h> | ||
| #import <React/RCTEventDispatcher.h> | ||
| #import <React/RCTRootView.h> | ||
| #import <React/RCTUtils.h> |
There was a problem hiding this comment.
The same here:
#if __has_include("RCTAssert.h")
#import "RCTAssert.h"
#else
#import <React/RCTAssert.h>
#endif
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif
#if __has_include("RCTEventDispatcher.h")
#import "RCTEventDispatcher.h"
#else
#import <React/RCTEventDispatcher.h>
#endif
#if __has_include("RCTRootView.h")
#import "RCTRootView.h"
#else
#import <React/RCTRootView.h>
#endif
#if __has_include("RCTUtils.h")
#import "RCTUtils.h"
#else
#import <React/RCTUtils.h>
#endif| @@ -1,5 +1,5 @@ | |||
| #import "CodePush.h" | |||
| #import "RCTConvert.h" | |||
| #import <React/RCTConvert.h> | |||
There was a problem hiding this comment.
#import "CodePush.h"
#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif| @@ -1,5 +1,5 @@ | |||
| #import "CodePush.h" | |||
| #import "RCTConvert.h" | |||
| #import <React/RCTConvert.h> | |||
There was a problem hiding this comment.
#import "CodePush.h"
#if __has_include("RCTConvert.h")
#import "RCTConvert.h"
#else
#import <React/RCTConvert.h>
#endif|
@dingbat - hi. I've tried to build initial React Native project (execute By the way I think it may be a good idea to apply this PR in next release of CodePush due to breaking changes in https://github.com/facebook/react-native/releases/tag/v0.40.0 . But this PR has no back compatibility with React Native having version @christopherdro, could you please rebase your commit to provide back compatibility? Please let me know if you see any issues or have any questions. |
|
@sergey-akhalkov Why don't you bump the major version for 0.40 and later, and continue to support 0.29 and older on the 1.x version in a separate 1.x branch? Just like how bugsnag have done it - https://github.com/bugsnag/bugsnag-react-native/releases |
|
@AndrewJack - I think the main reason is that we'd like to avoid the overhead of maintaining multiple active branches simultaneously and porting features/fixes between them etc. Although I'd be interested to hear any alternative arguments. |
|
are you planning to integrate these changes soon? This is the only thing blocking me from migrating to RN 0.40. |
|
@buptkang and I are actively looking at it, we expect to have it released tomorrow or on Monday. |
|
Hi all, we ran into some minor unanticipated issues and have a supplemental PR up with some tweaks to ensure that we are backwards compatible and that some other header issues are taken care of. It will be merged tonight, and we will make a release tomorrow morning! |
|
@christopherdro @dingbat @jsappme @AndrewJack @ivpusic @nihgwu @martijndeh: |
|
awesome! thanks a lot for your time and effort! |
|
In case this helps anyone else upgrading iOS, I was getting build failures for a lot of duplicate interface definitions after upgrading to rncp 1.17.0-beta. They all came from this line in my Removing I have yet to ever test code pushing, so I can't say whether there are any other issues. |
|
If it's a breaking change may I suggest bumping the major in accordance with SemVer unless you've got something more practical going on. |
|
We have been using (this line](https://github.com/Microsoft/react-native-code-push/blob/e42485243d9466fb6c00937bd9f67cee0d96de53/ios/CodePush/RCTConvert%2BCodePushInstallMode.m#L3 for backward compat, so I think we dont have to bump up the major version. |
|
All of the above |
|
cc @BretJohnson - what do you think of the comment above ? |
|
I added this style of import into a pull-request I was merging into another library: |
These changes were required for me to properly build the project on the latest version of react native.
Related #665 #638