This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-13
Channels
- # announcements (1)
- # babashka (28)
- # beginners (72)
- # biff (6)
- # calva (15)
- # clerk (14)
- # clj-otel (4)
- # cljdoc (4)
- # clojure (121)
- # clojure-europe (61)
- # clojure-nl (2)
- # clojure-norway (63)
- # clojure-uk (5)
- # datahike (35)
- # datalevin (37)
- # datomic (7)
- # emacs (2)
- # fulcro (6)
- # gratitude (1)
- # honeysql (2)
- # hyperfiddle (38)
- # malli (9)
- # matrix (24)
- # meander (4)
- # off-topic (10)
- # polylith (8)
- # reagent (2)
- # releases (1)
- # shadow-cljs (8)
- # spacemacs (4)
- # specter (1)
- # squint (5)
- # tools-deps (3)
Hey folks! I am getting an exception (`No matching method equals found taking 1 args for class java.io.File`) while trying to create jar bb http-server-uber
on Mac ๐งต(Complete Stacke trace)
Cleaning up target directory 'target-http-server'...Done. ----- Error -------------------------------------------------------------------- Type: clojure.lang.ExceptionInfo Message: No matching method equals found taking 1 args for class java.io.File Data: {:type "class java.lang.IllegalArgumentException"} Location: /Users/bruno.nascimento/.gitlibs/libs/io.github.babashka/tools.bbuild/73e4d0a26c65cdf1d4c7bf7e9e46e6e5f1978a37/src/main/clojure/clojure/tools/build/util/pod.clj:1:29 ----- Context ------------------------------------------------------------------ 1: (ns clojure.tools.build.util.pod ^--- No matching method equals found taking 1 args for class java.io.File 2: (:require [clojure.string :as str])) 3: 4: (def windows? (str/starts-with? 5: (System/getProperty "os.name") 6: "Windows")) ----- Stack trace -------------------------------------------------------------- babashka.pods.impl/processor - <built-in> babashka.pods.sci/load-pod/fn--26975 - <built-in> clojure.tools.deps/create-basis - /Users/bruno.nascimento/.gitlibs/libs/io.github.babashka/tools.bbuild/73e4d0a26c65cdf1d4c7bf7e9e46e6e5f1978a37/src/main/clojure/clojure/tools/build/util/pod.clj:1:29 clojure.tools.deps/create-basis - /Users/bruno.nascimento/.gitlibs/libs/io.github.babashka/tools.bbuild/73e4d0a26c65cdf1d4c7bf7e9e46e6e5f1978a37/src/main/clojure/clojure/tools/build/util/pod.clj:1:1 clojure.tools.build.tasks.create-basis - /Users/bruno.nascimento/.gitlibs/libs/io.github.babashka/tools.bbuild/73e4d0a26c65cdf1d4c7bf7e9e46e6e5f1978a37/src/main/clojure/clojure/tools/build/tasks/create_basis.clj:30:6 ... (run with --debug to see elided elements) tools.build - /Users/bruno.nascimento/Documents/personal-projects/datahike/bb/src/tools/build.clj:24:21 clojure.tools.build.api/javac - /Users/bruno.nascimento/.gitlibs/libs/io.github.babashka/tools.bbuild/73e4d0a26c65cdf1d4c7bf7e9e46e6e5f1978a37/src/main/clojure/clojure/tools/build/api.clj:320:1 tools.build/compile-java - /Users/bruno.nascimento/Documents/personal-projects/datahike/bb/src/tools/build.clj:22:4 tools.build/compile-java - /Users/bruno.nascimento/Documents/personal-projects/datahike/bb/src/tools/build.clj:18:1 user-ce2c7348-f79c-4c30-8d89-11031dde2018 - <expr>:31:1 Compiling Java classes saving them to 'target-http-server/classes'...%
Hi @U0686RN9X0W. Did you ever use this command successfully?
It is the first time that I am trying to run this command. I was following the documentation https://cljdoc.org/d/io.replikativ/datahike/0.6.1555/doc/distribution#setup-datahikehttpserver
There might be a problem with tools-deps-native. I know this problem because I am trying to build datahike binaries for all the architectures and had to contribute something for tdn therefor.
I am not sure how to do that but I am going to try
Bumping the tools.deps.native
version did not work, but I checked out to more old commits and it worked.
I am going to try to find the exactly commit that introduced the break changes.
The problem started at https://github.com/replikativ/datahike/commit/ce74c913987b8e0f4eff3191b775f490df4ce38b.
I tried to apply the changes incrementally until I was able to reproduce the error.
It turned out that bumping org.babashka/tools-deps-native
from 0.1.1
to 0.1.2
caused the problem.
Also tried with versions after 0.1.2
with no success
yeah, that might be possible. I assume the mac binaries somehow got overwritten with some bad binary for mac aarch64 on release 0.1.2 but I don't know exactly if it worked with mac aarch64 in the first place because I didn't test it. but hopefully we will find the problem soon.
Now I am getting this exception while executing the jar
java -jar datahike-http-server.jar datahike.config.edn
Do you know what this exception means?
I am using the default config as documented.
Hey @U0686RN9X0W. This happened to me before with this line https://github.com/replikativ/datahike/blob/main/src/datahike/tools.cljc#L155
Maybe we have to handle this differently or make sure that it is packaged into the jar properly if it isn't.
It worked!!
I added the "resources" directory to :src-dirs
https://github.com/replikativ/datahike/blob/4b3a87da8ce79eaa26d680c3bf91a9ed390b0c45/config.edn#L21-L30
If you let me I can open a PR with this change.
I filled out a https://github.com/replikativ/datahike/issues/663 to document the problem and the rational for the fix.
Opened a https://github.com/replikativ/datahike/pull/664 downgrading org.babashka/tools-deps-native
from 0.1.2
to 0.1.1
and adding the resources
directory to :src-dirs
.
@U4GEXTNGZ I greenlighted the PR, but I will wait for your feedback on tools-deps-native.
@U0686RN9X0W are you the one on a mac aarch64 machine? try deleting ~/.babashka/pods/repository/org.babashka/tools-deps-native/ and try again
@U04V15CAJ It worked!