hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Port to dune #217

Closed sternenseemann closed 3 years ago

sternenseemann commented 3 years ago

I don't have too much experience with dune, but I thought I'd give it a shot.

I'm looking for feedback on the following things:

hannesm commented 3 years ago

thank you very much for doing this work. I have not yet reviewed in detail, but to answer your questions:

I'm not sure I'll be able to review and merge before I leave for a week of vacation, thus sorry if the merge is delayed. I'll definitively work on merging it later in August.

sternenseemann commented 3 years ago

No need for a rush, I hope you'll have a nice vacatation :)

I've removed mirage-crypto, moved the lower bound for ocaml to 4.08 and also tried to change the travis config, I hope this works also in the PR. Also: I was under the impression there was no camlp4 for ocaml >= 4.09 at all?

For the utop issue: My error is here, I guess it could be a NixOS-related issue, but I'm not sure what exactly is missing in ld's search path since I'm not to familiar with how OCaml linking and especially this utop feature works.

hannesm commented 3 years ago

Thanks, this looks nice. I pushed some minor tweaks, and will merge if CI succeeds.

I currently have trouble with dune utop, i. e. ld can't find some symbols of notty. I'm really not sure if this might be caused by my local setup, maybe someone else can test this as well with my changes.

For me on a FreeBSD system, dune utop works nicely. A utop session uses the bytecode (interpreted) OCaml -- and thus needs to load libnotty_unix_stubs.a -- maybe this is not properly installed on your system?

I was under the impression there was no camlp4 for ocaml >= 4.09 at all?

camlp4 is these days maintained by community (mainly ygrek) under https://github.com/camlp4/camlp4 -- and already a compatibility release for ocaml 4.11 is out (though there was discussion to bury it on discuss.ocaml.org -- eventually jackline should move forward to a different (camlp4-free) xmpp stack (https://github.com/jeffa5/mirage-xmpp).

sternenseemann commented 3 years ago

and already a compatibility release for ocaml 4.11 is out

Alright, I guess I'll have to get on packaging the newer camlp4 versions for NixOS sooner or later.

and thus needs to load libnotty_unix_stubs.a -- maybe this is not properly installed on your system?

I'll look into it, I suspect our OCaml packages don't install bytecode libs or something?!