Skip to content

Commit

Permalink
don't prefix Stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
yasunariw committed Apr 22, 2024
1 parent 041fc71 commit d52a846
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 0 additions & 2 deletions lib/api_local.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
open Common
open Devkit
open Printf
module Filename = Stdlib.Filename
module Sys = Stdlib.Sys

let cwd = Sys.getcwd ()
let github_cache_dir = Filename.concat cwd "github-api-cache"
Expand Down
6 changes: 3 additions & 3 deletions lib/api_remote.ml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module Slack : Api.Slack = struct
(* must read whole response to update lexer state *)
ignore (Slack_j.read_ok_res s l)

let lookup_user_cache = Stdlib.Hashtbl.create 50
let lookup_user_cache = Hashtbl.create 50

let lookup_user' ~(ctx : Context.t) ~(cfg : Config_t.config) ~email () =
(* Check if config holds the Github to Slack email mapping *)
Expand All @@ -140,15 +140,15 @@ module Slack : Api.Slack = struct
with
| Error _ as e -> Lwt.return e
| Ok user ->
Stdlib.Hashtbl.replace lookup_user_cache email user;
Hashtbl.replace lookup_user_cache email user;
Lwt.return_ok user

(** [lookup_user cfg email] queries slack for a user profile with [email] *)
let lookup_user ?(cache : [ `Use | `Refresh ] = `Use) ~(ctx : Context.t) ~(cfg : Config_t.config) ~email () =
match cache with
| `Refresh -> lookup_user' ~ctx ~cfg ~email ()
| `Use ->
match Stdlib.Hashtbl.find_opt lookup_user_cache email with
match Hashtbl.find_opt lookup_user_cache email with
| Some user -> Lwt.return_ok user
| None -> lookup_user' ~ctx ~cfg ~email ()

Expand Down
1 change: 0 additions & 1 deletion lib/context.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open Common
open Devkit
module Sys = Stdlib.Sys

let log = Log.from "context"

Expand Down
2 changes: 1 addition & 1 deletion lib/github.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let repo_of_notification = function
| Status n -> n.repository

let commits_branch_of_ref ref =
match Stdlib.String.split_on_char '/' ref with
match String.split_on_char '/' ref with
| "refs" :: "heads" :: l -> String.concat "/" l
| _ -> ref

Expand Down
5 changes: 2 additions & 3 deletions src/monorobot.ml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
open Devkit
open Lib
open Cmdliner
module Filename = Stdlib.Filename

let log = Log.from "monorobot"

(* entrypoints *)

let http_server_action addr port config secrets state logfile loglevel =
Daemon.logfile := logfile;
Stdlib.Option.iter Log.set_loglevels loglevel;
Option.may Log.set_loglevels loglevel;
Log.reopen !Daemon.logfile;
Signal.setup_lwt ();
Daemon.install_signal_handlers ();
Expand Down Expand Up @@ -145,4 +144,4 @@ let default, info =
let () =
let cmds = [ run; check_gh; check_slack ] in
let group = Cmd.group ~default info cmds in
Stdlib.exit @@ Cmd.eval group
exit @@ Cmd.eval group
2 changes: 0 additions & 2 deletions test/test.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
open Devkit
open Lib
module Filename = Stdlib.Filename
module Sys = Stdlib.Sys

let log = Log.from "test"
let mock_payload_dir = Filename.concat Filename.parent_dir_name "mock_payloads"
Expand Down

0 comments on commit d52a846

Please sign in to comment.