Replies: 12 comments 16 replies
-
Dear Kim, as per the other conversation, I am attaching my config here and I will append all the pieces of code that seem to have diff with Thanks for all your work and I hope it won't be too much 😄 |
Beta Was this translation helpful? Give feedback.
-
This line is exactly 100 chars (which is my width limit)
It now gets split, it was not before. - (sut/register-socket right-skt-with-wrong-topic-with-args [wrong-topic-with-args])
+ (sut/register-socket right-skt-with-wrong-topic-with-args
+ [wrong-topic-with-args]) I have many instances of the same behavior. EDIT: maybe now it's correct and the bug was present before? |
Beta Was this translation helpful? Give feedback.
-
The following form is reformatted: (t/deftest require-jwt-token-authentication
(t/testing "returns 401 Unauthorized with invalid JWT claims"
(let [opts {:auth {:iss "adf" :secret "qwer"}}
interceptor (sut/require-jwt-token-authentication opts)]
(t/is (= 401
(->> interceptor
(tu/execute-interceptors {:request {:headers {"authorization" "Bearer X"}}})
:response
:status)))))) to (t/deftest require-jwt-token-authentication
(t/testing "returns 401 Unauthorized with invalid JWT claims"
(let [opts {:auth {:iss "adf" :secret "qwer"}}
interceptor (sut/require-jwt-token-authentication opts)]
(t/is
(= 401
(->> interceptor
(tu/execute-interceptors {:request {:headers {"authorization" "Bearer X"}}})
:response
:status)))))) |
Beta Was this translation helpful? Give feedback.
-
The following form is reformatted (see (defn on-integration-added
[]
(interceptors/interceptor
{:name ::on-integration-added
:enter
(fn [ctx]
{:pre [(contains? ctx ::service-integration)]}
(let [socket-id (-> ctx
:transport/socket
:id)
service-integration (::service-integration ctx)
added-event (service-integration-added-event service-integration)]
(-> ctx
(results/declare-result (results/make-ok "Integration added."
{:service-integration service-integration}))
(broadcasts/add-broadcast (broadcasts/broadcast-others added-event socket-id)))))})) to (defn on-integration-added
[]
(interceptors/interceptor
{:name ::on-integration-added
:enter (fn [ctx]
{:pre [(contains? ctx ::service-integration)]}
(let [socket-id (-> ctx
:transport/socket
:id)
service-integration (::service-integration ctx)
added-event (service-integration-added-event service-integration)]
(-> ctx
(results/declare-result (results/make-ok "Integration added."
{:service-integration
service-integration}))
(broadcasts/add-broadcast (broadcasts/broadcast-others added-event
socket-id)))))})) |
Beta Was this translation helpful? Give feedback.
-
The following reformats and I would really love to keep the map on two lines here (haven't customized it yet but was about to): (defn- find-all
[{:keys [crux]}]
(let [crux-node (:node crux)
all (-> (crux/db crux-node)
(crux/q '{:find [(pull md [*])]
:where [[md :xxxxxxx/type :measurement-definition]]}))
xf (comp (map first) (map mapper.measurement-definition/crux-entity->model))]
(into [] xf all))) to (defn- find-all
[{:keys [crux]}]
(let [crux-node (:node crux)
all (-> (crux/db crux-node)
(crux/q
'{:find [(pull md [*])] :where [[md :xxxxxxx/type :measurement-definition]]}))
xf (comp (map first) (map mapper.measurement-definition/crux-entity->model))]
(into [] xf all))) |
Beta Was this translation helpful? Give feedback.
-
While I could live with the above ones, this is a bit odd: (defn- find-by-id
[{:keys [crux]} id]
(let [crux-node (:node crux)
md (crux/q (crux/db crux-node)
'{:find [(pull md [*])]
:in [md-id]
:where [[md :cohesic/type :measurement-definition] [md :crux.db/id md-id]]
:limit 1}
id)]
(-> md
ffirst
mapper.measurement-definition/crux-entity->model))) to (defn- find-by-id
[{:keys [crux]} id]
(let
[crux-node (:node crux)
md
(crux/q
(crux/db crux-node)
'{:find [(pull md [*])]
:in [md-id]
:where [[md :cohesic/type :measurement-definition] [md :crux.db/id md-id]]
:limit 1}
id)]
(-> md
ffirst
mapper.measurement-definition/crux-entity->model))) The former imho reads a lot better. I wonder if it keeps width into consideration here, cause there are plenty of chars to 100 and it seems to squeeze things unnecessarily. I have many instances of this, all around crux queries. |
Beta Was this translation helpful? Give feedback.
-
The following (defn- find-reference-range-and-set*
"Reverse join a reference range in order to navigate to its ancestors.
Return a reference range Crux entity."
[repository reference-range-id]
(some-> (get-in repository [:crux :node])
(crux/db)
(crux/q
'{:find
[(pull ?e [* {(:reference-range-set/_reference-ranges {:cardinality :one}) [*]}])]
:in [?id]
:where [[?e :cohesic/type :reference-range] [?e :crux.db/id ?id]]}
reference-range-id)
not-empty
ffirst)) to (defn- find-reference-range-and-set*
"Reverse join a reference range in order to navigate to its ancestors.
Return a reference range Crux entity."
[repository reference-range-id]
(some->
(get-in repository [:crux :node])
(crux/db)
(crux/q
'{:find [(pull ?e [* {(:reference-range-set/_reference-ranges {:cardinality :one}) [*]}])]
:in [?id]
:where [[?e :cohesic/type :reference-range] [?e :crux.db/id ?id]]}
reference-range-id)
not-empty
ffirst)) |
Beta Was this translation helpful? Give feedback.
-
The following seems to be a better behavior but reporting it here for completeness: (extend-protocol interface.event-bus/Publisher
nil
(publish [_ event]
(logging/warn "Publisher received nil payload, not publishing."
(some->> event
:id
(hash-map :event-id))))) to (extend-protocol interface.event-bus/Publisher
nil
(publish [_ event]
(logging/warn "Publisher received nil payload, not publishing."
q (some->> event
:id
(hash-map :event-id))))) |
Beta Was this translation helpful? Give feedback.
-
The following seems to reformat because of the (defn selected-protocol-for-indications
[{:keys [spec]} procedure-id indications]
(->> {:procedure-id procedure-id :indications indications}
(sql/op spec queries :selected-protocol-for-indications)
(map :protocol-id))) to (defn selected-protocol-for-indications
[{:keys [spec]} procedure-id indications]
(->> {:procedure-id procedure-id
:indications indications}
(sql/op spec queries :selected-protocol-for-indications)
(map :protocol-id))) |
Beta Was this translation helpful? Give feedback.
-
I am happy to add Note that git tags for |
Beta Was this translation helpful? Give feedback.
-
FWIW we bumped to |
Beta Was this translation helpful? Give feedback.
-
Thanks for working with me extra on this release. It would have been a real mess if you hadn't tried out the alpha and reported all of the issues that you found. The extra effort on your part made what I hope will be a successful release possible! |
Beta Was this translation helpful? Give feedback.
-
The 1.2.0 release is coming along, and is almost complete except for one more (possible) additional feature and whatever bug fixes come up in the coming couple of weeks. These two Graal-vm binaries have passed all of the tests on which they have been tried, but there is some additional testing usually done prior to a release that hasn't been performed on these two binaries. Only the graal-vm binaries and uberjar are included in this alpha -- the library is not included and has not been uploaded to clojars. In addition, the corresponding sources have not yet been pushed to GitHub. The cljdoc documentation has not yet been updated as well.
This discussion was created from the release zprint-filter-1.2.0-alpha1.
Beta Was this translation helpful? Give feedback.
All reactions