runoshun / OCamlKeepassHttp

Keepass HTTP compatible server running on nodejs, written by ocaml.
GNU General Public License v3.0
2 stars 1 forks source link

Build broken - Syntax error in index.ml #1

Open PaddeK opened 8 years ago

PaddeK commented 8 years ago

Hi,

i am trying to build OCamlKeepassHttp and getting the following error message:

$ make
ocamlbuild -use-ocamlfind -X semantic -X node_modules src-ocaml/index.byte
+ ocamlfind ocamldep -modules src-ocaml/index.ml > src-ocaml/index.ml.depends
File "src-ocaml/index.ml", line 10, characters 13-15:
Error: Syntax error
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
make: *** [_build/src-ocaml/index.byte] Error 10

Running on OSX 10.11.1 with OCaml 4.02.3, OPAM 1.2.2 and opam list output is:

# Installed packages for system:
base-bigarray         base  Bigarray library distributed with the OCaml compiler
base-bytes            base  Bytes library distributed with the OCaml compiler
base-threads          base  Threads library distributed with the OCaml compiler
base-unix             base  Unix library distributed with the OCaml compiler
base64               2.0.0  Base64 encoding and decoding library
biniou               1.0.9  Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve
camlp4         4.02+system  Camlp4 is a system for writing extensible parsers for programming languages
cmdliner             0.9.8  Declarative definition of command line interfaces for OCaml
cppo                 1.3.1  Equivalent of the C preprocessor for OCaml programs
easy-format          1.0.2  High-level and functional interface to the Format module of the OCaml standard library
js_of_ocaml            2.6  Compiler from OCaml bytecode to Javascript
lwt                  2.5.0  A cooperative threads library for OCaml
menhir            20151103  LR(1) parser generator
ocamlfind            1.5.6  A library manager for OCaml
ppx_deriving           3.0  Type-driven code generation for OCaml >=4.02
ppx_tools           0.99.3  Tools for authors of ppx rewriters and other syntactic tools
yojson               1.2.3  Yojson is an optimized parsing and printing library for the JSON format 

Sadly i have no no experience whatsoever in OCaml and cant fix it myself.

runoshun commented 8 years ago

I'm sorry for late reply.

I fixed it in 433b3ff975e0eff33c2d72f46f33e6e91e30db66. (The cause is lack of _tags file.) And, If you just want to use node-keepass-http, you can install it via npm. I update README. Please check it.

PaddeK commented 8 years ago

I got it working! First i tried via simple npm install and it worked fine. Then i noticed it keeps spitting out: "[error] key : 'Id' is not found." while still working fine though. So i wanted to take a look at the source and tried compiling it again. As i am working on a osx machine i quickly ran into some trouble with the "echo -e" commands in the _tags file building portion of the make file. After fixing that with replacing "echo -e" to "printf" and manual correction of the resulting _tags file it compiled fine. But even with no optimization, pretty flag etc. the resulting js file is unreadable, it works but sadly it is unusable for modification etc. :sob: I guess i have to learn OCaml or start from scratch to get what i want.

Thanks for fixing the issue! Soon i have to move from my passwordbox password manager to a keepass based solution and your node-keepass-http is a huge step in the right direction.