lambdaisland / lambdaisland/npmdemo

slow work clsj REPL

Open
#2 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
64
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi! thanks for the work you've done, this is very useful!

But, I met with the incomprehensible behavior of the replays, when I try to set an example in an emacs.
After cider-jack-in-clojurecript - cjs repl work very sow. Just eval (prn "test") - take up to 10 s
I tried run in terminal lein figwheel and then in emacs cider-connect, but i get something like this in emacs repl buffer:

WARNING: CIDER's version (0.16.0-snapshot) does not match cider-nrepl's version (nil). Things will break!
More information.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.4.0-SNAPSHOT (package: 20171117.317) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.

And then after run (require '[figwheel-sidecar.repl-api :as ra]) in emacs repl buffer i get in terminal something like this:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.tools.nrepl.middleware.interruptible_eval$set_line_BANG_ to field java.io.FilterReader.in
WARNING: Please consider reporting this to the maintainers of clojure.tools.nrepl.middleware.interruptible_eval$set_line_BANG_
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

And then repl starts work slow in terminal too.
Any idea what I'm doing wrong?

My project.clj:
`(def shared-compiler-settings '{:main npmdemo.core
:npm-deps {:express "4.16.2"
:ws "3.2.0"}
:install-deps true
:infer-externs true
:target :nodejs})

(defproject npmdemo "0.1.0-SNAPSHOT"
:description ""
:url "http://github.com/lambdaisland/npmdemo"
:license {:name "Mozilla Public License 2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-beta3"]
[org.clojure/clojurescript "1.9.946" :scope "provided"]]

:plugins [[lein-cljsbuild "1.1.7"]]

:jvm-opts ["--add-modules" "java.xml.bind"]

:min-lein-version "2.6.1"

:clean-targets ^{:protect false} [:target-path :compile-path "dev-out" "out"]

:cljsbuild {:builds
[{:id "dev"
:source-paths ["src"]

            :figwheel {:on-jsload "npmdemo.core/reset-app!"}

            :compiler ~(merge
                        {:output-to "npmdemo-dev.js"
                         :output-dir "dev-out"}
                        shared-compiler-settings)}

           {:id "prod"
            :source-paths ["src"]
            :compiler ~(merge
                        {:output-to "npmdemo.js"
                         :output-dir "out"
                         :optimizations :simple
                         :closure-defines '{goog.DEBUG false}
                         :pretty-print false}
                        shared-compiler-settings)}]}

:figwheel {:server-logfile "log/figwheel.log"
:nrepl-port 7000
:server-port 3450}

:profiles {:dev
{:dependencies [[figwheel "0.5.15-SNAPSHOT"]
[figwheel-sidecar "0.5.15-SNAPSHOT"]
[cider/cider-nrepl "0.16.0-SNAPSHOT"]
[com.cemerick/piggieback "0.2.2"]]

          :plugins [[lein-figwheel "0.5.15-SNAPSHOT"]]

          :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}})

`
Cider version 0.16.0snapshot

Emacs 25.3.1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with project.clj and reproduce the reported cider-jack-in-clojurescript workflow, including evaluating (prn "test") and requiring figwheel-sidecar.repl-api. Compare the CIDER, cider-nrepl, clj-refactor, Figwheel, and Java warnings; done means identifying the cause of the latency and documenting a concrete compatibility or configuration resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, emacs, node.js
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.