File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 19301930; ; useful for detecting cycles.
19311931; ; copied to malli.generator
19321932(defn- -identify-ref-schema [schema]
1933- ; ; TODO mr/-schemas doesn't seem reliable, making defn private for now.
1934- ; ; a better approach would be to accumulate a 'seen' map from name => ?schema
1935- ; ; and if we expand the same name again with the same seen map, it's a cycle.
1933+ ; ; TODO mr/-schemas doesn't seem right, making defn private for now.
1934+ ; ; e.g., we only care about property registry entries, not schema constructors.
1935+ ; ; a better approach might be to accumulate a 'seen' map from name => ?schema
1936+ ; ; that we add to every time we deref a ref, and if we expand the same name again
1937+ ; ; with the same seen map, it's a cycle.
19361938 {:scope (-> schema -options -registry mr/-schemas)
19371939 :name (-ref schema)})
19381940
You can’t perform that action at this time.
0 commit comments