lynaghk / cljx

Write a portable codebase targeting Clojure/ClojureScript
Other
398 stars 34 forks source link

REPL integration fails with 0.5.0/0.6.0 but works with 0.4.0 #77

Closed radoye closed 9 years ago

radoye commented 9 years ago

Hi guys,

I'm having trouble fixing my configuration for 0.5+.0. Not sure if I missed some requirement, but quite bit of reading and fiddling did not get me any closer to finding a solution. Maybe someone can point out a problem in the config below. Thanks!

Running lein repl and connecting from CIDER or IntelliJ/Cursive:

(defproject prq "0.1.1-SNAPSHOT"
  :license {:name "Modified (3-clause) BSD License"
            :url "http://directory.fsf.org/wiki/License:BSD_3Clause"}

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [clojure-complete "0.2.4"]
                 ;;
                 [org.clojure/test.check "0.7.0"]
                 [org.clojure/core.match "0.3.0-alpha4"]
                 [org.clojure/data.priority-map "0.0.7"]
                 ]

  :plugins [[lein-cloverage "1.0.2"]
            [lein-ancient "0.6.2"]
            [com.cemerick/austin "0.1.6"]
            [com.cemerick/clojurescript.test "0.3.1"]
            [lein-kibit "0.0.8"]
            [jonase/eastwood "0.2.1"]
            [cider/cider-nrepl "0.9.0-SNAPSHOT"]]

  :aliases {"cleantest" ["do" "clean,"
                         "with-profile" "+combo" "clean,"
                         "with-profile" "+combo" "cljx" "once,"
                         "with-profile" "+combo" "test,"
                         ;;"with-profile" "+combo" "cljsbuild" "test"
                         ]
            "cleaninstall" ["do" "clean,"
                            "with-profile" "+combo" "clean,"
                            "with-profile" "+combo" "cljx" "once,"
                            "with-profile" "+combo" "install"]
            "cleancljx" ["do" "clean,"
                         "with-profile" "+combo" "clean,"
                         "with-profile" "+combo" "cljx" "once"]

            "bench" ["with-profile" "+bench" "perforate"]}

  :jar-exclusions [#"\.cljx|\.swp|\.swo|\.DS_Store"]
  :source-paths ["src/cljx" "target/classes"]
  :test-paths ["target/test-classes"]
  :auto-clean false
  :jvm-opts []

  :profiles {:uber  {:main ^:skip-aot prq.testspace
                     :aot  [prq.testspace]}

             :dev {:plugins [[com.keminglabs/cljx "0.5.0"]]
                   :prep-tasks [["cljx" "once"] "javac" "compile"]
                   :dependencies [[criterium "0.4.3"]
                                  [org.clojure/clojurescript "0.0-3178"]
                                  ^:replace [org.clojure/tools.nrepl "0.2.10"]
                                  [com.cemerick/piggieback "0.2.0"]]}

             :combo {:dependencies [[org.clojure/clojurescript "0.0-3178"]
                                    [com.andrewmcveigh/cljs-time "0.3.3"]]
                     :plugins      [[lein-cljsbuild "1.0.3"]]

                     :cljsbuild    {:builds        [{:source-paths ["src/cljx" "target/classes"]
                                                     :compiler     {:output-to     "target/prq.js"
                                                                    :output-dir    "target/out/build/"
                                                                    :optimizations :whitespace
                                                                    :pretty-print  true}}]
                                    ;; lein with-profile +combo cljsbuild test
                                    :test-commands {"unit-tests" ["phantomjs" :runner
                                                                  "target/prq.js"]}}}
             :bench {:dependencies []
                     :plugins [[perforate "0.3.4"]]}}

  :cljx {:builds [{:source-paths ["src/cljx"]
                   :output-path "target/classes"
                   :rules :clj}
                  {:source-paths ["test/cljx"]
                   :output-path "target/test-classes"
                   :rules :clj}
                  {:source-paths ["src/cljx"]
                   :output-path "target/classes"
                   :rules :cljs}
                  {:source-paths ["test/cljx"]
                   :output-path "target/test-classes"
                   :rules :cljs}]}
  )
radoye commented 9 years ago

0.5+.0 works in Lein 2.5.0 (and I completely forgot to check that).

cemerick commented 9 years ago

Interesting, it should work just fine under earlier versions of lein, at least back to 2.4.3...

radoye commented 9 years ago

I'm sorry, my previous msg was not as clear as it should have been:

So closing as I have a workaround and not even sure it's cljx.

cemerick commented 9 years ago

That really doesn't make any sense. Please reopen if you again come to think fault lies with cljx.