Repository navigation
Closed
Labels
enhancementNew feature or request
Milestone
Description
Part of the v11 internal-foundation workstream. See docs/roadmap.md and milestone #6.
Goal
Introduce Microsoft.Extensions.DependencyInjection inside the build orchestrator. Set up a composition root that registers default implementations of every infrastructure interface (file system, process runner, console host, etc.) and resolves them via constructor injection.
Consumer-facing API stays identical — Execute<T>() is still the static entrypoint; internally it builds the ServiceProvider, registers defaults, runs the orchestrator.
Scope
- Add
Microsoft.Extensions.DependencyInjectiontoDirectory.Packages.props. - Create a
BuildHostBuilderthat produces a configuredIServiceProviderper build invocation. Lives inFallout.Build. - Register defaults for the interfaces from [Foundation] Wrap IO/process/console statics behind injectable interfaces #91 —
IFileSystem,IProcessRunner,IConsoleHost,IBuildStatePersistence. - Plumb the
IServiceProviderthroughBuildExecutor,ExecutionPlanner,ParameterService. Replace direct static calls with resolved dependencies. - Keep static facades (
ProcessTasks.StartProcess,AbsolutePath.*) as default wrappers that resolve their dependency from a per-build ambient context (AsyncLocal<IServiceProvider>or similar). Statics on the surface, DI underneath.
Verification
BuildExecutorunit tests can now pass a fakeIProcessRunnerand assert it was invoked as expected. Add at least one as proof../build.ps1still runs end-to-end with no behavioral changes.- No
IServiceCollection.AddSingleton<T>call reaches intoFallout.Commoninternals — registration is shaped against the interfaces only.
Out of scope (tracked separately)
- The interfaces themselves (
IFileSystemetc.) — [Foundation] Wrap IO/process/console statics behind injectable interfaces #91. - Replacing the static
BuildManagerwith an instance type — [Foundation] Replace BuildManager statics with instance BuildOrchestrator #90. - Exposing DI registration as a public plugin extension point — v12.
Blocks
- [SDK-7] Promote IBuildMiddleware / IBuildOrchestrator from internal to SDK-public #157 — [SDK-7] Promote IBuildMiddleware / IBuildOrchestrator from internal to SDK-public
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
ChrisonSimtian commentedon Jun 16, 2026
Superseded by the [Foundation] FT-* series (epic #315), which re-decomposes this engine-foundation work with file:line findings and an explicitly backwards-compatible, facade-preserving scope (vs. the obsolete v11 "breaking" framing here). Tracked going forward by: #307 (BuildContext) + #308 (facades) — the lightweight ambient-context approach replaces a full DI container. Closing to avoid double-counting milestone #6.