`Worklets.createSharedValue` can't set fields on an object value individually
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp, react-native, typescript
- Área
- mobile-dev
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 791
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de margelo/react-native-worklets-core
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
margelo/react-native-worklets-core#271 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#269 · 2 reacciones ·
-
Unable to download JS bundle Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#268 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
margelo/react-native-worklets-core#267 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
margelo/react-native-worklets-core#266 · 1 comentario · 2 reacciones ·
Todos los issues de margelo/react-native-worklets-core
Issues similares
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Abiertobug build
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Abiertofuzz
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/ClickHouse#122114 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
module/agent platform/macos type/bug/regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement PyCDE
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100