-
Notifications
You must be signed in to change notification settings - Fork 169
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
fix: compileDebugJavaWithJavac #31
Conversation
Hi there! This should not be merged without an adequate explanation why the build succeeds in CI: https://github.com/thebergamo/react-native-fbsdk-next/runs/2491258907?check_suite_focus=true If CI is successfully compiling - the assumption must be that
If CI is somehow missing something, that's important to know and the PR should include a change to this workflow file to show the failure, and then the PR should include the fix and this should merge - https://github.com/thebergamo/react-native-fbsdk-next/blob/master/.github/workflows/ci.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love fixing compile errors, but as mentioned in my comment on the PR itself this should not be merged until there is a diagnosis on why CI was building successfully vs your experience of having a build failure
Build failed for me as well. Downgrading to 4.1.0 fixed the issue. |
Would love to fix it: we must know why the example compiles in CI and your build fails first though |
I think that is Grande version, is the only thing that changes from my machine to CI |
But don't make sense, is just a simple constructor |
@UriMiranda okay: can you try it in your project with the identical version to verify? Then we will know and we can make real decisions on how to handle |
Sure, I will try |
Is not Grandle version, I tried with the same version. Do u know what is the java version? Here is 1.8 |
From what I see here it uses Java 11: |
You don't have to guess, you can look at the action output. For instance, you are attempting to fix a compile error but your PR does not actually compile: https://github.com/thebergamo/react-native-fbsdk-next/runs/2529266420?check_suite_focus=true - check the output and you see missing symbol And the environment in general: I just made sure my project is using 4.2.0 here and JDK8, it works fine too. With no reproduction, there's no issue I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails to compile in CI, project works without this in my project - need demonstration of failure in CI prior to merge if merged
I have the same issue:
https://github.com/thebergamo/react-native-fbsdk-next/blob/master/android/src/main/java/com/facebook/reactnative/androidsdk/FBProfileModule.java is extending ReactContextBaseJavaModule and assuming there's a default constructor when in older versions there's not. That's why ceb97f5 is a fix for this |
That explains it! An explanation is important. So the default constructor was added for react-native 0.62 - facebook/react-native@e69be0a That means a couple things at once:
With respect + understanding that it is not easy to update, I don't see react-native below 0.63 as viable even as that is the oldest one that was patched to work with Xcode 12.5 and that's a requirement for iOS development. So I personally don't see react-native 0.60 / 0.61 compatibility as a reasonable target and I'd simply note the same in package.json / CHANGELOG / re-issue as a breaking change and counsel use of https://react-native-community.github.io/upgrade-helper/ so people get up to date. That is opinion, of course, but the Xcode 12.5 build thing is fact facebook/react-native#31179 |
Hi, I guess the error is because of an annotation in construct (@NotNull), I saw others classes in code that has the same constructor without it. |
I removed it, 50% of chance that will work. lol |
@@ -43,7 +43,7 @@ | |||
new FBGraphRequestModule(reactContext), | |||
new FBLoginManagerModule(reactContext, mActivityEventListener), | |||
new FBMessageDialogModule(reactContext, mActivityEventListener), | |||
new FBProfileModule(), | |||
new FBProfileModule(reactContext), | |||
new FBSettingsModule(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't FBSettingsModule going to have the same issue 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question 🤔
It works now!! Resolve ReactApplicationContext import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running CI on it now, and now that we know it's a react-version problem (so the problem is understood!) I'm +1 to get people moving.
I still argue (I think reasonably, with technical merit) that react-native 0.63 should be the minimum supported version going forward, but that's something that needs to be stated explicitly, and it has not been (yet)
I'm fine supporting only version 0.63 of react-native as per it won't compile in newer Xcode. When I get in my computer I will add a notice in the readme stating this in this PR. |
🎉 This PR is included in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Propose to fix a build error in android. Missing constructor on FacebookProfile.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
#30
Test Plan:
In a project with react-native-fbsdk-next as dependency enter in android folder and run:
cd android && ./gradlew app:installDebug -PreactNativeDevServerPort=8081