Repository navigation
Conversation
Extract only the generic BuildTargetsResult and project metadata transport from Mike Haas�s test-splitting proposal in nrwl#36527 (original transport commit 9d2d169). Keep ordinary target generation and null-omission serialization unchanged. No group producer or test-splitting behavior is included. Co-authored-by: Mike Haas <mikehaas763@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cover named groups and member order in JSON, metadata pass-through with and without user target overrides, and unchanged group-less analyzer output. No production group generator or test hook is introduced. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
👷 Deploy request for nx-dev pending review.Visit the deploys page to approve it
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
The .NET analyzer returns only target definitions from
TargetBuilder.BuildTargets. Its project metadata cannot carry Nx's existing named target groups.Mike Haas (@mikehaas763) introduced the generic transport in #36527 as part of his test-splitting feature. The framework-variant work in #36680 also needs that transport, as described in #36680 (comment).
Expected Behavior
This proposes extracting only that small, shared transport so the two features can consume it independently:
BuildTargetsResultcontaining the existingTargetsand optional namedTargetGroups.ProjectMetadata.TargetGroupstometadata.targetGroups, using Nx's existing group-name-to-ordered-target-names shape.targetGroupswhen no groups exist, using the analyzer's existing null-omission and camel-case serialization.Multiple named groups can coexist in the same result. No group producer, default groups, composition framework, or new plugin option is introduced. The TypeScript create-nodes path already preserves this metadata and needs no production change.
This does not include test discovery/splitting, source-hash caching, framework/runtime variants,
variantOf, or.envbehavior. It does not complete either downstream feature.The generic transport is adapted from Mike's work, with original contributor credit retained in the implementation commit. This is a proposed extraction, not an agreed replacement for his feature. If this merges first, #36527 can rebase and reuse the shared transport.
Validation:
pnpm nx run-many -t test,build,lint,typecheck -p dotnet,MsbuildAnalyzer,MsbuildAnalyzer.Tests --output-style=staticpassed (143 analyzer tests and 71 plugin tests, including serialization, group coexistence/member order, create-nodes pass-through, and group-less compatibility).pnpm nx run dotnet:format-native --output-style=staticpassed.pnpm nx prepush --output-style=staticpassed.pnpm nx affected -t build,test,lint --base=7c8e7070e404fba91954a51e932cea3e86970b69 --output-style=staticpassed; four affected projects and 460 dependency tasks, including affected documentation builds.docker info --format '{{.ServerVersion}}'cannot connect to the Docker daemon, andyarn --versionreports command not found. The existing analyzer process/MSBuild smoke tests passed; these are not a substitute for the full e2e suite.Related Issue(s)