Split test_general into stable and experimental targets
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C
- Estrellas
- 18
- Forks
- 12
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Problem
The upstream test_general test in the Node.js repository compiles a single target with NAPI_EXPERIMENTAL, which links against all experimental Node-API symbols (node_api_set_prototype, node_api_post_finalizer). This means the addon cannot be loaded on runtimes that don't export every experimental symbol.
In the CTS, this forces all test_general JS test files to guard loadAddon behind a check for every experimental feature the addon links against. The result is that even stable API tests (like napi_strict_equals, napi_typeof, napi_instanceof, etc.) are silently skipped on runtimes that don't support all experimental features.
Proposed solution
Split the upstream test_general into separate targets:
- Stable target — compiles without
NAPI_EXPERIMENTAL, includes all stable API functions - Experimental target(s) — one per experimental feature, compiled with the appropriate
NAPI_EXPERIMENTALdefine
This would allow the CTS to test stable APIs independently of experimental feature support.
Current workaround
The CTS ports test_general as a single experimental addon (matching upstream), with all JS tests guarded behind experimentalFeatures.setPrototype && experimentalFeatures.postFinalizer.
References
- Upstream source: https://github.com/nodejs/node/tree/main/test/js-native-api/test_general
- Upstream
binding.gypdefinesNAPI_EXPERIMENTALon the single target
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.
Línea de trabajo
Comienza con el directorio upstream test/js-native-api/test_general y su binding.gyp, y compara después cómo CTS hace actualmente el port del único target experimental. Identifica las agrupaciones de funcionalidades estables y experimentales descritas en el issue. Se considera terminado cuando los tests de la API estable pueden cargarse sin todos los símbolos experimentales, mientras que los tests experimentales siguen estando protegidos por separado y se pueden compilar.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- c, javascript, node.js
- Área
- api, build-system, testing-qa
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100