Uploaded image for project: 'ClojureScript'
  1. CLJS-2955

Self-host: spec check macro compile-time expansion

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: None
    • Labels:
    • Approval:
      Accepted
    • Patch:
      Code and Test

      Description

      If you add the following test code to the cljs.spec.test-test namespace, you'll see that it works just fine in JVM ClojureScript:

      (defn foo-1234 [n] "ret")
      
      (s/fdef foo-1234
        :args (s/cat :n number?)
        :ret string?)
      
      (deftest check-compile-time
        (is (seq (stest/check `foo-1234))))
      

      But, in script/test-self-parity, you'll get a failure

      FAIL in (check-compile-time) (at cljs/test.js:429:14)
      expected: (seq (stest/check (quote cljs.spec.test-test/foo-1234)))
        actual: (not (seq []))
      

        Attachments

          Activity

            People

            • Assignee:
              mfikes Mike Fikes
              Reporter:
              mfikes Mike Fikes
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: