This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-12
Channels
- # announcements (1)
- # babashka (67)
- # beginners (39)
- # calva (56)
- # clojure (72)
- # clojure-berlin (3)
- # clojure-boston (1)
- # clojure-europe (10)
- # clojure-nl (1)
- # clojure-norway (67)
- # clojure-uk (5)
- # clojurescript (7)
- # emacs (21)
- # figwheel-main (5)
- # graalvm (24)
- # hyperfiddle (26)
- # missionary (5)
- # music (1)
- # off-topic (21)
- # polylith (4)
- # releases (2)
- # sci (3)
- # shadow-cljs (25)
- # squint (28)
hiya. I'm working with fulcro. Is there a way from calva to search the code base of a library you are using, using file search? I have cloned the fulcro code and have it open in a second visual studio window but suspect there is a way to search through the files of a library direct from a project that has it as a dependency?
I am not aware of any such feature. But maybe clojure-lsp has something that we could leverage for this, @UKFSJSM38?
Possibly there is another way to achieve what I want to, I want to be able to find functions without knowing what name space they are defined in, just from the function name.
assuming the namespaces are loaded in the repl
thanks!!
we have the https://clojure-lsp.io/features/#project-tree feature which you can navigate on all deps, public functions and classes
it'd be very cool to see this integrated into calva though I imagine that'd take a fair amount of work.
It is integrated to Calva. It looked like a ton of work to me too, but @UKFSJSM38 whipped it together in what seemed like a jiffy. 😀
It’s not integrated with the code search of VS Code, though. I don’t know if that is possible.
hi, we've noticed some changes regarding logging and Jack-in. Not sure if it's calva to blame but it ight be. Now when we jack into a polylith app, initial logs are displayed in Jack-in terminal window and no logs are displayed after that . We are using amperty dialog (slf4j 2.x implementation) .
nREPL server started on port 34333 on host localhost -
19:29:21.227 [clojure-agent-send-off-pool-0] DEBUG org.cache2k.core.log.Log Using Slf4jLogger
19:29:21.236 [clojure-agent-send-off-pool-0] INFO org.cache2k.core.Cache2kCoreProviderImpl cache2k starting. version=2.6.1.Final
19:29:21.554 [clojure-agent-send-off-pool-0] INFO org.eclipse.jetty.util.log Logging initialized @15266ms to org.eclipse.jetty.util.log.Slf4jLog
19:29:26.328 [clojure-agent-send-off-pool-0] DEBUG org.docx4j.XmlUtils Eclipse Adoptium
19:29:26.329 [clojure-agent-send-off-pool-0] DEBUG org.docx4j.XmlUtils 21.0.1
19:29:26.333 [clojure-agent-send-off-pool-0] DEBUG org.docx4j.utils.ResourceUtils Attempting to load: docx4j.properties
19:29:26.336 [clojure-agent-send-off-pool-0] DEBUG org.docx4j.utils.ResourceUtils Trying Thread.currentThread().getContextClassLoader()
19:29:26.340 [clojure-agent-send-off-pool-0] WARN org.docx4j.utils.ResourceUtils Couldn't get resource: docx4j.properties
19:29:26.347 [clojure-agent-send-off-pool-0] WARN org.docx4j.Docx4jProperties Couldn't find/read docx4j.properties; docx4j.properties not found via classloader.
19:29:26.355 [clojure-agent-send-off-pool-0] INFO org.docx4j.XmlUtils default SAXParserFactory property : null
Please consider using Xerces.
19:29:26.377 [clojure-agent-send-off-pool-0] WARN org.docx4j.XmlUtils actual SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
19:29:26.380 [clojure-agent-send-off-pool-0] INFO org.docx4j.XmlUtils default DocumentBuilderFactory property: null
Please consider using Xerces.
19:29:26.391 [clojure-agent-send-off-pool-0] WARN org.docx4j.XmlUtils actual DocumentBuilderFactory: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
Did you check Calva's new output terminal to see if logging shows up there?
this part?
This is not a "real" terminal.
You can type into the terminal, but there is no process that will handle your input.
To reveal this terminal, use the command Calva: Show/Open the Calva Output Terminal .
What is calva.outputDestinations
set to in your settings JSON?
I have
"calva.redirectServerOutputToRepl": false,
"calva.outputDestinations": {
"evalResults": "terminal",
"evalOutput": "terminal",
"otherOutput": "terminal"
},
"calva.useLegacyReplWindowPath": false,
"calva.outputDestinations": {
"evalResults": "repl-window",
"evalOutput": "repl-window",
"otherOutput": "repl-window"
},
And the logging doesn't show up in the REPL window either?
Dunno then. @U0ETXRFEW might have to pitch in when he's around...
There’s yet another setting about repl stdout or something. Dunno if that’s the culprit, but just maybe. Calva shouldn’t have any power on what is logged in the jack-in terminal, though. That’s entirely a different process.
could this be related to cider-nrepl 0.47.1 and logjam ? https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03
yes, I can confirm. Upgraded to latest Calva and I have the logging issue.
(clojure.tools.logging/info "tools.logging info")
;; => nil
I can confirm that logging doesn't appear in any window -- but I have logging wired up to tap>
and Portal so that's where I expect to see log output (and I do), so I hadn't noticed it had disappeared elsewhere...
Guess I'm lucky I am not affected 😉
Interesting. The setting is only providing the defaults, though, so you can use whatever versions. At least that’s how it’s supposed to work.
not sure, but repl messing with the logging is not ok. we load the app in the repl and logging should be configured by the app IMO
Yup, but CIDER already messes with a lot of stuff... This is why I really prefer a bare nREPL... but some of Calva's functionality doesn't work properly then. I've always felt CIDER does far too much.
we'll see how we can handle this. We use tools.logging with dialog (slf4j 2.x) as backend. we redirect all logging to slf4j since that is what we need . I believe logjam tries to do the same
I can confirm logjam tries to capture logging from all java logging frameworks. I see issues with this going forward.
(see my comment about CIDER doing too much 😉 )
yes. I created this issue on logjam https://github.com/clojure-emacs/logjam/issues/18
> What I mean is that the jack-in nrepl dependency versions is configurable. we can try that - but I wonder for how long we can do that until Calva will require newer repl features ?!
The cider-nrepl maintainers are very attentive so I am sure we’ll get some good help figuring the longer game out.
venv replied in the issue and pointed this as a possible cause https://github.com/clojure-emacs/cider-nrepl/blob/31a3d02e13ae1daff0637330c27d83f5943a8486/src/cider/nrepl/middleware/out.clj