Skip to content

refactor(runtime): Remove scope open()#202

Merged
harrytmthy merged 1 commit into
mainfrom
refactor/remove-scope-opening-ritual
Apr 24, 2026
Merged

refactor(runtime): Remove scope open()#202
harrytmthy merged 1 commit into
mainfrom
refactor/remove-scope-opening-ritual

Conversation

@harrytmthy

Copy link
Copy Markdown
Owner

Summary

This PR removes Scope.open() from Stitch's runtime registration path, making scopes active immediately on creation while preserving close() semantics and ScopeClosedException.

Implementation Details

Runtime scopes now start in an active state, and scope registration happens during createScope() instead of through a separate open() step. This removes unnecessary ceremony, improves parity with Koin and Stitch's precompiled path, and simplifies README examples and runtime usage. Closed scopes still fail through ScopeClosedException, now with a clearer message that reflects the simplified lifecycle.

Closes #201

@harrytmthy harrytmthy added this to the 1.0.0 milestone Apr 24, 2026
@harrytmthy harrytmthy self-assigned this Apr 24, 2026
@harrytmthy harrytmthy added the refactor Internal code design/structure improvement label Apr 24, 2026
@harrytmthy harrytmthy enabled auto-merge (squash) April 24, 2026 15:25
@harrytmthy harrytmthy merged commit 6557661 into main Apr 24, 2026
1 check passed
@harrytmthy harrytmthy deleted the refactor/remove-scope-opening-ritual branch April 24, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Internal code design/structure improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Scope.open() from the runtime registration path

1 participant