From fd5bdf27f214841cb9b928abce403e7027d4a454 Mon Sep 17 00:00:00 2001 From: Filipe Marques Date: Thu, 12 Sep 2024 21:02:54 +0100 Subject: [PATCH 1/3] Remove missing license warning when pinning with opam --- benchpress-lsp.opam | 1 + benchpress-server.opam | 1 + benchpress-worker.opam | 1 + benchpress.opam | 1 + 4 files changed, 4 insertions(+) diff --git a/benchpress-lsp.opam b/benchpress-lsp.opam index 46db22f..fb6c984 100644 --- a/benchpress-lsp.opam +++ b/benchpress-lsp.opam @@ -1,5 +1,6 @@ opam-version: "2.0" version: "0.1" +license: "BSD-2-Clause" authors: ["Simon Cruanes" "Guillaume Bury"] synopsis: "LSP server for benchpress' config files" maintainer: "simon.cruanes.2007@m4x.org" diff --git a/benchpress-server.opam b/benchpress-server.opam index 563f166..21f02a2 100644 --- a/benchpress-server.opam +++ b/benchpress-server.opam @@ -1,5 +1,6 @@ opam-version: "2.0" version: "0.1" +license: "BSD-2-Clause" authors: ["Simon Cruanes" "Guillaume Bury"] synopsis: "Server and web UI for benchpress" maintainer: "simon.cruanes.2007@m4x.org" diff --git a/benchpress-worker.opam b/benchpress-worker.opam index 34ff98d..5620946 100644 --- a/benchpress-worker.opam +++ b/benchpress-worker.opam @@ -1,5 +1,6 @@ opam-version: "2.0" version: "0.1" +license: "BSD-2-Clause" authors: ["Simon Cruanes" "Guillaume Bury" "Hichem Rami Ait El Hara"] synopsis: "A benchpress helper worker" maintainer: "simon.cruanes.2007@m4x.org" diff --git a/benchpress.opam b/benchpress.opam index f3b3f6b..1a83b53 100644 --- a/benchpress.opam +++ b/benchpress.opam @@ -1,5 +1,6 @@ opam-version: "2.0" version: "0.1" +license: "BSD-2-Clause" authors: ["Simon Cruanes" "Guillaume Bury"] synopsis: "Tool to run one or more logic programs, on a set of files, and collect the results" maintainer: "simon.cruanes.2007@m4x.org" From 088428ee87279c429796cf27d757f8ea4079eed6 Mon Sep 17 00:00:00 2001 From: Filipe Marques Date: Fri, 13 Sep 2024 00:52:25 +0100 Subject: [PATCH 2/3] Bump tiny_httpd 0.16 -> 0.17 --- benchpress-server.opam | 2 +- src/server/benchpress_server.ml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchpress-server.opam b/benchpress-server.opam index 21f02a2..aef84f2 100644 --- a/benchpress-server.opam +++ b/benchpress-server.opam @@ -21,7 +21,7 @@ depends: [ "gnuplot" { >= "0.6" & < "0.8" } "sqlite3" "sqlite3_utils" { >= "0.4" & < "0.5" } - "tiny_httpd" { >= "0.16" & < "1.0" } + "tiny_httpd" { >= "0.17" & < "1.0" } "printbox" { >= "0.6" } "printbox-text" { >= "0.6" } "ocaml" {>= "4.12" } diff --git a/src/server/benchpress_server.ml b/src/server/benchpress_server.ml index e0c53e9..0a9dba9 100644 --- a/src/server/benchpress_server.ml +++ b/src/server/benchpress_server.ml @@ -2,7 +2,7 @@ open Common module T = Test module H = Tiny_httpd -module U = Tiny_httpd_util +module U = Tiny_httpd.Util module PB = PrintBox module Log = (val Logs.src_log (Logs.Src.create "benchpress-serve")) @@ -1746,9 +1746,9 @@ let handle_file self : unit = Log.debug (fun k -> k "get-file: `%s`" file); let bytes = if file = "prelude" then - H.Byte_stream.of_string Builtin_config.config (* magic file! *) + H.IO.Input.of_string Builtin_config.config (* magic file! *) else ( - try H.Byte_stream.of_chan @@ open_in file + try H.IO.Input.of_in_channel @@ open_in file with e -> H.Response.fail_raise ~code:404 "cannot open file %S:\n\ From 6b10dd5932bd8449f2b94cf85a6811adef5908c7 Mon Sep 17 00:00:00 2001 From: Filipe Marques Date: Fri, 13 Sep 2024 17:25:44 +0100 Subject: [PATCH 3/3] Remove unecessary `result` library --- src/bin/dune | 4 ++-- src/server/dune | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/dune b/src/bin/dune index c6a814f..ee95fce 100644 --- a/src/bin/dune +++ b/src/bin/dune @@ -6,8 +6,8 @@ (promote (into ../..) (until-clean)) - (libraries benchpress containers cmdliner result uuidm logs logs.cli - sqlite3_utils base64) + (libraries benchpress containers cmdliner uuidm logs logs.cli sqlite3_utils + base64) (flags :standard -warn-error -a+8 -safe-string -open Benchpress)) (rule diff --git a/src/server/dune b/src/server/dune index e559d45..9db7e3b 100644 --- a/src/server/dune +++ b/src/server/dune @@ -6,7 +6,7 @@ (promote (into ../../) (until-clean)) - (libraries benchpress containers cmdliner result uuidm logs logs.cli + (libraries benchpress containers cmdliner uuidm logs logs.cli tiny_httpd tiny_httpd.prometheus sqlite3_utils base64 printbox jemalloc) (flags :standard -warn-error -a+8 -safe-string -open Benchpress -linkall))