-
Notifications
You must be signed in to change notification settings - Fork 565
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
Compile-time Error: control may reach end of non-void function with Xcode 10.2 #2305
Comments
@Joyreece
your solution doesn't work for me. |
temp solution : add
this working for me, waiting for the official solution |
From what I can tell, and I'm probably wrong, there is a new entry in the JSType Enum kJSTypeSymbol which is not being handled in the switch statement. I don't know what the effect of doing this will be, but I think that the solution is as follows... inline const char *jsc::Value::typeof(JSContextRef ctx, const JSValueRef &value) {
switch (JSValueGetType(ctx, value)) {
case kJSTypeNull: return "null";
case kJSTypeNumber: return "number";
case kJSTypeObject: return "object";
case kJSTypeString: return "string";
case kJSTypeBoolean: return "boolean";
case kJSTypeUndefined: return "undefined";
case kJSTypeSymbol: return "symbol";
}
} This does mean that when/if a new value is added to the Enum again we will see the same issue, unless there is a default added, I just don't know what that should do. |
I have same isssue :( |
makes sense |
Isn't it related to #2246 ? |
Nope, I think you're correct @AidenMontgomery . This change was introduced in iOS 12.3 (see #2246), which was included in the Xcode update that was released today. |
Same conclusion here. Did someone make a Pull Request for this change ? |
@StevenMasini yeah i made the Pull Request #2303 but no luck so far. also if anyone can check if PR is working with Xcode version below 10.2 would be great. |
@mohammadalijf Ok let me check if that work on XCode 10.1. |
I succeed to compile on XCode 10.1 with the fix you made in #2303 Indeed #if defined __IPHONE_12_2 || defined __MAC_10_14_4
case kJSTypeSymbol: return "symbol";
#endif |
same problem |
@StevenMasini thank you steven 👍 |
@sercand to be fair, the only way this would have been caught before the Xcode 10.2 public release is if someone noticed this in one of the Xcode 10.2 betas (I did notice this, and probably should have made a PR a long time ago). This was not documented in any SDK or Xcode release notes, at least from what I've seen. It was basically "out of the blue" since it was only added to the JavaScriptCore docs and no other documentation/release notes |
when can we expect a new release guys? |
@Joyreece I do not have realm in my node_modules! Any alternatives? |
Hi, bro. If it does, I still recommend that install into the project environment with following commands. cd <PROJECT_PATH>
npm install --save realm DO NOT miss the |
same issue for me |
so, WHEN can we expect a new release guys? |
@ValeriiKov this was fixed in v2.26.1 @kneth I think this issue can be closed |
TL;DR
Thanks @AidenMontgomery.
${RN_PROJ}/node_modules/realm/src/jsc/jsc_value.hpp
.Goals
When I were compiling the React Native Project with Xcode, the compiler prompts an error.
Expected Results
No error.
Actual Results
Version of Realm and Tooling
Temp Solution
${RN_PROJ}/node_modules/realm/src/jsc/jsc_value.hpp
;return "null";
between line 33 and 34.I know this is not a good solution.
So I am looking forward to the official solution.
The text was updated successfully, but these errors were encountered: