ClojureScript

result of eval-str callback no longer returned

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: 1.10.238
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Prior to 1.10.238 this code

(cjs/eval-str (cjs/empty-state) "(+ 1 1)" nil {:eval cjs/js-eval} (fn [x] (println x) x))

The callback would print the result map and then eval-str would return the result of the callback. Since 1.10.238 this code returns nil. While it is still possible to get at the result from the callback, the previous behaviour was convenient and the absence of a return value may break existing code.

Activity

Hide
Mike Fikes added a comment -
Show
Mike Fikes added a comment - This is not a defect. IIRC, the observed change in behavior is a result of https://github.com/clojure/clojurescript/commit/a1d49b536b714c16d2d6a292593662eba100dccb#diff-2de6ee5c159942f834b2dabed7c891b1

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: