Fork me on GitHub
#polylith
<
2022-12-09
>
Stefan07:12:43

Good morning! I just updated poly, and now I'm getting an exception that I didn't get before (I'm always on the latest released version, so I'm talking about the current and previous versions). Even though I didn't change anything else, it might still be something I'm doing wrong. This is the stack trace I'm seeing:

#error {
 :cause Don't know how to create ISeq from: clojure.lang.Symbol
 :via
 [{:type java.lang.IllegalArgumentException
   :message Don't know how to create ISeq from: clojure.lang.Symbol
   :at [clojure.lang.RT seqFrom RT.java 557]}]
 :trace
 [[clojure.lang.RT seqFrom RT.java 557]
  [clojure.lang.RT seq RT.java 537]
  [clojure.core$seq__5467 invokeStatic core.clj 139]
  [clojure.core$seq__5467 invoke core.clj 139]
  [polylith.clj.core.validator.m109_invalid_test_runner_constructor$errors$iter__4025__4031$fn__4032$iter__4027__4038$fn__4039 invoke m109_invalid_test_runner_constructor.clj 51]
  [clojure.lang.LazySeq sval LazySeq.java 42]
  [clojure.lang.LazySeq seq LazySeq.java 51]
  [clojure.lang.RT seq RT.java 535]
  [clojure.core$seq__5467 invokeStatic core.clj 139]
  [clojure.core$seq__5467 invoke core.clj 139]
  [polylith.clj.core.validator.m109_invalid_test_runner_constructor$errors$iter__4025__4031$fn__4032 invoke m109_invalid_test_runner_constructor.clj 51]
  [clojure.lang.LazySeq sval LazySeq.java 42]
  [clojure.lang.LazySeq seq LazySeq.java 51]
  [clojure.lang.RT seq RT.java 535]
  [clojure.core$seq__5467 invokeStatic core.clj 139]
  [clojure.core.protocols$seq_reduce invokeStatic protocols.clj 24]
  [clojure.core.protocols$fn__8236 invokeStatic protocols.clj 75]
  [clojure.core.protocols$fn__8236 invoke protocols.clj 75]
  [clojure.core.protocols$fn__8178$G__8173__8191 invoke protocols.clj 13]
  [clojure.core$reduce invokeStatic core.clj 6886]
  [clojure.core$group_by invokeStatic core.clj 7214]
  [clojure.core$group_by invoke core.clj 7214]
  [polylith.clj.core.validator.m109_invalid_test_runner_constructor$errors invokeStatic m109_invalid_test_runner_constructor.clj 54]
  [polylith.clj.core.validator.m109_invalid_test_runner_constructor$errors invoke m109_invalid_test_runner_constructor.clj 50]
  [polylith.clj.core.validator.core$validate_ws invokeStatic core.clj 32]
  [polylith.clj.core.validator.core$validate_ws invoke core.clj 23]
  [polylith.clj.core.validator.interface$validate_ws invokeStatic interface.clj 26]
  [polylith.clj.core.validator.interface$validate_ws invoke interface.clj 25]
  [polylith.clj.core.workspace.core$enrich_workspace invokeStatic core.clj 41]
  [polylith.clj.core.workspace.core$enrich_workspace invoke core.clj 28]
  [polylith.clj.core.workspace.interface$enrich_workspace invokeStatic interface.clj 7]
  [polylith.clj.core.workspace.interface$enrich_workspace invoke interface.clj 6]
  [polylith.clj.core.command.core$read_workspace invokeStatic core.clj 54]
  [polylith.clj.core.command.core$read_workspace invoke core.clj 47]
  [polylith.clj.core.command.core$workspace_reader_fn$fn__31598 invoke core.clj 61]
  [polylith.clj.core.command.core$execute invokeStatic core.clj 67]
  [polylith.clj.core.command.core$execute invoke core.clj 63]
  [polylith.clj.core.command.interface$execute_command invokeStatic interface.clj 5]
  [polylith.clj.core.command.interface$execute_command invoke interface.clj 4]
  [polylith.clj.core.poly_cli.core$_main invokeStatic core.clj 33]
  [polylith.clj.core.poly_cli.core$_main doInvoke core.clj 7]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.lang.Var applyTo Var.java 705]
  [clojure.core$apply invokeStatic core.clj 667]
  [clojure.main$main_opt invokeStatic main.clj 514]
  [clojure.main$main_opt invoke main.clj 510]
  [clojure.main$main invokeStatic main.clj 664]
  [clojure.main$main doInvoke main.clj 616]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.lang.Var applyTo Var.java 705]
  [clojure.main main main.java 40]]}
Does somebody have any hints on where to look?

Stefan07:12:32

I'm using the kaocha test runner. When I comment the :test key out in workspace.edn, the error goes away.

furkan3ayraktar07:12:57

Could you share your workspace.edn?

Stefan07:12:57

Sure:

{:top-namespace "eu.medicinemen"
 :interface-ns "interface"
 :default-profile-name "default"
 :compact-views #{}
 :vcs {:name "git"
       :auto-add false}
 :tag-patterns {:stable "stable-*"
                :release "v[0-9]*"}
 :projects {"development"    {:alias "dev"
                              :test  {:setup-fn dev.test-setup/setup}}
            "services"       {:alias "services"
                              :test  {:setup-fn project.services.test-setup/setup}}
            "services+cron"  {:alias "services+cron"
                              :test  {:setup-fn project.services+cron.test-setup/setup}}
            "frontal-server" {:alias "frontal-server"
                              :test  {:setup-fn project.frontal-server.test-setup/setup}}
            "viduet-cron"    {:alias "cron"
                              :test  {:setup-fn project.viduet-cron.test-setup/setup}}
            "viduet-repl"    {:alias "repl"
                              :test  {:setup-fn project.repl.test-setup/setup}}}
 #_#_:test {:create-test-runner polylith-kaocha.test-runner/create}}

Stefan07:12:32

There are two more projects that I left out because they contain customer names, but they are basically the same

furkan3ayraktar07:12:30

Hmm, could you try wrapping the koacha test-runner into a vector: :test {:create-test-runner [polylith-koacha.test-runner/create]}

Stefan07:12:54

Yes, that seems to fix it. 🎉

furkan3ayraktar07:12:10

Yeah, it seems like the latest changes to the custom test runner introduced a bug in the validator. It should be allowed to pass a single or a vector of test runners.

Stefan07:12:57

Do you want me to create an issue for that on GH?

furkan3ayraktar07:12:28

Please do; I am on my mobile at the moment.

furkan3ayraktar07:12:59

I’ll work on a fix, and we can release another version quickly.

Stefan07:12:15

Sure, at least an easy work-around is available 🙂

👍 1
Stefan07:12:28

Thanks a lot for your quick assistance!!!

Stefan07:12:12

My pleasure; enjoy your day!

❤️ 1
furkan3ayraktar10:12:46

https://github.com/polyfy/polylith/pull/266 addresses the issue. Could you validate if this commit fixes the issue in your project? Here is the git dependency for the commit:

{polylith/clj-poly
                                      {:git/url ""
                                       :git/sha "415ef47122e2418d8d1ecd0bcb6e15ecda38bfd1"
                                       :deps/root "projects/poly"}}

Stefan10:12:11

Yes this indeed fixes the issue. Thanks for supplying the dependency text, very thoughtful! 🙂

furkan3ayraktar10:12:16

Great! I can merge and release a new version then!

🎉 1
Stefan12:12:57

Cool, thanks!! 😀

tengstrand13:12:52

I also noticed that we now have more than 400 members in this channel! 🎉

polylith 9
🎉 8
metal 1
seancorfield18:12:46

Since the support for external test runners is now part of an official Polylith release, I have made an official release of https://github.com/seancorfield/polylith-external-test-runner as v0.1.0

🙌 8
🎉 3