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

Ouverte
#111 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
0
Forks
4
Merge moyen
18 h 41 min
PR mergées (30 j)
48

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DiffCI/core

Toutes les issues de DiffCI/core

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.