Open
Description
Def-rules-test currently silently ignores session definitions that don't come in tuples of 3. So for example:
(def-rules-test example-test
{:rules [my-rule ...]
:sessions [empty-session [my-rule]]}
This will compile but no empty-session will be created. The reason for this is that the implementation uses partition with n=3 and items not fitting into multiples of three are simply discarded.
clara.test-rules> (partition 3 [:a :b])
()
clara.test-rules> (partition 3 [:a :b :c :d])
((:a :b :c))
It would be better to throw an exception and fail to compile if the number of items in the :sessions vector is not a multiple of 3. For reference, the expected input form is
{:sessions [session-name production-names-vec session-options]}