Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration issues (with patch) #91

Open
thomega opened this issue Jan 10, 2020 · 0 comments
Open

configuration issues (with patch) #91

thomega opened this issue Jan 10, 2020 · 0 comments

Comments

@thomega
Copy link

thomega commented Jan 10, 2020

Using ocaml 4.09.0 from opam version 2.0.5 on debian buster, I had to make two changes.

There's a typo in src/genconfig.sh: it should test for /var/run/postgresql to be a directory instead of a file:

diff --git a/src/genconfig.sh b/src/genconfig.sh
index 9c5f2e0..730eff0 100755
--- a/src/genconfig.sh
+++ b/src/genconfig.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-DIR=`[ -f /var/run/postgresql ] && echo "/var/run/postgresql" || echo "/tmp"`
+DIR=`[ -d /var/run/postgresql ] && echo "/var/run/postgresql" || echo "/tmp"`
 DIR=`echo $DIR | sed "s~/~\\\\\\/~g"`
 
 DEFAULT_PASSWORD=

and here is what I had to change to make test_ppx compile

diff --git a/tests_ppx/test_ppx.ml b/tests_ppx/test_ppx.ml
index 5dd3aec..e80a718 100644
--- a/tests_ppx/test_ppx.ml
+++ b/tests_ppx/test_ppx.ml
@@ -21,15 +21,15 @@ let init_dbh dbh =
   )"]
 
 module Userid: sig
-  type t
+  type t = Int32.t
   val to_string : t -> string
   val from_string : string -> t
   val to_int : t -> int
 end = struct
-  type t = int
-  let to_string = string_of_int
-  let from_string = int_of_string
-  let to_int x = x
+  type t = Int32.t
+  let to_string = Int32.to_string
+  let from_string = Int32.of_string
+  let to_int = Int32.to_int
 end
 
 let employee_exists dbh ?email n =

Finally, the README.md might want to point new users to https://camlspotter.gitlab.io/blog/2019-04-16-pgocaml/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant