Lift the target lifecycle interfaces into Fallout.Core (re-typed to ITargetModel)#13
Open
ChrisonSimtian wants to merge 1 commit into
Open
Conversation
f0c5d85 to
9abc17f
Compare
695dd96 to
e4df566
Compare
…TargetModel) Phase 1b of the de-statification groundwork: move the six target/build lifecycle listener interfaces down into Fallout.Core, re-typed from the live ExecutableTarget to the read-only Core projection ITargetModel. This is the ITargetLifecycleListener seam (SDK-6e) — plugins observe targets through the stable read-only view, not the mutable engine type. Moved to Core (grouped with IBuildExtension/IOnBuildFinished): - IOnBuildCreated, IOnBuildInitialized, IOnTargetSkipped, IOnTargetRunning, IOnTargetSucceeded, IOnTargetFailed — params ExecutableTarget -> ITargetModel. ExecutableTarget already implements ITargetModel, so callers (EventInvoker, the executor) pass targets unchanged: single targets upcast, and IReadOnlyCollection<T> is covariant so collections flow too. All ~21 implementers had their signatures re-typed; 19 needed only the type change, and 3 take a (ExecutableTarget) cast where they reach past the read-only surface: - GenerateBuildServerConfigurationsAttribute -> IConfigurationGenerator.Generate - TelemetryAttribute -> Telemetry.TargetSucceeded - InjectNonParameterValuesAttribute -> ExecutableTarget.DelegateRequirements Interfaces keep their Fallout.Common.Execution namespace -> no consumer edits, and they stay in the architecture naming-drift baseline by full name (no baseline change). IOnTargetSummaryUpdated stays in Build for now — it takes IFalloutBuild, which is a Phase 2 blocker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9abc17f to
597d40a
Compare
e4df566 to
3e0c70e
Compare
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.
Phase 1b of the de-statification / plugin-SDK groundwork. Moves the six target/build lifecycle listener interfaces into
Fallout.Core, re-typed from the liveExecutableTargetto the read-only Core projectionITargetModel— theITargetLifecycleListenerseam (SDK-6e). Plugins observe targets through the stable read-only view, not the mutable engine type.Moved to Core (grouped with
IBuildExtension/IOnBuildFinished)IOnBuildCreated,IOnBuildInitialized,IOnTargetSkipped,IOnTargetRunning,IOnTargetSucceeded,IOnTargetFailed— paramsExecutableTarget→ITargetModel.Why it's safe
ExecutableTargetalready implementsITargetModel, so callers are unchanged: single targets upcast;IReadOnlyCollection<T>is covariant so collections flow too. Build was green on the first pass after the re-type.All ~21 implementers had signatures re-typed — 19 needed only the type change (they use
ITargetModelmembers or ignore the param). 3 take a(ExecutableTarget)cast where they legitimately reach past the read-only surface:GenerateBuildServerConfigurationsAttributeIConfigurationGenerator.Generate(stillExecutableTarget)TelemetryAttributeTelemetry.TargetSucceededInjectNonParameterValuesAttributeExecutableTarget.DelegateRequirementsNamespaces preserved (
Fallout.Common.Execution) → no consumer edits; already in the naming-drift baseline → no baseline change.Deliberately left for Phase 2
IOnTargetSummaryUpdatedstays in Build — it takesIFalloutBuild, which needs Core-safe abstractions (AbsolutePath/Host/Partition) first.Verification
fallout.slnxbuild: 0 errors.🤖 Generated with Claude Code