leiningen

Clojurescript libraries - goog.require could not find

£可爱£侵袭症+ 提交于 2019-12-22 05:29:17
问题 New to clojurescript, and working through the "Modern CLJS" tutorial here. It instructs to pull in domina by adding it to the project.clj : :dependencies [[org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [domina "1.0.0"]] And then use it in your script by referencing it in the ns form (ns cljstut.login (:use [domina :only [by-id value]])) However, when I actually run this in a browser, I see the following in the console log. goog.require could not find: domina Seems like I'm missing some

How to use a local repository for a Clojure library during initial development?

偶尔善良 提交于 2019-12-21 08:24:09
问题 I have a question about developing a Clojure library which is not answered in the suggested workflow for Library Development and Distribution as described here: http://clojure-doc.org/articles/ecosystem/libraries_authoring.html I am developing a library and want to test this in a clojure project. In this project I will have to add the library under development as a dependency. Is there an alternative for 'lein deploy clojars' which will deploy my library to a local repository? If so how would

How to use a local repository for a Clojure library during initial development?

僤鯓⒐⒋嵵緔 提交于 2019-12-21 08:24:05
问题 I have a question about developing a Clojure library which is not answered in the suggested workflow for Library Development and Distribution as described here: http://clojure-doc.org/articles/ecosystem/libraries_authoring.html I am developing a library and want to test this in a clojure project. In this project I will have to add the library under development as a dependency. Is there an alternative for 'lein deploy clojars' which will deploy my library to a local repository? If so how would

How do you change Clojure version in Leiningen and LightTable?

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:07:09
问题 When I type (clojure-version) into my repl in LightTable, I get "1.5.1" as output. Is there any way to upgrade to 1.6.0? I am assuming that it is drawing the Clojure version from Leiningen (2.3.4 on my machine), which is stocked with 1.5.1 out of the box. How can I make sure that both Leiningen and LightTable are using the most recent version of Clojure? I have googled around and can't find any clear answers. I did find this SO question, but it didn't address my problem specifically. Is there

Can you have leiningen load library code from locally checked out source?

随声附和 提交于 2019-12-21 03:49:35
问题 Let's say I was hacking on a clojure library I was using in my project: /User/SCdF/Code/myproject/ /User/SCdF/Code/other-peoples-projects/clojure-library-cloned-from-github Currently, when I make changes in clojure-library-cloned-from-github I then run lein install to push my new version to the local repository (I've changed my and their project.clj to point to a newer -SNAPSHOT version of the library so it gets updated every time) and then restart / run lein deps on myproject . Is there a

Why is leiningen so slow when it starts?

吃可爱长大的小学妹 提交于 2019-12-21 03:39:15
问题 I'm using lein repl to execute clojure repl in console. When I run it, it takes over 15 seconds . When I run java -cp clojure-1.6.0.jar clojure.main , it takes just a few seconds. Why is lein repl so slow? Are there anyways to make it faster? My env: H/W: MacBookAir O/S: Mac OS 10.9 Mavericks CPU: i7 MEM: 8GB 回答1: Leiningen starts two JVMs, and hooks them together. It's got to load extra stuff to do that. The prompt you type into is a different process from the Clojure process that evaluates

Can't launch `lein` REPL in Emacs

我的梦境 提交于 2019-12-21 03:30:32
问题 In Emacs, when using clojure-mode , I ought to be able to launch a REPL with C-c C-z . Whenever I try, though, I get the error: Searching for program: no such file or directory: lein I have lein installed in /usr/local/bin (via brew ) and /usr/local/bin is in my PATH (even Emacs says so, via eval-expression (getenv "PATH") ). What am I missing? 回答1: Ah! The PATH environment variable isn't the end-all and be-all of emacs search paths. There's also the "exec-path". It apparently does mostly the

shutdown hook doesn't fire when running with “lein run”

。_饼干妹妹 提交于 2019-12-20 17:34:30
问题 I have the following code: (ns test-hook.core) (defn -main [] (.addShutdownHook (Runtime/getRuntime) (Thread. #(println "shutdown"))) (println "start") (doseq [i (range 1 6)] (Thread/sleep 1000) (println i))) and the following project.clj (defproject test-hook "1.0.0-SNAPSHOT" :aot :all :main test-hook.core :description "FIXME: write description" :dependencies [[org.clojure/clojure "1.2.0"]]) when I run it with "lein run" the shutdown hook only gets executed on normal program execution, not

How to clear the REPL in cider-mode?

跟風遠走 提交于 2019-12-20 12:39:07
问题 I am not meaning cleaning up the text output of REPL; I mean cleaning up all evaluated results in REPL. During developing, repeatedly C-c C-q and C-c M-j is low efficiency. UPDATE There may be some bad debug behaviour of mine. I am not sure how other people develop progs with CIDER, but I really need the functionality mentioned above. I guess other developers also encounter same problems as mine. For example, at the top of a clojure prog unit, I use declare to declare a function foo , which

How do I recompile and reload Java source code while `lein repl` is running?

こ雲淡風輕ζ 提交于 2019-12-20 09:37:44
问题 I have a Clojure project, and I'm using leiningen. I'm also using tools.namespace to reload Clojure code while running a REPL. If I want to include Java source in the project, can I recompile and reload it while the REPL is running? What is the most convenient/dynamic way of doing it? Can I do it so that it works well with tools.namespace? 回答1: I'm answering my own bounty here but I did do a bit of work getting this up: Use Vinyasa , and here is a blog post: Dynamic reloading of java code in