This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-09
Channels
- # bangalore-clj (1)
- # beginners (158)
- # boot (8)
- # cider (9)
- # cljsjs (9)
- # clojure (169)
- # clojure-austin (1)
- # clojure-denmark (1)
- # clojure-dusseldorf (5)
- # clojure-italy (9)
- # clojure-losangeles (2)
- # clojure-russia (31)
- # clojure-spec (53)
- # clojure-turkiye (1)
- # clojure-uk (56)
- # clojurescript (145)
- # cursive (72)
- # datascript (4)
- # datomic (3)
- # duct (121)
- # events (9)
- # figwheel (1)
- # fulcro (46)
- # graphql (4)
- # hoplon (16)
- # jobs (1)
- # jobs-discuss (4)
- # leiningen (16)
- # lumo (5)
- # off-topic (38)
- # om (1)
- # om-next (5)
- # onyx (104)
- # parinfer (5)
- # re-frame (106)
- # reagent (1)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (235)
- # slack-help (4)
- # unrepl (25)
- # yada (9)
@cfleming When doing "Help -> Show Cursive Cheat Sheet" on the latest EAP it exports a file cheat-sheethtml (without the dot)
@gjnoonan Yeah, sorry - I just fixed that: https://github.com/cursive-ide/cursive/issues/1887
Will be in the next build. I don’t know how that works correctly in Chome on OSX but it does.
This is weird: If I try to create a new Clojure namespace called idea-figwheel-repl
at the top level of my src
folder, Cursive throws a “String index out of range: 0” error.
The Create dialog stays open, but if I click the Create button again, it tells me the file is already there, and if I cancel, the file shows up, but I can’t open it.
Just curious if anybody else can reproduce that with the specific namespace idea-figwheel-repl
at the top level of your src
directory.
@manutter51 One sec
The problem is that the namespace is created with a leading .
, so .idea-figwheel-repl
Interesting.
Ok, I’m trying an “Invalidate Caches” etc, just for grins
No change, the dialog stays up, and if I cancel, the file shows up, but I can’t open it.
@cfleming awesome, thanks much
You can probably just create a file rather than a namespace in that directory, call it idea-figwheel-repl.clj
and add the namespace yourself.
Yeah, that’s what I did, and that works fine.
I just posted it here at the end of the day because it seemed weird and I wondered what was going on.
I am using a leiningen plugin that does its thing by adding a hook to the repl
task
and I'm 87% sure that cursive, even when you ask it to use lein to start the repl, doesn't do it via the repl
task
I will bet you 0.5 testnet BTC that I am correct
aw snap
Cursive does actually invoke the repl
task, but it does it using lein’s trampoline in order to capture the created classpath/command etc
It also does a significant amount of its own hooking, so something like that may be causing problems.
I'm trying it out with trampoline right now
trampoline does not break it
is there an easy way to figure out what cursive is running exactly so I can debug more?
yes one sec
https://github.com/palletops/lein-shorthand/blob/develop/src/lein_shorthand/plugin.clj
I'm 87% sure this doesn't have to hook the repl task and could just be a general :injections
entry, but writing lein plugins like that is hard and I would like to avoid modifying it if I can
So that plugin doesn’t hook the repl task directly, it hooks the resolve task and in that hook, hooks the repl task.
Cursive however does not call the resolve task, in fact I don’t even know what that is/does.
yes, I think it might be an attempt to avoid loading some code if not necessary
see the comment on lines 27 etc.
but in any case, is that indirection the cause?
it's hard to imagine what leiningen use cases don't involve resolve-task
being called :thinking_face:
okay, so I could test this by hooking the repl task directly myself
and that would potentially fix it?
much stranger problem now
but I should debug more on my own first
Ok, but don’t spend too long on it - Cursive does all kinds of wacky things, which I can debug more easily.
it's complicated by the fact that I'm actually working on a plugin that wraps this one, so I should at least figure out which plugin is at fault
okay I think I confirmed that even using the regular lein-shorthand
plugin cursive has the problem, even if I do the repl hook directly
I can create a debug branch of lein-shorthand
with the hook modification if that would make things easier for you
Looking at that plugin, I’m tempted to say that you get what you deserve for doing such things, but that’s pretty much lein for you.
that is pretty much lein for me
if you have alternate impl ideas, that'd be useful too