PowerShell / PowerShell/PowerShellEditorServices

Investigate using LanguagePrimitives.ConvertTo rather than the converter attribute

Abierto
#1,579 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Area-Debugging Issue-Enhancement
Lenguaje dominante
C#
Estrellas
767
Forks
266
Merge medio
3 d 16 h
PR fusionados (30 d)
1

Descripción

In the debugger code we currently go to great lengths to find and execute a type conversion attribute on variables:

https://github.com/PowerShell/PowerShellEditorServices/blob/f9bde73000a6e2a8ebfc721d675dcb1c60316092/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs#L489-L522

Most of this can't be avoided, but one thing we do here is use the EngineIntrinsics value to execute the conversion attribute on the pipeline thread, which means we need to contend for and wait on a pipeline thread execution.

Instead of this, we could maybe call LanguagePrimitives.ConvertTo() with the known target type and ideally not need to use the pipeline thread.

This might not be possible, but is worth investigating...

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza leyendo el manejo de conversiones en src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs en las líneas 489-522, especialmente el uso de EngineIntrinsics y del pipeline-thread. Compara esa ruta con LanguagePrimitives.ConvertTo() para el tipo de destino conocido. Se considera terminado cuando se haya establecido si la conversión puede evitar la ejecución en el pipeline-thread y se haya documentado o implementado el enfoque viable.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, powershell
Área
devtools
Tipo de issue
Refactorización
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.