Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running lein ns-graph throws error: no implementation of method :as-file #5

Open
transducer opened this issue Feb 21, 2017 · 3 comments

Comments

@transducer
Copy link

Project.clj:

(defproject edb-device-connect "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.9.0-alpha14"]

                 [com.fzakaria/slf4j-timbre "0.3.2"]
                 [org.slf4j/log4j-over-slf4j "1.7.14"]
                 [org.slf4j/jul-to-slf4j "1.7.14"]
                 [org.slf4j/jcl-over-slf4j "1.7.14"]

                 [joda-time "2.9.6"]
                 [clj-time "0.12.2"]

                 [clj-http "2.3.0"]
                 [compojure "1.5.1"]
                 [ring "1.5.0"]
                 [ring/ring-json "0.4.0"]
                 [ring/ring-defaults "0.2.1"]

                 [com.cognitect/transit-clj "0.8.290"]
                 [io.pedestal/pedestal.service "0.5.1"]
                 [io.pedestal/pedestal.jetty "0.5.1"]

                 [environ "1.1.0"]
                 ;;[functionalbytes/mount-lite "0.9.8"]
                 [ekroon/mount-lite "0.9.9-SNAPSHOT"] ;; FIXME !
                 [cheshire "5.6.3"]
                 [com.taoensso/timbre "4.7.3"]
                 [http-kit "2.2.0"]
                 [org.clojure/data.avl "0.0.17"]

                 ;; the-common-stuff.database.
                 ;; Since we include the-common-stuff src we need to include the
                 ;; dependencies in this project's project.clj
                 [clojure.jdbc/clojure.jdbc-c3p0 "0.3.2"]
                 [org.clojure/java.jdbc "0.6.1"]
                 [mysql/mysql-connector-java "5.1.6"]
                 [ragtime "0.6.3"]
                 [com.layerware/hugsql "0.4.7"]

                 [ns-graph "0.1.2"]

                 ;; the-common-stuff.quartzite, exclude c3po cause its version conflicts
                 [clojurewerkz/quartzite "2.0.0" :exclusions [c3p0]]]
  :main ^:skip-aot deviceconnect.edb.core
  :uberjar-name "edb-device-connect-standalone.jar" ; needed for CI/make
  :plugins [[lein-environ "1.1.0"]
            [lein-codox "0.10.0"]
            [ns-graph "0.1.2"]]
  :ns-graph {:name         "EDB Device COnnect"
             :abbrev-ns    true
             :source-paths (get-env :source-paths)
             :exclude      ["java.*" "clojure.*"]}
  :source-paths ["src" "../the-common-stuff/src"]
  :codox {:source-paths ["src"]}
  :profiles {:uberjar     {:aot [deviceconnect.edb.core]}
             :dev         {:dependencies [[org.clojure/test.check "0.9.0"]
                                          [org.clojure/tools.namespace "0.3.0-alpha3"]]
                           :source-paths ["dev"]
                           :env          {:development "yesplease"}
                           :global-vars  {*warn-on-reflection* true}}
             :local-mysql {:env {:db-host     "localhost"
                                 :db-database "hellodata_edb_deviceconnect_test"
                                 :db-user     "root"}}}
  :aliases {"migrate"  ["run" "-m" "deviceconnect.core.database.migrations" "migrate"]
            "rollback" ["run" "-m" "deviceconnect.core.database.migrations" "rollback"]} )

Output of lein ns-graph:

Drawing namespace graph...
java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: clojure.lang.Symbol
 at clojure.core$_cache_protocol_fn.invokeStatic (core_deftype.clj:568)
    clojure.java.io$fn__9390$G__9372__9395.invoke (io.clj:35)
    clojure.java.io$file.invokeStatic (io.clj:424)
    clojure.java.io$file.invoke (io.clj:418)
    ns_graph.core$all_clojure_files.invokeStatic (core.clj:97)
    ns_graph.core$all_clojure_files.invoke (core.clj:96)
    ns_graph.core$parse_directories$fn__893.invoke (core.clj:114)
    clojure.core$map$fn__4785.invoke (core.clj:2646)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:521)
    clojure.core$seq__4357.invokeStatic (core.clj:137)
    clojure.core$apply.invokeStatic (core.clj:641)
    clojure.core$mapcat.invokeStatic (core.clj:2674)
    clojure.core$mapcat.doInvoke (core.clj:2674)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    ns_graph.core$parse_directories.invokeStatic (core.clj:113)
    ns_graph.core$parse_directories.invoke (core.clj:108)
    ns_graph.core$depgraph_STAR_.invokeStatic (core.clj:253)
    ns_graph.core$depgraph_STAR_.invoke (core.clj:240)
    leiningen.ns_graph$ns_graph.invokeStatic (ns_graph.clj:17)
    leiningen.ns_graph$ns_graph.doInvoke (ns_graph.clj:8)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.core$apply.invoke (core.clj:641)
    leiningen.core.main$partial_task$fn__5932.doInvoke (main.clj:272)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.core$apply.invoke (core.clj:641)
    leiningen.core.main$apply_task.invokeStatic (main.clj:322)
    leiningen.core.main$apply_task.invoke (main.clj:308)
    lein_environ.plugin$write_env_to_file.invokeStatic (plugin.clj:29)
    lein_environ.plugin$write_env_to_file.invoke (plugin.clj:27)
    clojure.lang.Var.invoke (Var.java:394)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.core$apply.invoke (core.clj:641)
    robert.hooke$compose_hooks$fn__11994.doInvoke (hooke.clj:40)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$apply.invoke (core.clj:641)
    robert.hooke$run_hooks.invokeStatic (hooke.clj:46)
    robert.hooke$run_hooks.invoke (hooke.clj:45)
    robert.hooke$prepare_for_hooks$fn__11999$fn__12000.doInvoke (hooke.clj:54)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:328)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:324)
    leiningen.core.main$_main$fn__5998.invoke (main.clj:401)
    leiningen.core.main$_main.invokeStatic (main.clj:394)
    leiningen.core.main$_main.doInvoke (main.clj:391)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.main$main_opt.invokeStatic (main.clj:314)
    clojure.main$main_opt.invoke (main.clj:310)
    clojure.main$main.invokeStatic (main.clj:421)
    clojure.main$main.doInvoke (main.clj:384)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    clojure.lang.Var.invoke (Var.java:388)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)
@agarman
Copy link

agarman commented Apr 13, 2017

Same error here.

@thearthur
Copy link

yep, me too.

@thearthur
Copy link

replacing

:source-paths (get-env :source-paths)

with

:source-paths ["src/"]

seems to make this particular problem go away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants