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>311 Compiling Java classes saving them to 'target-http-server/classes'...%
Hi @brunodonascimentomaci. Did you ever use this command successfully?
Apple Silicon?
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.
Maybe I broke something
You could run the corresponding clojure tasks without babashka to build the http-server
it's quite tedious tbh but possible... sorry that this is the only answer for now
I am not sure how to do that but I am going to try
You could try bumping the tools.deps.native version to 0.1.5 maybe that works
it doesn't work for me on an intel machine unfortunately
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.
ok, cool. thanks for putting in the effort
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 @brunodonascimentomaci. 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.
Can you put a logo file into your resources and retry?
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.
Sure! Thanks!
I would also love to hear how you are doing with the server once it is up.
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 .
@timok I greenlighted the PR, but I will wait for your feedback on tools-deps-native.
@brunodonascimentomaci are you the one on a mac aarch64 machine? try deleting ~/.babashka/pods/repository/org.babashka/tools-deps-native/ and try again
@borkdude It worked!
๐