feat(koin-exposed): add Koin bridge for TransactionalProxy auto-registration - #30
Merged
Conversation
…tration Add the koin-exposed module exposing applyTransactionalProxies(), a runtime post-processor that swaps Koin singleton definitions whose primary type implements exactly one @transactional interface with lazy TransactionalProxy factories, so consumers stop declaring proxy bindings manually. The module depends on exposed and the koin carrier, is documented in the root AGENTS.md, the architecture guide and its own AGENTS.md, and is tested against Koin 4.2.2 internal registry APIs (with the compiler plugin strict-safety flags scoped to this module's tests).
…ument casts Stop re-publishing the Koin BOM/core: koin-exposed now depends on the exposed module and the koin carrier with api(...) so consumers get exactly one Koin surface and the module only adds applyTransactionalProxies. Replace inline fully-qualified extension references with imports. Reduce unchecked casts to the unavoidable registry erasure points, each with a comment explaining why it is safe, and add explanatory comments on the non-obvious parts (scan-then- mutate, double-checked locking, drop delegation, qualifier fallback).
…tension, hoist test fixtures Replace api(project(...)) with implementation(...): consumers needing exposed or Koin declare those modules directly, so koin-exposed must not re-expose them. Import KoinGradleExtension at the top of the build script instead of using the fully-qualified name inline. Move every test fixture (interfaces and implementations) to the top of the parent test class, before the @nested groups, and encode the convention in the testing guide.
…sor comments Keep single-annotation declarations on one line (@volatile private var cached) and remove comments that restate trivial accessor chains: the function name already conveys the behavior. Encode both conventions in the code style guide.
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.
Add the
koin-exposedmodule exposingapplyTransactionalProxies(), a runtime post-processor that swaps Koin singleton definitions whose primary type implements exactly one@Transactionalinterface with lazyTransactionalProxyfactories.