-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track namespace info as part of track-state #249
Conversation
f3388ae
to
30d8b84
Compare
At a pretty cursory glance the code looks OK. The last two commits should be squash together. |
I'm also worried about some potential performance implications for namespaces with a ton of interned symbols, but I guess there's not much we can do about this (unless we only submit some delta, which would probably complicate the code a lot). |
I was worried about that at first, but it really shouldn't be a problem on the nrepl side. Generating a map of all namespaces and printing it takes barely a millisecond on my system, so it should be fast enough even on very slow systems (like an android device). If there's any performance performance issue, it would have to be on the Emacs side. But @cichli made a good point that the middleware for completion candidates frequently sends messages with pretty large content, and nobody seems to complain it's slow. |
Yeah, I'm worried solely about decoding this data on Emacs's side, but let's assume we're lucky and this won't be a problem. A side problem is that this data might dominate the nREPL log, which would limit it's usefulness, but we can think about this additionally. Address my remarks and let's merge this. |
Good point. I'll look into turning this into a button on the log buffer, so you'd have a clickable ellipsis which expands into the whole thing. |
d6a86c6
to
b350819
Compare
OK. I think it's ready. |
The track-state middleware now keeps the client informed of loaded namespaces as well. For each namespace, we transmit a map of: - All interns (from symbol to the var's metadata). Only select metadata keys are transmitted, currently that's: - `:indent` - `:cider-instrumented` - `:macro` - `:arglists` - `:test` - All refers not from clojure.core (from symbol to fully-qualified var name) - All aliases (from symbol to namespace name)
b350819
to
c5d92cb
Compare
Track namespace info as part of track-state
👍 |
@Malabarba can you try pushing to clojars yourself? |
@bbatsov done! 👍 |
Goes with clojure-emacs/cider#1301
The track-state middleware now keeps the client informed of loaded
namespaces as well. For each namespace, we transmit a map of:
keys are transmitted, currently that's:
:indent
:cider-instrumented
:macro
:arglists
:test