Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[plugins]
[alias]
clojure = "https://github.com/asdf-community/asdf-clojure.git"
[tools]
java = "graalvm-22.3.1+java11"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
This is a history of changes to k13labs/clara-rules.

# 1.5.1
* do not break inspection if no accumulated facts are found

# 1.5.0
* revert thread local use and replace with dynamic vars for safely using virtual threads.
* upgrade deps, update infinite loop tests with latest futurama library.
Expand Down
7 changes: 5 additions & 2 deletions src/main/clojure/clara/rules/engine.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1381,8 +1381,11 @@
;; This being the case, we can use the downstream token to find out what binding key-value pairs were used
;; to create the token "stream" of which it is part.
(let [join-bindings (-> token :bindings (select-keys (get-join-keys this)))
fact-bindings (-> token :bindings (select-keys new-bindings))]
(first (mem/get-accum-reduced memory this join-bindings (merge join-bindings fact-bindings))))))
fact-bindings (-> token :bindings (select-keys new-bindings))
accum-reduced (mem/get-accum-reduced memory this join-bindings (merge join-bindings fact-bindings))]
(if (not= accum-reduced ::mem/no-accum-reduced)
(first accum-reduced)
[]))))

(defn- filter-accum-facts
"Run a filter on elements against a given token for constraints that are not simple hash joins."
Expand Down