Fork me on GitHub

is there an example of using gorilla with clojure cli tools? (quick googling hasn't yielded any useful results)


I've looked into what does the lein-gorilla plugin do, but when I try to replicate it in a tools deps project I get the following error:

$ clj -Srepro -Sdeps '{org.clojure/clojure {:mvn/version "1.10.1"} org.clojars.benfb/gorilla-repl {:mvn/version "0.5.2"}}' -e "(use 'gorilla-repl.core)"
Execution error (FileNotFoundException) at user/eval1 (REPL:1).
Could not locate gorilla_repl/core__init.class, gorilla_repl/core.clj or gorilla_repl/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.


and the error is the same regardless of the gorilla version (0.5.0, 0.5.1, 0.6.0)


0.6.0 works in a fresh lein project 😕

onetom@lynx gorilla % lein new gorilla-test
Generating a project called gorilla-test based on the 'default' template.
The default template is intended for library projects, not applications.
To see other templates (app, plugin, etc), try `lein help new`.

onetom@lynx gorilla % cd gorilla-test
onetom@lynx gorilla-test % lein change :dependencies conj '[org.clojars.benfb/gorilla-repl "0.6.0"]'

onetom@lynx gorilla-test % echo "(use 'gorilla-repl.core) (run-gorilla-server {})" | lein repl
nREPL server started on port 64158 on host - 
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 1.8.0_222-b10
gorilla-test.core=> (use 'gorilla-repl.core) (run-gorilla-server {})
Gorilla-REPL: develop
Unable to reach update server.
Started nREPL server on port 64167
Running at  .
Ctrl+C to exit.
gorilla-test.core=> Bye for now!


ok, my deps specification was incorrect. this works:

% clj -Srepro -Sdeps '{:deps {org.clojars.benfb/gorilla-repl {:mvn/version "0.6.0"}}}' -e "(use 'gorilla-repl.core) (run-gorilla-server {})"
Gorilla-REPL: develop
Unable to reach update server.
Started nREPL server on port 50946
Running at  .
Ctrl+C to exit.


now, it just giving that namespace error in cursive, but i will read up on that in the docs first.


also, via a nix-shell:

nix-shell -p clojure --run "clj -Srepro -Sdeps '{:deps {org.clojars.benfb/gorilla-repl {:mvn/version \"0.6.0\"}}}' -e \"(use 'gorilla-repl.core) (run-gorilla-server {})\""