Fork me on GitHub
#sci
<
2023-08-15
>
jaide17:08:48

Continuing what I started with tests, https://github.com/babashka/sci.configs/blob/64342798713d355244d86ee6c311725d0c58e682/src/sci/configs/cljs/test.cljs#L1077, it doesn't seem like that is working as expected. The raw all-ns value is:

"gracie.projects2" "cljs-bean.core" "tests.cli" "user" "promesa.protocols" "nbb.core" "promesa.core" "nbb.classpath" "edamame.core" "framework.env" "cljs.test" "goog.object" "babashka.cli" "clojure.core" "clojure.set" "framework.queue" "cljs.pprint" "clojure.main" "nbb.error" "gracie.queue" "clojure.edn" "notion.api" "tests.gracie.test-queue" "clojure.repl" "clojure.string" "framework.utils" "sci.core" "cljs.reader" "clojure.walk" "clojure.template")
Then trying to use (t/run-all-tests #"tests\.gracie") should match tests.gracie.test-queue

jaide17:08:52

However, that always returns an empty list. That can be reproduced in the repl by manually filtering the results of (all-ns)

jaide17:08:03

If I replace re-matches with re-find, then it works

jaide17:08:09

Interesting!

borkdude17:08:45

I don't think your PR is the correct one either

borkdude17:08:01

It's better to test nbb in combination of sci.configs with :local/root checkout

borkdude17:08:46

I think (all-ns) should be (map str (keys (all-ns))) and then just apply re-matches over those strings

borkdude17:08:55

PR welcome, if you can verify that this works

borkdude17:08:01

else I'll do it tomorrow

jaide17:08:48

Actually it might be working, seems re-matches requires the pattern to match the full string

jaide17:08:59

Yes! That was it, it’s working correctly now with a pattern that matches the full string

borkdude17:08:05

good to know :)

👍 2