This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-10
Channels
- # 100-days-of-code (2)
- # adventofcode (188)
- # aleph (3)
- # announcements (2)
- # beginners (76)
- # boot (3)
- # braveandtrue (49)
- # cider (82)
- # clara (15)
- # clojure (101)
- # clojure-europe (4)
- # clojure-india (3)
- # clojure-italy (26)
- # clojure-kc (1)
- # clojure-nl (4)
- # clojure-norway (1)
- # clojure-russia (5)
- # clojure-uk (33)
- # clojurescript (32)
- # crypto (20)
- # cursive (34)
- # datomic (45)
- # emacs (3)
- # events (1)
- # figwheel (1)
- # figwheel-main (10)
- # fulcro (30)
- # graphql (14)
- # hoplon (12)
- # hyperfiddle (21)
- # jobs (11)
- # kaocha (7)
- # klipse (8)
- # leiningen (10)
- # luminus (3)
- # nrepl (18)
- # off-topic (232)
- # onyx (8)
- # pathom (6)
- # re-frame (30)
- # reagent (3)
- # reitit (6)
- # remote-jobs (3)
- # ring-swagger (4)
- # shadow-cljs (21)
- # spacemacs (5)
- # sql (18)
- # tools-deps (23)
- # yada (2)
Is there a way to make the stack trace more consice when using cider eval preferably filter out/collapse parts of the stack that are not in the src folder or show only a summary?
Hi, already asked in #beginners and re-posting here: I have a problem with CIDER and reloading namespaces. I can run the application once but as soon as I reload CIDER complains that it cannot find a certain namespace. I've been reading "Reloading Woes" (https://lambdaisland.com/blog/09-02-2018-reloading-woes) and trying to find out the problem but to no help. Does anyone have a hint at the source of the problem?
Does CIDER have an ability to highlight compilation errors in the code buffer? I see some references to this in the issues, but I don't think it ever worked for me.
Basically we just parse the exceptions that happen after eval, extract the location info for the error from them and highlight the offending line.
Interesting. I was wrong that it doesn't work for me at all – e.g. reflection warnings are underlined yellow in the buffer. But I don't think I've ever seen red underlines.
It looks like on compilation errors (failed to compile) Emacs never enters cider-extract-error-info
but it does on warnings.
I also haven't seen red underlines in a long time, IIRC I just get an exception buffer pop up when compilation fails
Interesting! I restarted the REPL, and it looks like each new stacktrace
op message adds another pprint-fn
, print-length
, and print-level
.
@dpsutton noticed this problem a while ago. I never had time to debug it, but it seemed like something harmless. It’s unrelated to what you’re experiencing.
can someone tell me what does this error mean?
Could not start nREPL server: WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval3309$fn__3310 to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval3309$fn__3310
This happens after doing cider-jack-in
.
Also when doing lein repl
on my terminal the process fails and this is printed: REPL server launch timed out.
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
you can also go to *Messages*
and find the command that CIDER uses to launch nrepl, then run that in the terminal
this sounds like a problem with your project, not CIDER. if you can't get a repl up with lein repl
this isn't some bug that CIDER introduces
> the repl its timing out for some reason
maybe it's loading a namespace that blocks for some reason? do you have a user.clj
?
@dpsutton No, unfortunately not. @cfeckardt gave me some feedback but in theory everything looks fine. I checked further and in the reply I see that c.t.n.r/refresh lists the namespace but somehow does not seem to find it.
I'm really not sure. I do think it must be on my side (it usually is...) but I don't see the one thing that is wrong.
I'm on my way home. Will try later. What is interesting is that initially it works. Only after I run either c.t.n.r/refresh
or (cider-refresh)
things don't work anymore
Hm, so yes, I cannot require the namespace even on a freshly started repl session.
Any idea?
what's up with the namespace. can you figure out a repro of this issue that others can see?
I'll copy the repo into a private Gitlab one.
You don't happen to have a Gitlab account?
but i also don't have time to clone your project. can you poke around the forms and see which ones are preventing your namespace from loading?
so, let me copy what I have
this is the error I see: clojure.lang.Compiler$CompilerException: java.lang.Exception: No namespace: felicity-lemon.config, compiling:(felicity_lemon/joining_streams.clj:1:1)
this is the ns declaration in joining_streams.clj
:
(ns felicity-lemon.joining-streams
(:require [taoensso.timbre :as log]
[metrics.meters :refer (meter mark!)]
[metrics.gauges :refer (gauge-fn)]
[jackdaw.streams :as j]
[jackdaw.serdes.json :as jsj]
[felicity-lemon.config :refer (config)]
[felicity-lemon.kafka-streams.metrics]
[felicity-lemon.kafka-streams.serde])
(:import (felicity_lemon.kafka_streams.serde JsonSerde)
(felicity_lemon.kafka_streams.metrics MetricsBridge)
(org.apache.kafka.streams KafkaStreams)
(org.apache.kafka.streams KafkaStreams$StateListener)
(org.apache.kafka.streams KafkaStreams$State)
(org.apache.kafka.common.serialization Serde Serdes)))
ok. can you find the felicity-lemon/config.clj file and try eval'ing it and see what happens
... starting a repl
no, clj
leiningen
config.clj
:
(ns felicity-lemon.config
(:require
[taoensso.timbre :refer (info merge-config!)]
[cprop.core :as cprop]
[cprop.source :as cp-src]
[mount.core :refer (defstate)]
[clojure.string :as str]
[metrics.core :refer (new-registry)]
[clojure.spec.alpha :as spec]
[felicity-lemon.specs :as cs]))
ok. well the error message is saying it doesn't know what felicity-lemon.config is. so start there
project.clj
=> https://gist.github.com/truemped/22913e9dbdd20ee9cc957e22ffd34d1f
what do you mean by "eval that file"? I'm in the repl and have all stuff loaded. I can run (start)
and it starts my API with felicity-lemon.config
evaluated and running
yes, it adapts the configuration, i.e. listens on a different port depending on the config, e.g.
only when I reload ...
felicity-lemon.repl> (start)
18-12-10 21:22:32 daniels INFO [felicity-lemon.core:42] - Starting server on port 8080
{:started ["#'felicity-lemon.config/config-merges" "#'felicity-lemon.config/config" "#'felicity-lemon.core/mgmt-server" "#'felicity-lemon.config/joiners"]}
thank you anyways. Once I found the issue, this will be a very big aha! for me 🙂
Hey all. I'm trying to have cider work with deps.edn and I'm having trouble evaluating anything except simple forms such as (+ 1 2)
. Is the current workflow to create a new alias
for your dev
? If so. I'm having trouble determining which dependencies to include. It also seems that opening a repl in my terminal doesn't necessarily open a port along with it for cider to connect to?
I am. I also have some defined inside my .clojure/deps.edn. Are we able to specify which profiles to load from cider, or do we need to start the repl from teh terminal?
as in, in order to start your app for development it needs to run with a certain alias to include paths/deps/etc.
:nrepl {:extra-deps {nrepl {:mvn/version "RELEASE"}}
:main-opts ["-e" "(require,'[nrepl.server,:refer,[start-server]]),(start-server,:port,60606)"]}
^^ Stolen from sean's ghif you're using cider-jack-in, you can specify different params to the command by pressing C-u
before the cider-jack-in
it should come up with an nREPL server command
prompt which you can add e.g. -A:dev
to
cider-jack-in
will add all of the nREPL dependencies and start the server like you have in the alias, though, so you shouldn't need that
in a lot of my deps.edn projects now, I add a .dir-locals.el
file to configure the way cider starts my app's REPL:
https://github.com/Lokeh/lilac.town/blob/master/.dir-locals.el