Nx adapter: read the Nx project graph and run through Nx (tracking issue)

Offen
#111 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

Start with src/ci-inference/resolve.ts and src/planner/test-command.ts, then review the tracked work in issues #112–#114. The issue describes reading Nx's project graph, selecting targets, and planning nx run-many commands, but leaves the implementation and public workspace validation as multi-step design work. Done means checks are covered, selected projects are compared with nx affected, and Nx cache hits remain intact.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

adapter enhancement help wanted

DiffCI should work alongside Nx, not instead of it. In a repository with Nx installed, DiffCI reads Nx's project graph, adds the file-level and check edges Nx doesn't model, and hands execution back to Nx. Nx's task runner and cache still decide what actually runs.

Today. Core treats nx as an opaque wrapper (src/ci-inference/resolve.ts). A root test script that calls nx is assumed to run every package, and the plan refuses when a package can't be narrowed (src/planner/test-command.ts, runsWorkspaceScripts). nx.json is never read as data.

Plan

  • Map files and test files to Nx projects from nx graph (#112)
  • Select a project's target when a changed file matches its Nx inputs / namedInputs (#113)
  • Plan nx run-many commands for the selected projects (#114)
  • Docs: using DiffCI in an Nx workspace (extends #101)

Principles

  • Nx's edges only add reach. They never remove an edge DiffCI's own graph found.
  • The default command is project-level (nx run-many -t test -p a,b), so Nx's cache keys don't change. File-level runs (nx run a:test -- <files>) change the task hash and are only for the agent's pre-push loop.
  • If DiffCI's plan and Nx's cache disagree, the cache decides whether a task runs. DiffCI only narrows or explains.
  • When Nx can't produce a graph, DiffCI falls back to the full suite and says why.

Success. On a public Nx workspace with inferred targets: checks covered before the push, projects run compared with nx affected, and Nx cache hits left intact.

Out of scope: replacing Nx's cache, distributed execution or sharding.

Vorherrschende Sprache
TypeScript
Sterne
0
Forks
4
Ø Merge
18 Std. 41 Min.
Gemergte PRs (30 T.)
48

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DiffCI/core

Alle Issues in DiffCI/core

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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