MTP build preflight errors leave Test Results run output empty

Abierto
#574 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with the preserved regression tests in src/editors/vscode/src/test/suite/test-build-output.test.ts and the retained results under target/codex1-release-v0330/. Run the extension-host regression with RUN_RELEASE_REGRESSIONS=1 and trace how MTP preflight failures reach TestRun.appendOutput. Done means Run and Coverage output includes the error marker, code, and file across the documented fixture combinations.

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

Descripción

Released behavior

The official published v0.33.0 VSIX reports Microsoft.Testing.Platform preflight compiler/MSBuild failures in the Testing failure message and cache, but calls no TestRun.appendOutput for that failure. The Test Results run-output stream stays empty.

This violates [TEST-RUN-OUTPUT], which requires a build error from the runner console to appear as the run's own output. It is separate from #442, where the invocation logger correctly records only the failure's presence.

Live reproduction

Actual VS Code1.145.2 on macOS arm64, official v0.33.0 darwin-arm64 VSIX installed in production mode, with its own published host and compiler engines. No local SharpLsp runtime or extension implementation was executed. The only development extension is an observer harness loading regression tests.

  1. Create real SDK xunit.v3 MTP projects using the existing F# and C# fixtures. Exercise both native MTP detection and global.json SDK opt-in.
  2. Discover a real passing test and run it through the published extension's actual registered Run profile. Require a pass.
  3. Add a real Directory.Build.targets target before BeforeBuild that emits Error with code SLSP9999, file Preflight.txt and a unique text marker. This is an actual SDK/MSBuild failure, not a mocked runner response.
  4. Invoke the actual Run and Coverage profiles. Both produce errored TestRun verdicts and notRun cached outcomes. Both Testing messages retain the unique marker.
  5. Observe actual TestRun.appendOutput calls, forwarding all calls unchanged. Both run-output strings are empty.
  6. Remove only the failing targets file. Run the selected test again and require a pass.
  7. Assert each failure's run output includes the marker, code and file. The output assertion fails after the baseline and repaired executions have passed.

Results and preserved regression

All four combinations reproduce the same failure, F# first, then C#, each with SDK opt-in disabled/enabled. Eight genuine failed profile invocations have empty output. All four initial and four repaired Run controls pass.

Preserved in src/editors/vscode/src/test/suite/test-build-output.test.ts. The four tests are explicitly skipped by default, per the audit instruction. Set RUN_RELEASE_REGRESSIONS=1 to enable them in an extension-host test run. The scenario reuses existing MTP fixture writers, actual profile invocation helpers and the passive TestRun observer. It uses no local production runner/controller functions.

The audit ran the compiled test module through a separate extension-host harness against the unmodified released extension, rather than activating this checkout's implementation. Raw results are retained under target/codex1-release-v0330/vsix-build-output-enabled-results.json and vsix-build-output-enabled-vscode.log. All four failures are the intended output assertion with the actual pair of empty strings. TypeScript compilation, ESLint and formatting pass.

Lenguaje dominante
TypeScript
Estrellas
185
Forks
12
Merge medio
7 h 33 min
PR fusionados (30 d)
63

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin 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.

Más de Nimblesite/SharpLsp

Todos los issues de Nimblesite/SharpLsp

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.