Skip to content

Conversation

@darkleaf
Copy link
Owner

No description provided.

@darkleaf darkleaf requested review from KGOH and krevedkokun July 10, 2025 09:08
Comment on lines +227 to +241
(t/deftest side-dependency-test
(defn- side-dependency
{::di/kind :component}
[{calls ::calls}]
(swap! calls inc)
:ok)

(let [calls (atom 0)
mem (di/->memoize {::param :param
::calls calls}
(di/add-side-dependency `side-dependency))]
(di/start `a mem)
(di/start `a mem)
(t/is (= 2 @calls))
(di/stop mem)))
Copy link
Owner Author

@darkleaf darkleaf Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

с другой стороны, как раз затеяли memoize, чтобы не запускать side-dependency

@darkleaf darkleaf marked this pull request as draft July 10, 2025 11:45
@darkleaf darkleaf removed request for KGOH and krevedkokun July 10, 2025 11:45
@darkleaf darkleaf closed this Aug 29, 2025
@darkleaf darkleaf deleted the side-dependency-and-memoize branch August 29, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants