Skip to content

build(build-tools): migrate fluid-build to use build-infrastructure for repo layout#26878

Closed
tylerbutler wants to merge 2 commits into
microsoft:mainfrom
tylerbutler:fluid-build-use-build-infra
Closed

build(build-tools): migrate fluid-build to use build-infrastructure for repo layout#26878
tylerbutler wants to merge 2 commits into
microsoft:mainfrom
tylerbutler:fluid-build-use-build-infra

Conversation

@tylerbutler
Copy link
Copy Markdown
Member

Description

Migrates fluid-build from its internal FluidRepo/MonoRepo/Package classes (all marked @deprecated) to use @fluid-tools/build-infrastructure's BuildProject/IReleaseGroup/IPackage for repo layout discovery. Also adds a new flub build oclif command in build-cli as a thin wrapper around the build engine.

Architecture:

  • FluidRepoBuild now composes a BuildProject (via loadBuildProject) instead of extending FluidRepo
  • FluidBuildPackage wraps IPackage with build-specific state (matched, getLockFilePath, etc.)
  • Local structural types in buildInfraTypes.ts solve CJS/ESM interop (build-infrastructure is ESM-only, build-tools emits CJS)
  • The deprecated FluidRepo, MonoRepo, Package exports are preserved for backward compatibility

New flub build command:

  • All fluid-build flags mapped to oclif flags
  • Delegates to the same FluidRepoBuild engine
  • fluid-build binary continues to work during transition

Reviewer Guidance

The review process is outlined on this wiki page.

  • This is an early draft/proof-of-concept. The CJS/ESM interop approach (local structural types + dynamic import) works but is worth discussing — alternatives include adding a CJS build to build-infrastructure or converting build-tools to ESM.
  • The global options singleton from options.ts is still used by the build engine. The flub build command populates it via Object.assign before calling the engine. A future PR should thread options through BuildContext instead.
  • The flub build command has a minor cosmetic issue where positional package args may appear in the task name log line.
  • Tested manually: fluid-build and flub build both produce identical build results. All 137 existing tests pass.

…or repo layout

Replace fluid-build's internal FluidRepo/MonoRepo/Package classes with
build-infrastructure's BuildProject/IReleaseGroup/IPackage for repo layout
discovery. Add a new `flub build` oclif command in build-cli as a thin
wrapper around the build engine.

Key changes:
- FluidRepoBuild composes BuildProject instead of extending FluidRepo
- FluidBuildPackage wraps IPackage with build-specific state (matched, etc.)
- Local structural types in buildInfraTypes.ts for CJS/ESM interop
- New `flub build` command in build-cli with all fluid-build flags
- Deprecated FluidRepo/MonoRepo/Package exports preserved for backward compat
@tylerbutler tylerbutler self-assigned this Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (811 lines, 13 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

@tylerbutler tylerbutler deleted the fluid-build-use-build-infra branch May 14, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant