Unify node abstractness idiom - #78
Merged
Merged
Conversation
FBActivity had zero methods and zero references anywhere in the image outside of being FBTask's superclass declaration. Verified via a full source-string scan across every class/metaclass selector in the image (not just SystemNavigation allReferencesTo:, which is unreliable for class bindings here), plus a grep across all sibling repos. FBTask now inherits directly from FBNode. Verified FBNode's exposedNodeClasses set is unchanged before/after, and FBNodeTest/ FBFlowTest/FluxBase-Core-Tests pass at the same rate as before the change (one pre-existing, unrelated FullBlockClosure>>#matches: error in FBFlowTest predates this change).
FBTask and FBWait now declare their own abstractness the same way FBEvent/FBGateway/FBSplitGateway/FBMergeGateway already do: isAbstract ^ self == FBTask (respectively FBWait), so subclasses are exposed in the product UI by default instead of needing an explicit override. Before this change, FBTask/FBWait had no isAbstract override at all and thus inherited FBNode's hardcoded `^ true`, meaning every direct subclass without its own override was hidden from FBNode class>>exposedNodeClasses regardless of self-identity. Verified empirically (in the live test image) that naively switching to the self == X idiom silently exposes 8 classes that are currently hidden by omission rather than by design: FBParallelNode, FBParallelJoinNode, FBPluggableTask, FBErrorTestTask, FBSystemErrorTestTask, FBTestTask, FBTestTaskWithBehavior, and FBWaitForCondition (which would have also dragged FBPluggableWait along since it inherits from FBWaitForCondition and has no override of its own). To preserve their current (hidden) UI-exposure exactly, each of these now carries an explicit `isAbstract ^ true` override: FBParallelNode, FBParallelJoinNode, FBPluggableTask, FBErrorTestTask, FBSystemErrorTestTask, FBTestTask, FBTestTaskWithBehavior (this repo), and FBWaitForCondition (whose subclass FBPluggableWait inherits the override and needs none of its own). Note: AGAddEntityTestTask (package ApptiveBase-Core, apptive-base repo) is also a direct FBTask subclass with no override that would be silently exposed by this change. That fix ships as a separate, companion commit in the apptive-base repo since it lives outside FluxBase. Verified FBNode class>>exposedNodeClasses returns the exact same set of classes before and after this change. Added FBNodeTest>>testTaskIsAbstractOnlyForTheBaseClass and FBNodeTest>>testWaitIsAbstractOnlyForTheBaseClass to protect the invariant going forward, mirroring the existing FBGatewayTest>>testGatewayIsAbstractOnlyForTheBaseClass pattern. Ran FBNodeTest (6/6 pass), FBGatewayTest and FBFlowTest (same single pre-existing, unrelated FullBlockClosure>>#matches: error as before this change, no new regressions).
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.
No description provided.