Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FactoryDescription protocol #33

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft

Conversation

krevedkokun
Copy link
Collaborator

@krevedkokun krevedkokun commented Nov 2, 2024

fixes #28

@krevedkokun krevedkokun marked this pull request as draft November 2, 2024 09:07
krevedkokun and others added 3 commits November 9, 2024 21:44
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Mikhail Kuzmin <[email protected]>
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Mikhail Kuzmin <[email protected]>
src/darkleaf/di/core.clj Outdated Show resolved Hide resolved
darkleaf and others added 9 commits January 9, 2025 13:13
src/darkleaf/di/core.clj Outdated Show resolved Hide resolved
darkleaf and others added 2 commits January 10, 2025 12:40
Co-authored-by: Bogdan Tiet <[email protected]>
Co-authored-by: Nikita Domnitskii <[email protected]>
src/darkleaf/di/core.clj Outdated Show resolved Hide resolved
src/darkleaf/di/core.clj Outdated Show resolved Hide resolved
Comment on lines 147 to 163
:dependencies {`a+di-update-key#0-target :optional
`a+di-update-key#0-f :optional
`a+di-update-key#0-arg#0 :optional}
:description {::di/kind :middleware
:middleware ::di/update-key
:target `a
:f str
:args ["arg"]}}
{:key `a+di-update-key#0-target
:description {::di/kind :trivial
:object :obj}}
{:key `a+di-update-key#0-f
:description {::di/kind :trivial
:object str}}
{:key `a+di-update-key#0-arg#0
:description {::di/kind :trivial
:object "arg"}}]
Copy link
Collaborator

Choose a reason for hiding this comment

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

может как-то тут связи прописать, порядок обосновать 🤷

Copy link
Collaborator

@KGOH KGOH Jan 10, 2025

Choose a reason for hiding this comment

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

::di/update-key-synthetic-kind :target|:f|:arg 

Comment on lines +736 to +748
(let [val @variable]
(reify
p/Factory
(dependencies [_]
(p/dependencies val))
(build [_ deps]
(p/build val deps))
(demolish [_ obj]
(p/demolish val obj))
p/FactoryDescription
(description [_]
{::kind :variable
:variable variable}))))
Copy link
Owner

Choose a reason for hiding this comment

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

тут попал на регрессию, в var может быть reify от фабрики, это тоже нужно было учесть

Comment on lines +736 to +748
(let [val @variable]
(reify
p/Factory
(dependencies [_]
(p/dependencies val))
(build [_ deps]
(p/build val deps))
(demolish [_ obj]
(p/demolish val obj))
p/FactoryDescription
(description [_]
{::kind :variable
:variable variable}))))
Copy link
Owner

Choose a reason for hiding this comment

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

и вот тут тоже нужно если описание нет, то писать описание, а так можно же в reify внутри var положить с реализацией, и он вызываться не будет

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.

Inspect with meta
4 participants