[cmake-developers] Debugger for CMake

Brad King brad.king at kitware.com
Tue Feb 14 08:22:24 EST 2017


On 02/13/2017 10:18 PM, Justin Berger wrote:
> I agree on the maximizing code reuse, but that doesn't require them to use
> the same operational mode -- the two modes do fundamentally different things

Right.  We shouldn't necessarily expect the server to start and then decide
whether it is a code model server or debug server when the client connects
and tells it.  Currently the model is that the client is responsible for
starting the server and then connecting to it.  We just need a different
command-line option for a debug client to start a debug server instead.

> Admittedly the current branch does use straight JSON by default instead of
> the '[== "CMake Server" ==[' buffering strategy to delimit json messages
> off the wire, but I wasn't entirely sure the reasoning behind those
> delimiters since you know when a message ends just based on the root
> JSON object closing.

The reason for the separate bounding structure is so that the entire message
can be extracted from a stream without having to run a live JSON parser on
it.  We can extract the whole message and then parse it as JSON.  Another
reason is that the --debug mode puts the messaging straight on stdout/stdin
that are also used for other output that does not conform to the protocol.
The separate bracketing is then necessary.

> Should I resumbit the MR to continue the discussion there?

Please re-open the original MR.  I think high-level discussion on this
list has established that your approach is viable.  It may take me a while
to find time for a thorough review though.

Thanks,
-Brad



More information about the cmake-developers mailing list