-
- Downloads
Fix flaky json test (#29048)
Occasionally in CI we get ``` “Syntax error compiling at (release/version_info_test.clj:46:26).\nNo such var: json/read-json\n”, ``` from `release.version-info-test`. This namespace requires `[clojure.data.json :as json]` and uses the function `json/read-json` which is deprecated since version 2.x. The way that deprecated function is defined in version 2.0.2 is ```clojure (ns clojure.data.json) ... (load "json_compat_0_1") ``` and in `clojure/data/json_compat_0_1.clj`: ```clojure (in-ns 'clojure.data.json) (defn read-json "DEPRECATED; replaced by read-str. ...) ``` And I guess the way that hawk requires some namespaces we can get into this half loaded, half not finished state and the var is not (yet) defined. So we can just put aside this nonsense and use a non-deprecated var that isn't defined with a `load` statement but in the regular namespace we require.
Please register or sign in to comment