`Worklets.createSharedValue` can't set fields on an object value individually
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp, react-native, typescript
- Ambito
- mobile-dev
Direzione di ricerca
The issue names sharedvalue-tests.ts and the failing get_set_object_value test; run it first and compare the behavior with the regression introduced by PR 178. Done means mutating sharedValue.value.a and .b updates the stored object and the test passes, while preserving whole-value assignment.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I can't create a shared value that contains an object and then update the object's fields later. The get_set_object_value test in sharedvalue-tests.ts describes exactly what I am trying to do, and the test seems to be failing in release 1.2.0.
get_set_object_value: () => {
const sharedValue = Worklets.createSharedValue({ a: 100, b: 200 });
sharedValue.value.a = 50;
sharedValue.value.b = 100;
return ExpectValue(sharedValue.value, { a: 50, b: 100 });
},
The test output is:
LOG Running "WorkletsExample" with {"rootTag":11}
LOG Starting test with index 1
LOG Running test: get_set_object_value
LOG Loading react-native-worklets-core...
LOG Worklets loaded successfully
LOG ExpectValue, resolved: {"a": 100, "b": 200}
LOG ExpectValue, failed: Expected {"a":50,"b":100}, got {"a":100,"b":200}.
LOG Test: get_set_object_value failed.
I can only update the entire sharedValue like so:
sharedValue.value = {
a: 50,
b: 100,
};
I believe this is a regression of https://github.com/margelo/react-native-worklets-core/pull/178.
- Lingua principale
- C++
- Stelle
- 791
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di margelo/react-native-worklets-core
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
margelo/react-native-worklets-core#271 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#269 · 2 reazioni ·
-
Unable to download JS bundle Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#268 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
margelo/react-native-worklets-core#267 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
margelo/react-native-worklets-core#266 · 1 commento · 2 reazioni ·
Tutte le issue di margelo/react-native-worklets-core
Issue simili
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Apertabug build
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
module/agent platform/macos type/bug/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement PyCDE
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100