Comments (12)
I've tested it with patch-package, and it worked fine.
Great thanks for the confirmation đ
Note that this fix, while looks great and is correct. Can actually cause issues in some case
We're aware of this. That's why this change was marked as breaking + started from last version we added support for includesGeneratedCode
:
That will allow libraries to ship the generated code so that mismatch between codegen versions like this one won't happen again
from react-native.
We ended up reverting the partial Int32/Float implementation, as attempting to fix it with the previous PR I linked would create more problems with libraries like -svg
and others.
We'll get back to it in a future release.
from react-native.
Missing Reproducible Example | |
---|---|
âšī¸ | We could not detect a reproducible example in your issue report. Please provide either:
|
from react-native.
Is this a regression from 0.73 to 0.74 @mfazekas ?
from react-native.
@cortinico yes I believe so. At least the error - Error: Exception in HostFunction: no non-static method "Lcom/rnmapbox/rnmbx/components/mapview/NativeMapViewModule;.setHandledMapChangedEvents(Ljava/lang/Double;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/Promise;)V
we've not encountered with 0.73.
But looking at the sources this part was not touched in 4 years.
https://github.com/facebook/react-native/blame/9922628032ace4d87257c1b3d70c2dc6c38a60a6/packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js#L262-L263
Also in 0.73.0 I also see double
static facebook::jsi::Value __hostFunction_NativeMapViewModuleSpecJSI_setHandledMapChangedEvents(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
static jmethodID cachedMethodId = nullptr;
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "setHandledMapChangedEvents", "(Ljava/lang/Double;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}
So not sure why we started to face the issue now.
from react-native.
@mfazekas Could we get a small repro using https://github.com/react-native-community/reproducer-react-native ? That would make it way easier for me to understand what happened.
from react-native.
@cortinico sure will try to do that
from react-native.
@cortinico so the issue is that in RN 0.73
GenerateModuleJavaSpec.js
has generated
public abstract void setHandledMapChangedEvents(@Nullable Double viewRef, ReadableArray events, Promise promise);
while RN 0.74 it's changed to:
- public abstract void setHandledMapChangedEvents(@Nullable Double viewRef, ReadableArray events, Promise promise);
+ public abstract void setHandledMapChangedEvents(@Nullable Integer viewRef, ReadableArray events, Promise promise);
But rest of RN 0.74 has not made this change.
from react-native.
As for if it's a breaking change? I'm not 100% sure many modules like react-native-svg
are generating it once, and haven't rerun with the changed codegen in RN 0.74. We've reran with @rnmapbox/maps that's why we've faced the issue.
from react-native.
This is indeed a bug. Fix for it is here:
@mfazekas if you could try it with patch-package and report back, would be gold. We could include it in the next 0.74 patch release.
from react-native.
@cortinico
I've tested it with patch-package, and it worked fine.
mfazekas/maps-1@dbcf2b1
Note that this fix, while looks great and is correct. Can actually cause issues in some case - like, the mentioned react-native-svg has the spec generated with 0.73 or even older, so it might work because of the current but, but with next 0.74.* release they'll need to update those generated java code: https://github.com/software-mansion/react-native-svg/blob/main/android/src/paper/java/com/horcrux/svg/NativeSvgRenderableModuleSpec.java
from react-native.
Ok so for React Native SVG the fix would be here:
@mfazekas have you noticed any similar failures?
from react-native.
@cortinico
So, it will not be possible to use Int when mapping from TS to Java/Kotlin? (Sincere doubt)
from react-native.
Related Issues (20)
- Not able to run my react-native app HOT 3
- useWindowDimensions does not work for Expo 51 HOT 3
- Android Talkback - Checkbox accessibility state stuck with announcing "mixed" once the mixed state is introduced HOT 2
- `maxLength` of TextInput does not work when value is changed after state update HOT 2
- React native pod file use_modular_headers! throwing Redefinition of module 'ReactCommon' error HOT 2
- [BUG] :: MainActivity memory leak when running foreground service HOT 1
- [Android] Timing of NativeCommands delivery vs. calls of TurboModule methods vs. AppState changes HOT 2
- TextInput callbacks inconsistent order of onSelectionChange and onChange/onChangeText HOT 4
- 0.74.2: RCTDeprecation/RCTDeprecation.h file not found HOT 1
- Finish implementing URL accessors like host, hostname, username, password HOT 5
- 0.72: Backport fix for privacy manifest generation path being nil HOT 2
- iOS: useWindowDimensions is not returning correct values after rotating when phone is locked. HOT 1
- [iOS] onChangeText of TextInput is fired with text longer than maxLength, then press undo app crashed HOT 7
- Need support for 16KB page size on Android HOT 2
- Adding custom fonts in react native cli not working (using yarn as package manager ) HOT 4
- [Web Socket][Android] Sec-WebSocket-Protocol header should have a space after the comma HOT 5
- codegen - javaPackageName is ignored with includesGeneratedCode and react-native codegen HOT 8
- Memory Leak in Dialog Management: ReactRootView not removed from View Tree when Dialog is not showing HOT 3
- Timers in the new architecture are not spec compliant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.