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

Aberta
#111 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
build-system, testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
0
Forks
4
Merge médio
18h 41min
PRs com merge (30d)
48

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DiffCI/core

Todas as issues de DiffCI/core

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.