Comments (10)
Yup, something I've wanted for a long time. I decided to do it as a proxy to prevent middleware ordering issues. This way you're sure you get the messages as they go over the wire. It's also nice that you can just pipe this to a file and share it with developers.
I have some ideas of where to take this, for now it's pretty basic. I mainly wanted to sort out the network part, the rest should be straightforward.
from nrepl.
Definitively I'm going to tackle something about this at #84, thanks for this issue, it's gonna be a good guide! o/
from nrepl.
I'm having some problems with it
- When reading data,
transport-read
function is not available atFnTransport
, can't see the data without changing the concrete transport implementation send-fn
atFnTransport
is opaque
For 1
, we could get the message after decoded and encode it again, but maybe it would not be representative enough of the received message.
For 2, I can compose the send-fn
field (if FnTransport
becomes a Record) with another function or using the reversed proposed solution for 1
Maybe would be better to snitch the data for in
and out
streams, but using this would require a global configuration instead per message.
Any other options to be suggested?
from nrepl.
When reading data, transport-read function is not available at FnTransport, can't see the data without changing the concrete transport implementation
So using something like logging-transport
wrapper won't work? I think this was my original idea, but I didn't think much about this.
Maybe would be better to snitch the data for in and out streams, but using this would require a global configuration instead per message.
Yeah, perhaps that'd be better. We can just add some debug/verbose
config to start-server
and potentially support this via nrepl.config
. That won't allow us to toggle dynamically the logging on/off, but it'd be a perfectly adequate solution for me.
from nrepl.
There's something about the scope of this issue which is not clear to me: what kind of issues are we trying to debug? Transport/serialization issues or applicative issues (non-conforming messages etc.)?
I believe we shouldn't try to address both of them at once.
from nrepl.
Transport/serialization issues or applicative issues (non-conforming messages etc.)?
Both. :-)
I believe we shouldn't try to address both of them at once.
Yeah, I agree with you, therefore my suggestion to split this PR in two and focus on the more common problem - the non-conforming messages.
Transport/serialization issues weren't very common in the past (mostly because everyone was using the same transport, which was pretty well-tested), but I assume that when we start rolling out new transports there might be some rough edges there, that's why some mechanism to monitor the serialization would be useful.
from nrepl.
I am trying to debug an issue where internal messages sent from Cursive (i.e. not sent by the user) are printed in the Cursive REPL, instead of hidden. Colin Fleming suspects the response message ID might not match the original request anymore, but to confirm that, we would need logs of the nREPL messages that are actually sent over the wire. Is there already a solution for this in nREPL?
from nrepl.
@devurandom Nope, we never managed to sort out message logging on the server-side. There was some work done in #87, but it was not completed.
from nrepl.
@plexus just created https://github.com/lambdaisland/nrepl-proxy as a debugging tool for nREPL connections!
from nrepl.
Cool idea!
from nrepl.
Related Issues (20)
- ClassCastException raised when connecting to nREPL server via nrepl+unix HOT 18
- nREPL 0.9 HOT 4
- Ability to control the sideloader middleware under a system property HOT 3
- Change groupid to org.nrepl
- Document better the lookup middleware return values HOT 2
- When a test fails, there is a set of parens around the actual result HOT 4
- Dynamically load .class files HOT 6
- Avoid illegal reflective access HOT 14
- Support TLS server sockets HOT 8
- Get repl statistics (most called functions, time spent on execution..) HOT 1
- [EASY] Reflection Warning (with solution)
- Recommended practices for tools to listen to nREPL evaluations HOT 3
- Can't define dynamic var in nrepl HOT 4
- nrepl transports should `read` with `{:read-cond :allow}` options HOT 2
- project.clj on the main branch is still set to 0.9.0 HOT 2
- Document the -f option to nrepl.cmdline
- java.lang.ArithmeticException: long overflow at nrepl.bencode$read_long.invokeStatic(bencode.clj:128) HOT 9
- test suite fails on MS-Windows
- Please add examples to CLI doc
- Interrupt is broken on JVM 20+ HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrepl.