Cannot call another worklet from worklet
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- babel, react-native, typescript
調査の方向性
Reproduce the nested-worklet case with react-native-worklets-core 0.2.4 and react-native-reanimated 3.5.4, then compare it with the version where the worklet is hoisted. Inspect the Babel transformation and determine why an inlined worklet passed between contexts fails; done means the nested example runs correctly without requiring the workaround.
索引モデルが issue の本文から書いたものです。
説明
Calling an inlined worklet from an existing worklet breaks, presumably because of some mistake in the babel plugin.
This code breaks:
const context1 = Worklets.createContext('context1')
const context2 = Worklets.createContext('context2')
const runAsync = Worklets.createRunInContextFn((func: () => void) => {
'worklet'
try {
// Call long-running function
func()
} catch (e) {
// Re-throw error on JS Thread
throwJSError(e)
}
}, context2)
const runNormalWorklet = Worklets.createRunInContextFn(() => {
'worklet'
console.log('running from context1!')
runAsync(() => {
'worklet'
console.log('running from context2!')
})
}, context1)
runNormalWorklet()
But when we lift out the nested worklet function outside from the existing worklet, it works:
+ const fn = () => {
+ 'worklet'
+ console.log('running from context2')
+ }
const runNormalWorklet = Worklets.createRunInContextFn(() => {
'worklet'
console.log('running from context1!')
- runAsync(() => {
- 'worklet'
- console.log('running from context2!')
- })
+ runAsync(fn)
}, context1)
I'm guessing this is an incompatibility with the Reanimated plugin again.
"react-native-worklets-core": "0.2.4",
"react-native-reanimated": "^3.5.4",
- 主要言語
- C++
- スター
- 792
- フォーク
- 65
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
margelo/react-native-worklets-core のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
margelo/react-native-worklets-core#271 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
margelo/react-native-worklets-core#269 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
margelo/react-native-worklets-core#268 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
margelo/react-native-worklets-core#267 · コメント 1 件 · リアクション 1 件 ·
margelo/react-native-worklets-core の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cp-algorithms/cp-algorithms#1715 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Icinga/icinga2#11058 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status:needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
PX4/PX4-Autopilot#28924 ·
メンテナーはふだん 1 日以内に返信
-
component: split-view platform: windows
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zen-browser/desktop#15616 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信