boot icon indicating copy to clipboard operation
boot copied to clipboard

boot repl eval options not picked up using cider-jack-in

Open oskarth opened this issue 9 years ago • 2 comments

build.boot:

(set-env!
  :source-paths #{"src"}
  :dependencies '[[org.clojure/clojure "1.7.0"]])

(task-options! repl {:init-ns 'nrepl.foo
                     :eval '(set! *print-length* 20)})

Running cider-jack-in in Emacs and evaluating *print-length* => nil. Expected result: 20. When running boot repl and evaluating *print-length* we see 20. The equivalent behaviour for lein (repl-options) works with cider-jack-in. The problem thus seems to be between boot and CIDER.

  • boot version 2.5.5
  • CIDER 0.10.0snapshot

See https://github.com/clojure-emacs/cider/issues/1462 for related issue.

oskarth avatar Jan 12 '16 20:01 oskarth

Are we sure this is related to https://github.com/clojure-emacs/cider/issues/1462? That seems to be about Boot not loading data_readers.clj at the root of the classpath by default; does that somehow disable the ability to do eval when the REPL loads? I ask because I don't use cider-jack-in, but rather start a Boot REPL server (which is when, if I understand correctly, the :eval form would be evaluated) and only later do cider-connect from Emacs when I want to use the REPL, but I'm also observing this problem.

pandeiro avatar Feb 22 '16 15:02 pandeiro

I was attempting something similar, to have the repl task automatically call (boot-figwheel/cljs-repl) for me, but failed. Neither (repl :server true :eval '(boot-figwheel/cljs-repl)), nor (repl :server true :init "a-file-to-attempt-the-same-thing.clj") seem to have any effect.

torgeir avatar Apr 02 '17 16:04 torgeir