hannesm / jackline

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

Compiling fails after upgrade to tls 0.9.0 #181

Closed verbosemode closed 6 years ago

verbosemode commented 6 years ago

Compiling fails after upgrading tls to 0.9.0, since some functions expect a Ptime.t now instead of a float. One relevant function is in cli/cli_state.ml on line 273 , where ~time is supposed to be of Ptime.t:

let auth = X509.Authenticator.server_cert_fingerprint ~time ~hash ~fingerprints in

This is just a heads-up. Maybe someone is faster in coming up with a PR :)

~ ❯ opam install jackline
The following actions will be performed:
  ∗  install asn1-combinators 0.2.0           [required by x509]
  ∗  install ppx_driver       v0.10.1         [required by ppx_sexp_conv]
  ∗  install ppx_metaquot     v0.10.0         [required by ppx_sexp_conv]
  ∗  install ppx_type_conv    v0.10.0         [required by ppx_sexp_conv]
  ∗  install ppx_sexp_conv    v0.10.0         [required by jackline]
  ∗  install x509             0.6.1           [required by jackline]
  ∗  install tls              0.9.0           [required by jackline]
  ∗  install jackline         0.1.0  
===== ∗  8 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[asn1-combinators] Archive in cache
[ppx_driver] Archive in cache
[ppx_metaquot] Archive in cache
[ppx_sexp_conv] Archive in cache
[ppx_type_conv] Archive in cache
[tls] Archive in cache
[x509] Archive in cache
[jackline] https://github.com/hannesm/jackline.git updated

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed asn1-combinators.0.2.0
∗  installed ppx_driver.v0.10.1
∗  installed ppx_metaquot.v0.10.0
∗  installed ppx_type_conv.v0.10.0
∗  installed ppx_sexp_conv.v0.10.0
∗  installed x509.0.6.1
∗  installed tls.0.9.0
[ERROR] The compilation of jackline failed at "ocaml pkg/pkg.ml build --pinned true".

#=== ERROR while installing jackline.0.1.0 ====================================#
# opam-version 1.2.2
# os           linux
# command      ocaml pkg/pkg.ml build --pinned true
# path         /home/lobo/.opam/4.05.0-jackline/build/jackline.0.1.0
# compiler     4.05.0
# exit-code    1
# env-file     /home/lobo/.opam/4.05.0-jackline/build/jackline.0.1.0/jackline-12602-616e65.env
# stdout-file  /home/lobo/.opam/4.05.0-jackline/build/jackline.0.1.0/jackline-12602-616e65.out
# stderr-file  /home/lobo/.opam/4.05.0-jackline/build/jackline.0.1.0/jackline-12602-616e65.err
### stdout ###
# [...]
# ocamlfind ocamldep -package 'uutf uucp uuseg' -package 'notty lwt' -package 'sexplib astring uchar' -modules cli/cli_support.ml > cli/cli_support.ml.depends
# ocamlfind ocamldep -package 'sexplib astring uchar' -modules src/escape.ml > src/escape.ml.depends
# ocamlfind ocamlc -c -g -bin-annot -safe-string -principal -package 'hex nocrypto erm_xmpp tls.lwt x509' -package 'notty lwt' -package 'sexplib astring uchar' -w +A-4-44-48-58 -color always -I cli -I src -o cli/cli_state.cmo cli/cli_state.ml
# ocamlfind ocamlc -c -g -bin-annot -safe-string -principal -package 'uutf uucp uuseg' -package 'notty lwt' -package 'sexplib astring uchar' -w +A-4-44-48-58 -color always -I cli -I src -o cli/cli_support.cmo cli/cli_support.ml
# ocamlfind ocamlc -c -g -bin-annot -safe-string -principal -package 'sexplib astring uchar' -w +A-4-44-48-58 -color always -I src -I cli -o src/escape.cmo src/escape.ml
# + ocamlfind ocamlc -c -g -bin-annot -safe-string -principal -package 'hex nocrypto erm_xmpp tls.lwt x509' -package 'notty lwt' -package 'sexplib astring uchar' -w +A-4-44-48-58 -color always -I cli -I src -o cli/cli_state.cmo cli/cli_state.ml
# File "cli/cli_state.ml", line 273, characters 68-72:
# Error: This expression has type float but an expression was expected of type
#          Ptime.t
# Command exited with code 2.
### stderr ###
# [...]
# pkg.ml: [WARNING] file opam: opam field "maintainer" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "authors" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "homepage" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "bug-reports" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "doc" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "license" undefined or unsupported
# pkg.ml: [WARNING] file opam: opam field "dev-repo" undefined or unsupported
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
#      '-build-dir' '_build' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md'
#      'README.md' 'bin/jackline.native']: exited with 10
hannesm commented 6 years ago

oh, thanks. I'm unfortunately pretty busy right now, and instead adjusted the upper bounds for jackline in this opam file and in the xmpp-opam repository with < "0.9.0"... won't be able to deal with this before 2018

hannesm commented 6 years ago

and regarding toot: this application is not released yet ;)

hannesm commented 6 years ago

since https://github.com/hannesm/jackline/commit/afee826c5d297f5c2dfe95dc41b8a80c54be9ef9 jackline requires tls >= 0.9.0