-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: master
Are you sure you want to change the base?
Conversation
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]>
19017d7
to
93724f2
Compare
Co-authored-by: Gleb Eliseev <[email protected]>
901d1a9
to
cc7c9d5
Compare
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Gleb Eliseev <[email protected]>
Co-authored-by: Bogdan Tiet <[email protected]>
Co-authored-by: Nikita Domnitskii <[email protected]>
Co-authored-by: Bogdan Tiet <[email protected]> Co-authored-by: Nikita Domnitskii <[email protected]>
: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"}}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может как-то тут связи прописать, порядок обосновать 🤷
There was a problem hiding this comment.
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
(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})))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут попал на регрессию, в var может быть reify от фабрики, это тоже нужно было учесть
(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})))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
и вот тут тоже нужно если описание нет, то писать описание, а так можно же в reify внутри var положить с реализацией, и он вызываться не будет
fixes #28