MTP build preflight errors leave Test Results run output empty

Aperta
#574 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
185
Fork
12
Merge medio
7h 33m
PR unite (30g)
63

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Nimblesite/SharpLsp

Tutte le issue di Nimblesite/SharpLsp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.