Plan of process.binding() deprecation
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Refactorización
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, node.js
- Área
- backend
Línea de trabajo
Comienza revisando los pull requests de Node.js referenciados y las preguntas sobre el comportamiento del estado final, el despliegue del binding, las alternativas y el momento de la advertencia. Se considera completado cuando el TSC haya resuelto estas preguntas y documentado un plan de deprecación acordado; no se nombran archivos de implementación ni pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This issue is not new but motivated by https://github.com/nodejs/node/pull/50687, which proposed to
- Ship the runtime deprecation in Node.js v22 --deprecated-process-binding on by default.
- --no-deprecated-process-binding becomes the default in Node.js v23
- process.binding(...) is removed entirely in Node.js v24, with the CLI option becoming a no-op
For background in 2021 the plan suggested in https://github.com/nodejs/node/pull/37485#pullrequestreview-600060802 and followed since https://github.com/nodejs/node/pull/37819 was:
- Do comprehensive research into what exact features ecosystem modules get through process.binding() (this isn't actually going to be a huge API surface!)
- Patch process.binding() so that it returns objects that cover those use cases, implemented in terms of public APIs
- Optionally, runtime-deprecate process.binding() only for the cases that users aren't commonly encountering
- Eventually, remove support for those cases specifically
- Leave it at that, don't runtime-deprecate process.binding() as a whole and leave the shim in place forever
I am opening this issue trying to slice the issue into different questions instead of bundling all together into just two different plans, in the hope of figuring out a better compromise.
There are several questions to the deprecation of process.binding():
- What's our end-goal when the deprecation reaches EOL?
a) Deleteprocess.bindingcompletely so that when trying to invoke it, users get an error.
b) A function that does no more than emitting a warning and returning empty objects. Users almost always get an error when they try to access an unsupported property, but if the code path is unused, e.g. only loading aprocess.binding()from the top-level but never actually hit the code path using anything from it, it would not fail.
c) Leave a low-maintenance and harmless shim in place forever. Users get an error only when they try to use a specific unsupported property. - How should the list of bindings (currently 20) be deprecated?
a) Individually, based on how problematic they are/how difficult it is to provide alternatives
b) Together at once - Should the runtime deprecation start before or after alternatives/shims are completed
a) We investigate the impact (e.g. through CITGM), develop and release alternatives on the way, monitor the changes in the impact, before deciding when it's ready to runtime-deprecate it (individually or all together).
b) Runtime-deprecate it directly and mitigate the impact afterwards based on the bug reports/feature requests we receive. - How should the warnings be rolled out when we start to emit warnings (there are a few more combination possibilities with 2)
a) Emit runtime warnings unconditionally
c) Non-node_module warnings first, node_module warnings in the next cycle
I think we as @nodejs/tsc need to take a deeper look into these questions and make some decisions before finishing a plan of the deprecation.
- Lenguaje dominante
- JavaScript
- Estrellas
- 693
- Forks
- 142
- Merge medio
- 8 d 7 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 nodejs/TSC
-
GSoC 2027Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 1/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 20/100
-
tsc-agenda
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 3/100
Todos los issues de nodejs/TSC
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JimLiu/baoyu-design#23 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
Data Manager offers a one-click purge of the onboard tools registry, labelled "Tool execution data"Abiertodata-safety effort:low model:light plan planner:opus-5-5
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Docs: four cross-page links point at anchors that do not existPosiblemente ocupada @6t9xstar la tomó hoy. Abiertodifficulty:easy documentation good first issue hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
API: `tsc.exe` opens a visible console window on Windows when the parent process has no consoleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/TypeScript#65083 ·
Los mantenedores suelen responder en 1 día