# HG changeset patch # User wenzelm # Date 1521727874 -3600 # Node ID 1722384ffd4ab762e75e856688d1bff1ebe7b709 # Parent c3c74310154e9e6927846ed4c55b89f5968f55e5 clarified signature: more uniform session_id; diff -r c3c74310154e -r 1722384ffd4a src/Doc/System/Server.thy --- a/src/Doc/System/Server.thy Thu Mar 22 14:57:42 2018 +0100 +++ b/src/Doc/System/Server.thy Thu Mar 22 15:11:14 2018 +0100 @@ -505,6 +505,11 @@ and thus allows the client to control it by the \<^verbatim>\cancel\ command. The same task identification is included in all messages produced by this task. + \<^item> \<^bold>\type\ \session_id = {session_id: uuid}\ identifies a newly created PIDE + session managed by the server. Sessions are independent of client + connections and may be shared by different clients, as long as the internal + session identifier is known. + \<^item> \<^bold>\type\ \node_status = {ok: bool, total: int, unprocessed: int, running: int, warned: int, failed: int, finished: int, consolidated: bool}\ represents a formal theory node status of the PIDE document model. Fields @@ -596,8 +601,8 @@ \end{tabular} \<^medskip> - The command invocation \<^verbatim>\cancel {"task":\~\id\\<^verbatim>\}\ attempts to cancel the - specified task. + The command \<^verbatim>\cancel {"task":\~\id\\<^verbatim>\}\ attempts to cancel the specified + task. Cancellation is merely a hint that the client prefers an ongoing process to be stopped. The command always succeeds formally, but it may get ignored by @@ -761,14 +766,10 @@ argument: & \session_build_args \ {print_mode?: [string]}\ \\ immediate result: & \<^verbatim>\OK\ \task\ \\ notifications: & \<^verbatim>\NOTE\ \task \ (theory_progress | message)\ \\ - regular result: & \<^verbatim>\FINISHED\ \task \ session_start_result\ \\ + regular result: & \<^verbatim>\FINISHED\ \task \ session_id\ \\ error result: & \<^verbatim>\FAILED\ \task \ error_message\ \\[2ex] \end{tabular} - \begin{tabular}{l} - \<^bold>\type\ \session_start_result = {session: string, session_id: uuid}\ - \end{tabular} - \<^medskip> The \<^verbatim>\session_start\ command starts a new Isabelle/PIDE session with underlying Isabelle/ML process, based on a session image that it produces on @@ -804,12 +805,9 @@ subsubsection \Results\ text \ - The \session\ field provides the active session name for clarity. - - \<^medskip> - The \session_id\ field provides the internal identification of the session - object within the sever process. It can remain active as long as the server - is running, independently of the current client connection. + The \session_id\ provides the internal identification of the session object + within the sever process. It can remain active as long as the server is + running, independently of the current client connection. \ @@ -828,7 +826,7 @@ text \ \begin{tabular}{ll} - argument: & \{session_id: uuid}\ \\ + argument: & \session_id\ \\ immediate result: & \<^verbatim>\OK\ \task\ \\ regular result: & \<^verbatim>\FINISHED\ \task \ session_stop_result\ \\ error result: & \<^verbatim>\FAILED\ \task \ error_message \ session_stop_result\ \\[2ex] @@ -849,8 +847,8 @@ subsubsection \Arguments\ text \ - The \session_id\ field provides the UUID originally created by the server - for this session. + The \session_id\ provides the UUID originally created by the server for this + session. \ diff -r c3c74310154e -r 1722384ffd4a src/Pure/Tools/server_commands.scala --- a/src/Pure/Tools/server_commands.scala Thu Mar 22 14:57:42 2018 +0100 +++ b/src/Pure/Tools/server_commands.scala Thu Mar 22 15:11:14 2018 +0100 @@ -136,9 +136,8 @@ log = log) val id = UUID() - val res = JSON.Object("session" -> base_info.session, "session_id" -> id.toString) - (res, id -> session) + (JSON.Object("session_id" -> id.toString), id -> session) } }