Yaron Minsky avatar Yaron Minsky committed 33c8676

update to latest core

Comments (0)

Files changed (5)

 true: syntax(camlp4o)
-true: package(core,sexplib.syntax,bin_prot.syntax,comparelib.syntax,fieldslib.syntax,variantslib.syntax,async)
+true: package(core,sexplib.syntax,bin_prot.syntax,comparelib.syntax,fieldslib.syntax,variantslib.syntax,async,core_extended)
 true: thread,debug,annot
   ]
 
 let start_server () =
-  let server =
+  let implementations =
     match
-      Rpc.Server.create
+      Rpc.Implementations.create
         ~implementations
         ~on_unknown_rpc:`Ignore
     with
       Rpc.Connection.server_with_close r w
         ~connection_state:directory
         ~on_handshake_error:`Ignore
-        ~server
+        ~implementations
     )
   >>= fun server ->
   Tcp.Server.close_finished server
+#!/usr/bin/env bash
+
+./build.sh \
+    hello_world.byte \
+    hello_client.byte \
+    hello_server.byte \
+    broker.byte \
+    client.byte \
+
     Rpc.Rpc.dispatch shutdown_rpc conn ()
     >>= function
     | Ok  () -> return ()
-    | Error exn -> eprintf "failed!\n"; return ()
+    | Error err ->
+      eprintf "failed!\n%s\n" (Error.to_string_hum err);
+      return ()
   )
 
 let shutdown_cmd =
   Topic_pub.publish s message
 
 let subscribe t topic =
-  match Hashtbl.find t topic with
-  | None -> None
-  | Some s -> Some (Topic_pub.subscribe s)
-
-let subscribe t topic =
   Option.map (Hashtbl.find t topic) ~f:Topic_pub.subscribe
 
-let subscribe t topic =
-  let open Option.Monad_infix in
-  Hashtbl.find t topic
-  >>| fun s ->
-  Topic_pub.subscribe s
-
 let dump t =
   Hashtbl.to_alist t
   |! List.map ~f:(fun (topic,tpub) ->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.