hyperfiddle / rcf

RCF – a REPL-first, async test macro for Clojure/Script
MIT License
279 stars 12 forks source link

Babashka test runner #71

Closed borkdude closed 1 year ago

borkdude commented 1 year ago

The test runner is currently using a dev version of babashka which implements some previous special-forms as macros.

borkdude commented 1 year ago

I skipped some test namespaces due to the incompatibility with missionary:

Message:  Unable to resolve classname: org.reactivestreams.Publisher
Location: missionary/impl.clj:2:3
borkdude commented 1 year ago

I'm sorry that I made some unnecessary whitespace changes as a result of activating the formatter in my editor. I can revert those if you want.

borkdude commented 1 year ago

@dustingetz I released a new version of babashka and used that in the tests. PR should be good to go from my side.

pmbauer commented 1 year ago

Locally, I've used a version of RCF and babashka with this pull applied. Any blockers to getting it merged?

dustingetz commented 1 year ago

I attempted to merge today, there is a conflict with this commit: https://github.com/hyperfiddle/rcf/commit/2d1ef6fac0c980d79a3ebf39c31a7c0226391211

@borkdude can you quickly spot the issue? I will take a closer look later, gtg

I f'ed up the PR, sorry, i guess i force pushed the wrong thing. Master currently has babashka support merged and pushed, but fails CI in babashka due to the conflict, which is a correct error (I bisected)

dustingetz commented 1 year ago
rcf git:(babashka-dustin4) ./ci/run_tests_bb.sh
Running Babashka tests
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Method getName on class sci.lang.Namespace not allowed!
Data:     {:type :sci/error, :line 20, :column 1, :file "/Users/dustin/src/hf/rcf/test/hyperfiddle/rcf_test.cljc"}
Location: /Users/dustin/src/hf/rcf/test/hyperfiddle/rcf_test.cljc:20:1
Phase:    macroexpand

----- Context ------------------------------------------------------------------
16:                     :form4 (quote (inc 1)) ; interpreted as if evaluated after code emission  
17:                     :form5 (quote (quote (inc 1))) ; escaping interpretation
18:                     )))
19: 
20: #?(:clj
    ^--- Method getName on class sci.lang.Namespace not allowed!
21:    (tests
22:      "Custom var meta on def symbol are interpreted as if they were evaluated after emission."
23:      ;; CLJ only, no vars in cljs.
24:      (my-def ^{:form1 (quote (inc 1))
25:                :form2 (inc 1)}        ; read and evaluated as usual

----- Stack trace --------------------------------------------------------------
hyperfiddle.rcf/tests                          - /Users/dustin/src/hf/rcf/src/hyperfiddle/rcf.cljc:106:1
hyperfiddle.rcf-test/apply                     - /Users/dustin/src/hf/rcf/test/hyperfiddle/rcf_test.cljc:20:1
hyperfiddle.rcf-test                           - /Users/dustin/src/hf/rcf/test/hyperfiddle/rcf_test.cljc:20:1
clojure.core/apply                             - <built-in>
runner                                         - /Users/dustin/src/hf/rcf/bb/runner.clj:15:5
exec-d0f5b07e-cbd6-42af-82a4-361e5b511f13/exec - <expr>:22:1
exec-d0f5b07e-cbd6-42af-82a4-361e5b511f13      - <expr>:4:1
user-a5406db3-03a4-4cbd-80cd-08ebb1b8978d      - <expr>:26:1
borkdude commented 1 year ago

Don't worry, I'll take a look :)

dustingetz commented 1 year ago

Confirmed electric test suite passes with the babashka support applied, so this is all clear as soon as we fix the conflict. I took a closer look at the conflict and it is nontrivial.

borkdude commented 1 year ago

@dustingetz Fixed in https://github.com/hyperfiddle/rcf/pull/79

dustingetz commented 1 year ago

thank you!

pmbauer commented 1 year ago

:chefskiss:

On July 20, 2023, GitHub @.***> wrote:

thank you!

— Reply to this email directly, view it on GitHub https://github.com/hyperfiddle/rcf/pull/71#issuecomment-1644385358, or unsubscribe https://github.com/notifications/unsubscribe- auth/AADOXTA2R4AZIXHGJ5V6P7TXRFZEHANCNFSM6AAAAAASSJLNJA. You are receiving this because you are subscribed to this thread.Message ID: @.***>