chlorine-clover 2020-04-08

Hello all, I´m trying to use chlorine:go-to-var-definition but it fails and is getting a crazy path.

is that because I´m using alias/function mode?

What's the path you're getting?

C:\Trabalho\BM\****\Projeto\Clojure\Monitoracao\baytinela\C:\Trabalho\BM\*****\Projetos\Clojure\bayconfig\src\uim\config.clj

It seems that is concat path from 2 projects

I included 2 folders of 2 projects

Uhn, never tested the feature with multi folders... I'll check here what happens.

A silly question, how do I clean all the evaluate values ?

@seancorfield I used your keybinds 🙂. So you don´t clean you inlines?

'atom-workspace atom-text-editor:not([mini])':

  'ctrl-; ; b':     'chlorine:teste'
  'ctrl-; b':       'sean:inspect-block'
  'ctrl-; B':       'sean:inspect-top-block'
  'ctrl-; c':       'chlorine:break-evaluation'
  'ctrl-; d':       'chlorine:doc-for-var'
  'ctrl-; D':       'sean:def-binding'
  'ctrl-; e':       'chlorine:disconnect'
  'ctrl-; f':       'chlorine:load-file'
  'ctrl-; j':       'sean:inspect-java'
  'ctrl-; k':       'chlorine:clear-console'
  'ctrl-; n':       'sean:inspect-ns'
  'ctrl-; s':       'sean:inspect-selection'
  'ctrl-; S':       'chlorine:source-for-var'
  'ctrl-; t':       'chlorine:run-test-for-var'
  'ctrl-; v':       'sean:inspect-var'
  'ctrl-; x':       'chlorine:run-tests-in-ns'
  'ctrl-; y':       'chlorine:connect-clojure-socket-repl'
  'ctrl-; .':       'chlorine:go-to-var-definition'

Visit that link again.

Compare it to what you have. You haven't updated your keymap since I updated mine 🙂

yes, 11 days ago

That link goes directly to the line that solves your problem.

@mauricio.szabo so, is it a bug about wrong path?

@fabrao How did you start your REPL? Via cmd/powershell or via WSL?

I wonder if it's some artifact of how your dependencies are set up? You're using CLI/`deps.edn`?

How do those two projects relate to each other? (Monitoracao\baytinela and bayconfig)

no relationship btw them

(I use Atom/Chlorine on both Mac and Windows with multiple projects open and have never seen go-to-var-definition mess up like that -- and I use PS for starting my REPL on Windows mostly)

Hi, I was checking if there's any code on goto-var-definition that uses the project's folders, and I didn't find anything... Are you using a Clojure REPL, or ClojureScript, ClojureCLR?

I start with clj -J'-Dclojure.server.repl={:port,5555,:accept,clojure.core.server/repl}'

connect to it

Can you try to re-start Atom with only one directory for the project, issue goto-var definition again, and check if the problem persist?

restart repl too?

I did without repl restart and the same problem

Try to restart it. See if it changes anything

'C:\Trabalho\BM\\Projetos\Clojure\bayconfig\C:\Trabalho\BM\\Projetos\Clojure\bayconfig\src\uim\comm.clj'

Are these ***** on the path too?

Also, what's the path of the project?

That´s our customer name, I have to hide

Ok, no worries. I liteally just wanted to see if the directory was messing up so far that it was adding invalid chars on the path 😄

hehe, no, the path is ok with it

Okay, so... can you evaluate (replacing your-fn-name with the name of the var you're trying to go to defintion):

(:file (meta #'your-fn-name))
And send the result here? You can redact the path name, no worries 🙂

Also, evaluate:

(keys (meta #'your-fn-name))

uim/comm.clj and (:arglists :line :column :file :name :ns)

Okay, one more thing: can you evaluate, please:

(str
 (.getResource (clojure.lang.RT/baseLoader)
               "uim/comm.clj"))

I believe this is the last thing I'll ask 🙂

"file:/C:/Trabalho/BM/*/Projetos/Clojure/bayconfig/src/uim/comm.clj"

@mauricio.szabo no problem, anything you want to contribute