This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-19
Channels
- # announcements (9)
- # babashka (5)
- # babashka-sci-dev (23)
- # beginners (160)
- # calva (78)
- # cider (23)
- # clj-commons (2)
- # clj-kondo (5)
- # cljdoc (19)
- # cljs-dev (8)
- # clojure (54)
- # clojure-australia (1)
- # clojure-czech (2)
- # clojure-dev (17)
- # clojure-europe (8)
- # clojure-italy (8)
- # clojure-nl (2)
- # clojure-sg (3)
- # clojure-uk (4)
- # clojurescript (70)
- # community-development (8)
- # core-async (8)
- # cursive (7)
- # datahike (12)
- # datalog (22)
- # datomic (20)
- # events (1)
- # fulcro (43)
- # graalvm (92)
- # gratitude (5)
- # holy-lambda (77)
- # honeysql (1)
- # jobs (1)
- # lsp (111)
- # membrane (70)
- # nextjournal (13)
- # off-topic (73)
- # pathom (1)
- # polylith (8)
- # portal (32)
- # re-frame (3)
- # reagent (4)
- # reitit (5)
- # releases (2)
- # reveal (4)
- # xtdb (22)
For you who wants support for the :local/root
syntax in profiles, please check out the https://github.com/polyfy/polylith/tree/issue-146 branch. See also https://github.com/polyfy/polylith/issues/146.
Although check
returns OK
when the profiles are specified as just :extra-deps
with :local/root
, test
does not run correctly (the components from the profiles are not found).
Here's how I have the profiles now:
:+default {:extra-deps {;; by default, we use Hato:
poly/http-client-hato {:local/root "components/http-client-hato"}}}
:+httpkit {:extra-deps {;; but we can switch to the http-kit version:
poly/http-client-httpkit {:local/root "components/http-client-httpkit"}}}
but when I run the tests for dev:
clojure$ test :dev :all
Projects to run tests from: activator, api, auth, development, eros-features, frankieee, login, migration, preview, system, worldsingles, wsadmin, wsbilling-admin, wsbilling-member, wsbilling-rebill, wsmessaging, wsphotoqueue, wsseogeo
Running tests from the activator project, including 1 brick: http-client-hato
Testing ws.http-client.interface-test
Ran 2 tests containing 43 assertions.
0 failures, 0 errors.
...
# projects work since they explicitly depend on the Hato component or the httpkit component
...
Running tests from the development project, including 36 bricks: affiliate-link, artifact-uploader, billing-machine, billing-sdk, billing-shared, caching, configuration, crud-form, datasources, date-time, environment, exceptions, feature-flag-admin, feature-flags, file-system, frankieee, gdpr, google-search-console, host-services, http-client-hato, http-client-response, member-engagement, messaging-sdk, safe-coercions, seo-json-renderer, seo-keyword, site, slack-notifications, system-properties, user-attributes, admin, artifact-uploader-cli, batch-jobs, eros-features-cli, frankieee-cli, preview-web
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at polylith.clj.core.common.class_loader$invoke_in_STAR_.invokeStatic(class_loader.clj:31)
...
Caused by: Syntax error compiling at (ws/http_client/impl.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7652)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:424)
...
Caused by: java.io.FileNotFoundException: Could not locate hato/client__init.class, hato/client.clj or hato/client.cljc on classpath.
at clojure.lang.RT.load(RT.java:462)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6860.invoke(core.clj:6149)
at clojure.core$load.invokeStatic(core.clj:6148)
at clojure.core$load.doInvoke(core.clj:6132)
...
Couldn't run test statement for the development project: (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote ws.admin.web-test)) (clojure.test/run-tests (quote ws.admin.web-test))) java.lang.reflect.InvocationTargetException
That's with SHA 75945bc6d746ec3448f02e43b0a4cc6e3f2a9bb4
which is the tip of issue-146
. Here's what I've had to use before and what still works with issue-146
:
:+default {:extra-deps {;; by default, we use Hato:
poly/http-client-hato {:local/root "components/http-client-hato"}}
;; seems like a bug that we still need to specify _paths_?
:extra-paths ["components/http-client-hato/src"
"components/http-client-hato/test"]}
:+httpkit {:extra-deps {;; but we can switch to the http-kit version:
poly/http-client-httpkit {:local/root "components/http-client-httpkit"}}
;; seems like a bug that we still need to specify _paths_?
:extra-paths ["components/http-client-httpkit/src"
"components/http-client-httpkit/test"]}
Okay, will have a look tomorrow.
Good morning @U04V70XH6. It works on my test project, so I think I need to take a closer look at your setup. Can you please execute ws out:ws.edn
and email me the result.
Not until I'm back at work tomorrow. Did you test with a different external library dep in each implementation?
Yes, I did. I must have missed something. I need to dig deeper into this.