walmartlabs / lacinia

GraphQL implementation in pure Clojure
http://lacinia.readthedocs.io/en/latest/
Other
1.82k stars 163 forks source link

Published version 1.1 requires missing namespace #408

Closed jvtrigueros closed 2 years ago

jvtrigueros commented 2 years ago

The jar published to Clojars fails to start due to missing aviso dependency, here's the repro:

clojure -Sdeps '{:deps {com.walmartlabs/lacinia {:mvn/version "1.1"}}}' -M \
        --eval "(require '[com.walmartlabs.lacinia.trace])"

Output:

Syntax error (FileNotFoundException) compiling at (com/walmartlabs/lacinia/trace.clj:1:1).
Could not locate io/aviso/exception__init.class, io/aviso/exception.clj or io/aviso/exception.cljc on classpath.

Full report at:
/var/folders/70/y9l4w6qj62gbbm_mzqgyswnw0000gn/T/clojure-7607515029491557757.edn

Here's the source requiring that namespace https://github.com/walmartlabs/lacinia/blob/v1.1/src/com/walmartlabs/lacinia/trace.clj#L25.

I understand that master has removed the trace namespace and is loading the trace functionality via a library but this Clojars version as-is doesn't work. I suppose one could add the aviso dependency, but that's probably not the intention here.

The workaround is to specify the lacinia dependency using the git-lib format:

{:deps {com.walmartlabs/lacinia {:git/url "https://github.com/walmartlabs/lacinia.git"
                                 :git/sha "e2a0da69f1b31b947b1245d8071601ad9ee3d84b"}}}
hlship commented 2 years ago

Trace was meant for internal use only, thus the ^:no-doc tag. If you are AOT compiling, you can add an exclusion pattern.