Decentralize domain registration via canopyRegister, verify canopyBra… - #21
Merged
Conversation
…nch for instances Addresses the "Registrierungsmechanismus" backlog item's two open cases, discussed and scoped down with Norbert (a full automatic PragmaCollector- based scan was explicitly rejected - no real use case for discovering self-registering classes, and the set of singleton/class contributors will always be small and known): Singletons/classes: each contributing class now owns a simple canopyRegister class method (VirtualMachine, Process, File, ExternalSemaphoreTable, SmalltalkImage, CanopyZincCounter) instead of the knowledge living centrally in Canopy class>>systemMetrics/zincMetrics (both removed). registerImageMetrics/registerVirtualMachineMetrics/registerZincMetrics now just delegate to the relevant class(es)' canopyRegister. New classes can register themselves without ever touching Canopy class. Arbitrary composed instances: no new mechanism needed - the existing <canopyBranch> pragma (previously only demonstrated via Dictionary>>canopyBranch:) already lets any composed instance wire in its own sub-components via aBuilder at:addMapping:, and canopyMapping already builds the full nested tree from that. Added a demonstration (CanopyComposedAppExample/CanopyComposedSubComponent + testComposedInstanceRegistersAsDomainViaCanopyBranch) proving a composed instance registers correctly as a Canopy domain via registerDomainNamed:with:, fullKey resolving correctly two levels deep. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
…nch for instances
Addresses the "Registrierungsmechanismus" backlog item's two open cases, discussed and scoped down with Norbert (a full automatic PragmaCollector- based scan was explicitly rejected - no real use case for discovering self-registering classes, and the set of singleton/class contributors will always be small and known):
Singletons/classes: each contributing class now owns a simple canopyRegister class method (VirtualMachine, Process, File, ExternalSemaphoreTable, SmalltalkImage, CanopyZincCounter) instead of the knowledge living centrally in Canopy class>>systemMetrics/zincMetrics (both removed). registerImageMetrics/registerVirtualMachineMetrics/registerZincMetrics now just delegate to the relevant class(es)' canopyRegister. New classes can register themselves without ever touching Canopy class.
Arbitrary composed instances: no new mechanism needed - the existing pragma (previously only demonstrated via Dictionary>>canopyBranch:) already lets any composed instance wire in its own sub-components via aBuilder at:addMapping:, and canopyMapping already builds the full nested tree from that. Added a demonstration (CanopyComposedAppExample/CanopyComposedSubComponent + testComposedInstanceRegistersAsDomainViaCanopyBranch) proving a composed instance registers correctly as a Canopy domain via registerDomainNamed:with:, fullKey resolving correctly two levels deep.