feat: add Nx shadow build system alongside fluid-build#26718
Draft
tylerbutler wants to merge 11 commits intomicrosoft:mainfrom
Draft
feat: add Nx shadow build system alongside fluid-build#26718tylerbutler wants to merge 11 commits intomicrosoft:mainfrom
tylerbutler wants to merge 11 commits intomicrosoft:mainfrom
Conversation
Add project.json files to all build-tools packages to override orchestrator tasks (build, build:compile, compile, lint, build:commonjs) with nx:noop executor. This prevents NX from invoking fluid-build when running shadow builds. Add plans/nx-shadow-build-guide.md documenting the step-by-step process for standing up a shadow NX build in any release group, including task classification, cache input/output configuration, and lessons learned from the build-tools pilot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Client-utils uses custom build:exports:browser/node scripts instead of api-extractor:esnext/commonjs, breaking several nx dependency chains. Added per-target dependsOn overrides for build:exports, build:test, check:exports, build:api-reports, and ci:build:api-reports targets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tions Mirror fluidBuild.tasks overrides from package.json into NX project.json files to ensure the NX shadow build has correct dependency chains. Fixes applied across 17 packages in several categories: - Cross-package deps (sequence, test-dds-utils, tree, local-server-stress-tests) - Custom build pipeline (presence: tsc:main/experimental, build:esnext:main/experimental) - Test-only packages (azure-client, odsp-client, local-server-tests, test-end-to-end-tests) - Broken check:exports chains (devtools-view, example-utils, test-version-utils, test-loader-utils, test-pairwise-generator) - Webpack chains (bundle-size-tests, webpack-fluid-loader) - Non-standard targets (core-interfaces: build:test:esm:no-exactOptionalPropertyTypes) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
build-tools, server/routerlicious, server/gitrest, and server/historian are separate pnpm workspaces with their own nx.json. Without .nxignore, the root `nx run-many` discovers their packages and tries to build them.
Add missing rollup .d.ts outputs to api-extractor cache config so generated entrypoint files survive cache restore. Add upstream build deps (^tsc, ^build:esnext, ^api) to eslint target so packages without a compile target still wait for dependency compilation.
- Remove `lib/` from `tsc` outputs since it only writes CJS to `dist/` - Remove `_api-extractor-temp` from api-extractor outputs to prevent conflicts between commonjs and esnext targets - Add inputs/outputs to build:api-reports, build:docs, ci:build:docs, ci:build:api-reports, build:copy, and layerGeneration:gen targets - Use directory glob `api-extractor/**` instead of flat `api-extractor*.json` for more precise input matching - Add nx-mcp server configuration
Add inputs to check:exports, check:exports:bundle-release-tags, check:release-tags, check:are-the-types-wrong, build:readme, and build:manifest targets. Without explicit inputs Nx falls back to hashing all project files, causing unnecessary cache misses when unrelated files change.
Contributor
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
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.
Summary
nx.jsonconfiguration at both the repo root (client) andbuild-tools/with task dependency graphs, named inputs, cache settings, and target defaults that mirror the existing fluid-build task graphproject.jsonfiles across all packages to override orchestrator tasks (e.g.build,compile,lint) withnx:noop, preventing Nx from invoking fluid-build scripts while letting executor tasks (e.g.tsc,eslint,test:mocha) run their real commandsfluidBuild.tasks(e.g.client-utils,presence,tree,sequence,test-end-to-end-tests) to ensure Nx task prerequisites match fluid-build behaviornx:*convenience scripts to rootpackage.jsonfiles for running Nx commands (nx:build,nx:tsc,nx:affected:build,nx:graph, etc.)nxand@nx/js/@nx/workspaceas dev dependencies; updates pnpm lockfilesdocs/nx-migration-plan.mdandbuild-tools/plans/nx-shadow-build-guide.md.nx/to.gitignoreand.nxignorefor cache and build-tools exclusions