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

chore: remove cljs dep from prod #614

Closed jsmassa closed 11 months ago

jsmassa commented 1 year ago

SUMMARY

Move ClojureScript dependency to :cljs alias. Adds data.json dependency for the native cli. It seems it had been provided via the ClojureScript library.

ADDITIONAL INFORMATION

whilo commented 1 year ago

The CLI uses clojure.data.json which alternatively we could also move libdatahike to, https://github.com/replikativ/datahike/blob/main/src/datahike/cli.clj#L3. I used cheshire, because it is faster and also compiles natively, but I think we should be consistent.

jsmassa commented 1 year ago

We are getting into trouble building the api docs when moving the cheshire lib back to an alias. Unless it is an big dependency I wouldn't move it away from the common libs because of this issue. We could introduce a projects directory similar to the way it is in polylith to isolate the cli namespace and then we can easily drop the package that is only needed there but as long as it is mixed in with the rest of datahike it can be quite confusing not to be able to load the namespace with the common dependencies.