replikativ / datahike

A fast, immutable, distributed & compositional Datalog engine for everyone.
https://datahike.io
Eclipse Public License 1.0
1.62k stars 95 forks source link

[Bug]: FileNotFoundException over resources/datahike-logo.txt #646

Closed oelrich closed 10 months ago

oelrich commented 10 months ago

What version of Datahike are you using?

0.6.1550

What version of Java are you using?

19.0.2

What operating system are you using?

Ubuntu 22.04.3 LTS

What database EDN configuration are you using?

{:store {:backend :mem :id "in-mem-nippy-data"} :wanderung/type :datahike :schema-flexibility :write :attribute-refs? true :index :datahike.index/persistent-set :keep-history true :name "Nippy testing data"}

Describe the bug

Trying to start the system generates an exception with the following part:

Caused by: java.io.FileNotFoundException: resources/datahike-logo.txt (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:158)

What is the expected behaviour?

There should not be a crash complaining about a missing resource file when trying to start a software using datahike.

How can the behaviour be reproduced?

johan in 🌐 Labora in ~/Gits/daha via β˜• v19.0.2 on ☁️  (eu-central-1) took 4s
❯ bat deps.edn
───────┬─────────────────────────────────────────────────────────────────────────
       β”‚ File: deps.edn
───────┼─────────────────────────────────────────────────────────────────────────
   1   β”‚ {:deps {io.replikativ/datahike {:mvn/version "0.6.1550"}}
   2   β”‚  :paths ["src"]}
───────┴─────────────────────────────────────────────────────────────────────────

johan in 🌐 Labora in ~/Gits/daha via β˜• v19.0.2 on ☁️  (eu-central-1)
❯ bat src/code.clj
───────┬─────────────────────────────────────────────────────────────────────────
       β”‚ File: src/code.clj
───────┼─────────────────────────────────────────────────────────────────────────
   1   β”‚ (ns code
   2   β”‚   (:require [datahike.api :as dh]))
   3   β”‚ (defn -main [& args]
   4   β”‚   (print "Hello world"))
───────┴─────────────────────────────────────────────────────────────────────────
johan in 🌐 Labora in ~/Gits/daha via β˜• v19.0.2 on ☁️  (eu-central-1)
❯ clj -M -m code
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
resources/datahike-logo.txt (No such file or directory)

Full report at:
/tmp/clojure-17817072141337129200.edn
TimoKramer commented 10 months ago

Thanks for bringing this up. This slipped through unfortunately. Will try to fix this today.

TimoKramer commented 10 months ago

It should now be working @oelrich. Thanks again.