-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
Nikita, this is a cute project from you (as usual :) So I tried to implement your stats to my tiny toy/learning project (I am constantly learning Clojure/Script) but got into issues quickly. LLMs helped me somehow in a walky talky way to isolate the problem BUT I do not fully understand what is the Claude talking about. It is possible the issue is fully on my side. In this case, just cancel this Issue. What follows is generated issue description. Sorry for slopping, but I still hope it can be somehow useful for you. Thanks a lot for your insightful work.:) Tomáš
Problem Description
Both versions 1.0.0 and 0.1.0 fail at runtime with a compilation error in clj_simple_stats/pages.clj:
Syntax error compiling at (clj_simple_stats/pages.clj:383:24).
Unable to resolve symbol: stream-seq! in this context
Environment
- Clojure: 1.11.1
- Java: OpenJDK (multiple versions tested)
- Build tool: tools.deps with depstar uberjar
- Deployment: Server environment (systemd service)
Steps to Reproduce
-
Add dependency to
deps.edn:io.github.tonsky/clj-simple-stats {:mvn/version "1.0.0"} ;; or io.github.tonsky/clj-simple-stats {:mvn/version "0.1.0"} -
Import in namespace:
[clj-simple-stats.core :as stats] -
Use middleware:
(stats/wrap-stats handler {:db-path "clj_simple_stats.duckdb" :uri "/stats"})
-
Build uberjar and run (or just run with
clj -M:run)
Error Details
With AOT compilation (:aot true)
Build fails during compilation phase with the stream-seq! error.
Without AOT compilation (:aot false)
Build succeeds, but application crashes at runtime when loading the namespace:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass
Unable to resolve symbol: stream-seq! in this context
Additional Notes
- This appears in both v1.0.0 and v0.1.0
- The symbol
stream-seq!seems to be missing from the codebase or not properly imported - Version 0.1.0 also has an additional issue with missing DuckDB dependency:
ClassNotFoundException: org.duckdb.DuckDBConnection
Workaround
Currently had to disable the library and comment it out from dependencies.
Expected Behavior
The library should load and work without compilation errors, allowing the stats middleware to collect and display statistics.