Closed wiredsister closed 8 years ago
Thanks for the update. They are indeed useful. Better documentation is always good. You could also remove the syslog-message pin from the README since I've finally uploaded it to the official Opam repo this night :-)
After adding the pin to Decompress the initial build error was gone. However now I've got another one, but we might want to track it in a separate issue:
~/fooIdoo/ohmyocaml/syslogd-mirage (master ✔) ᐅ make |& huh
inflator.ml:36 46-49
33 | | _ ->
34 | let tmp = Bytes.copy output in
35 | XInflator.flush inflator;
36 | eventually_inflate inflator (tmp :: acc)
37 | in
38 | eventually_inflate inflator []
39 |
Error: The types don't match.
This is: string list
Wanted: bytes list
Extra info: Type string is not compatible with type bytes
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
as the working directory does not look like an ocamlbuild project (no
'_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
you should add the option "-r" or create an empty '_tags' file.
To enable recursive traversal for some subdirectories only, you can use the
following '_tags' file:
true: -traverse
<dir1> or <dir2>: traverse
Makefile:26: recipe for target 'main.native' failed
make: *** [main.native] Error 10
This might be related to the -safe-string compiler flag which turns strings into immutable strings and changes the previous string semantics into the bytes type.
@Leonidas-from-XIV You're right. Removing safe_string from SYNTAX in the Makefile manually made it compile without any errors.
I think it would be preferable to keep safe-string (since it is awesome) and add an explicit conversion instead.
I wonder if @engil encountered this? Maybe this should turn into an issue for Deflator?
I did, this is because all warning were activated during the latest Mirage update. So a few things broke. You can either disable the right warning (there is an option in the latest mirage build, don't remember the actual name), or you can use the latest version of inflator.ml from Canopy's repository. :)
Also, if you don't have mirage-git installed, it borks for you when it can't find irmin.git
. Need to add to dependencies correctly.
Thanks @Engil. I think we'll probably go the simplest route and copy Canopy's latest. So HEAD right now has the correct file? I haven't done a diff, but just looking through Canopy's history, it seems like the last time it was changed was during the Mirage hackathon. Unless, I'm missing something, don't we already have the latest?
It was this commit: https://github.com/Engil/Canopy/commit/de93e06e0a60608e5c1e9b2582db75612346cf82 It fixes the bytes/string problem, normally. :)
@verbosemode added opam install syslog-message
to replace the pin add and fixed the mirage-git
missing dep. Any chance you could try with https://github.com/verbosemode/syslogd-mirage/pull/5/commits/108e364ce9d94df4225aaa34e91ef94febd50dee and see if it works for you.
Thanks. This looks good.
Are these changes useful?
I know @verbosemode had trouble with decompress the first time, so I figured the explicit pin add should fix. Did pinning it work for you @verbosemode?