ClojureScript

Register dumped specs fails

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: 1.9.908
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code
  • Approval:
    Accepted

Description

When specs that are dumped into analysis cache files are registered, this fails (with a swallowed ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.Map$Entry).

You can see evidence of this if you run script/noderepljs revised to set :verbose true: There is a spec, :cljs.spec.alpha/kvs->map, for which the code attempts to register, throws, with the file subsequently being re-analyzed anyway because the cache couldn't be loaded. The evidence is this being emitted by :verbose true:

Reading analysis cache for file:/Users/mfikes/Projects/clojurescript/src/main/cljs/cljs/spec/alpha.cljs
Analyzing file:/Users/mfikes/Projects/clojurescript/src/main/cljs/cljs/spec/alpha.cljs

At its core, it involves code like {{(merge {5 6} '([1 2] [3 4]))}}, which fails in Clojure.

Activity

Hide
Mike Fikes added a comment -

The patch revises it so at the bottom it involves a construct like {{(into {1 2, 3 4} '([1 7] [5 6]))}} which works in Clojure.

Show
Mike Fikes added a comment - The patch revises it so at the bottom it involves a construct like {{(into {1 2, 3 4} '([1 7] [5 6]))}} which works in Clojure.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: