| #
879827bb |
| 06-Apr-2023 |
Łukasz Kosmaty <[email protected]> |
[core][Android] Add functions converter (#21976)
# Why
Adds functions converter.
# How
- Adds a frontend and backend converter for js function type
- Adds ability to call those functions
[core][Android] Add functions converter (#21976)
# Why
Adds functions converter.
# How
- Adds a frontend and backend converter for js function type
- Adds ability to call those functions via Kotlin code
# Test Plan
- unit tests ✅
show more ...
|
| #
5e538c67 |
| 26-Sep-2022 |
Łukasz Kosmaty <[email protected]> |
[modules][Android] Simplify unpacking of method results (#19226)
# Why
Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin fun
[modules][Android] Simplify unpacking of method results (#19226)
# Why
Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin functions in Cpp. The result was obtained as a WritableArray, and then it was unpaced. That solution isn't ideal in the long term because we always return a single value.
# How
That change for the sync function was pretty straightforward. Right now, the Kotlin function body returns an arbitrary object which is later unpaced and converted to the jsi value.
Unfortunately, to simplify the flow of async functions, I've to introduce my implementation of the callback and the promise.
# Test Plan
- tests ✅
- bare-expo and NCL ✅
show more ...
|
| #
65a981dd |
| 22-Aug-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet API][Kotlin] Add frontend argument conversion (#18714)
# Why
Redesigns the argument conversions system.
# How
- Adds frontend converts (converters that work in the CPP and do the ear
[sweet API][Kotlin] Add frontend argument conversion (#18714)
# Why
Redesigns the argument conversions system.
# How
- Adds frontend converts (converters that work in the CPP and do the early conversion to the JNI types which can be passed to the Kotlin code).
- Adds a cache for frontend converters
- Adds an abstraction over the expected type to the CPP layer.
# Test Plan
- unit tests ✅
show more ...
|
| #
b065ac74 |
| 17-Aug-2022 |
Kudo Chien <[email protected]> |
[core] Add Fabric support for expo view managers on Android (#18541)
|
| #
b7d1787d |
| 12-Aug-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet API] Cache PropNameID and js objects (#18579)
# Why
Adds a cache for prop name IDs and js objects like `Promise` or `CodedError`.
# How
- Added a cache registry
- Added missing tr
[sweet API] Cache PropNameID and js objects (#18579)
# Why
Adds a cache for prop name IDs and js objects like `Promise` or `CodedError`.
# How
- Added a cache registry
- Added missing try catch in the async function
# Test Plan
- unit tests ✅
show more ...
|
| #
05c5e37d |
| 29-Jul-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet API][Kotlin] Implement sweet typed arrays (#18379)
# Why
A follow-up to the https://github.com/expo/expo/pull/17667.
# How
- Reused some C++ utils to deal with typed arrays
- Made c
[sweet API][Kotlin] Implement sweet typed arrays (#18379)
# Why
A follow-up to the https://github.com/expo/expo/pull/17667.
# How
- Reused some C++ utils to deal with typed arrays
- Made classes for typed arrays on both sides: native and JS
- Added new converters to obtain typed arrays as function arguments
- Added tests
# Test Plan
- unit tests ✅
show more ...
|
| #
9ebf31e6 |
| 27-Jun-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet API][Kotlin] Move preliminary args conversion to Cpp (#17944)
# Why
Moves preliminary args conversion to Cpp.
Needs to work:
- https://github.com/expo/expo/pull/17938
- https://github.c
[sweet API][Kotlin] Move preliminary args conversion to Cpp (#17944)
# Why
Moves preliminary args conversion to Cpp.
Needs to work:
- https://github.com/expo/expo/pull/17938
- https://github.com/expo/expo/pull/17940
- https://github.com/expo/expo/pull/17942
- https://github.com/expo/expo/pull/17943
# How
- Created the `CachedReferencesRegistry` that stores references to often used Java classes. In the future, we may want to store also jsi object there too.
- Reduced the usage of `folly`.
- Added unit tests.
# Benefits
- You can obtain `JavaScriptValue` and `JavaScriptObject` as a function argument
# Test Plan
- unit tests (that covers sync and async functions call too) ✅
show more ...
|
| #
a416e6db |
| 24-May-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet][Kotlin] Add `evaluateScript` function (#17586)
# Why
Adds a `evaluateScript` function.
Also, adds wrappers for `jsi::Value` and `jsi::Object`.
# How
Exposes a `evaluateScript` fun
[sweet][Kotlin] Add `evaluateScript` function (#17586)
# Why
Adds a `evaluateScript` function.
Also, adds wrappers for `jsi::Value` and `jsi::Object`.
# How
Exposes a `evaluateScript` function to Kotlin (it's pretty handy in the tests environment). I've also created a wrapper for jsi types. For now, it's read-only, but that will be expanded in the future.
# Test Plan
- unit tests ✅
show more ...
|
| #
64f5c95f |
| 17-May-2022 |
Łukasz Kosmaty <[email protected]> |
[module-core][Kotlin] Add basic support for sync function (#16977)
# Why
Closes ENG-4608.
Adds basic support for sync function.
# How
- Created ExpoModulesHostObject that installs into the
[module-core][Kotlin] Add basic support for sync function (#16977)
# Why
Closes ENG-4608.
Adds basic support for sync function.
# How
- Created ExpoModulesHostObject that installs into the runtime as `global.ExpoModules`. A host object is an abstract object where we can define our property getter, allowing us to create JS object for each module lazily.
- Added `isAsync` property to sweet functions and `runSynchronously()` modifier - that will be changed in the future.
- Created `JavaScriptModuleObject` that represents a module in the JS world. It has a map of methods with a cached body.
- All the communication goes via two kotlin methods - `getJavaScriptModuleObject` (which returns a hybrid representation of the module) and `callMethodSync` (which is calling correct implementation). Right now, I'm not using lambdas to pass Kotlin functions into CPP, because I don't see any reason why should I.
# Test Plan
- tested with bare-expo ✅
show more ...
|