microsoft / microsoft/react-native-windows

Native-API reference docs no longer regenerated - UpdateNativeApiDocs.ps1 broken since #15848 (WinRT API docs artifacts retired)

Offen
#16,355 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug Documentation Invalid Triage
Vorherrschende Sprache
C++
Sterne
17.3k
Forks
1.2k
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
33

Beschreibung

Summary

The website's Native-API reference (the "Microsoft.ReactNative APIs" pages under docs/native-api / websitev2/.../native-api) is auto-generated from Microsoft.ReactNative.winmd via winmd2md.exe, then integrated by react-native-windows-samples/.github/scripts/UpdateNativeApiDocs.ps1.

That script can no longer be run: it downloads two CI build artifacts — WinRT Api docs - Universal Build X64Debug-1 (Old Arch) and … X64DebugFabric-1 (New Arch) — but the pipeline step that produced them was removed in react-native-windows #15848 "Unified CI/PR Pipeline" (merged 2026-03-25). The deleted step lived in .ado/jobs/universal.yml:

winmd2md.exe /experimental /outputDirectory vnext\target\winmd2md ...\Microsoft.ReactNative.winmd
displayName: "Generate WinRT API docs"
artifactName: 'WinRT API docs - $(Agent.JobName)-$(System.JobAttempt)'

Because this removal predates both 0.84-stable and 0.85-stable, neither release regenerated the native-api docs. Instead, the existing (last genuinely generated ~0.80-era, e.g. samples #1086 / #1120) docs are simply carried/versioned forward each release (0.84 via #1263, 0.85 via #1292). As a result the published native-api reference can drift from the actual shipped WinRT API surface.

Impact

  • Native-API reference docs may be stale relative to the current API surface (missing/renamed types, new members, arch badges not reflecting reality).
  • The documented release step "Do a pass on API Docs using UpdateNativeApiDocs.ps1" is currently a no-op / version-snapshot only, not a real refresh.

What needs to happen (options)

  1. Restore doc generation in the unified pipeline — re-add the winmd2md "Generate WinRT API docs" step (both X64Debug and X64DebugFabric) to the current .ado/jobs/universal-single.yml (or wherever appropriate) so the WinRT API docs … artifacts are published again. Then UpdateNativeApiDocs.ps1 -BuildId <N> works as before.
  2. Or provide a local/one-shot generation path (run winmd2md.exe against a locally built Microsoft.ReactNative.winmd for both architectures) and adapt the script to consume local folders instead of ADO artifacts.
  3. Update UpdateNativeApiDocs.ps1 for the current site layout — it currently targets the legacy Docusaurus v1 paths (docs/native-api + website/sidebars.json); confirm/port to websitev2 as needed.

References

  • Removal commit: react-native-windows #15848 "Unified CI/PR Pipeline" (2026-03-25) — deleted .ado/jobs/universal.yml incl. the "Generate WinRT API docs" step.
  • Script: react-native-windows-samples/.github/scripts/UpdateNativeApiDocs.ps1
  • Last real regeneration precedent: samples #1086 (0.80), #1120 (2025-12-24).
  • Carried-forward-only releases: 0.84 (#1263), 0.85 (#1292).
  • Surfaced during 0.85 release validation (#16312, "Do a pass on API Docs…").

Type / severity

Tech-debt / documentation infrastructure. Not a release blocker (docs still build and are versioned), but should be fixed so future releases publish accurate native-api docs.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit react-native-windows-samples/.github/scripts/UpdateNativeApiDocs.ps1 und der aktuellen .ado/jobs/universal-single.yml und vergleiche sie anschließend mit dem entfernten Generierungsschritt aus .ado/jobs/universal.yml. Überprüfe, wie die Artefakte X64Debug und X64DebugFabric erzeugt werden und ob das Skript weiterhin docs/native-api als Ziel verwendet oder websitev2 nutzen muss. Als erledigt gilt die Aufgabe, wenn ein reproduzierbarer Generierungspfad während der Release-Validierung aktuelle native-api-Seiten erzeugt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, yaml
Bereich
build-system, ci-cd, documentation
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.