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

Use bigarray-compat #27

Merged
merged 1 commit into from
Jan 28, 2020
Merged

Use bigarray-compat #27

merged 1 commit into from
Jan 28, 2020

Conversation

TheLortex
Copy link
Contributor

In the mirage dunification effort (mirage/mirage#969)

The goal of bigarray-compat is to use Stdlib.Bigarray when possible (>= 4.07) but fallback to Bigarray. This allows to avoid the unix dependency grabbed by Bigarray and helps for mirage builds.

It's also possible to directly use Stdlib.Bigarray instead, if < 4.07 compatibility is not necessary.

@XVilka
Copy link

XVilka commented Jun 14, 2019

Fails to compile on 4.04 and 4.03 versions:

#=== ERROR while compiling asn1-combinators.0.2.0 =============================#
# context     2.0.3 | linux/x86_64 | ocaml-base-compiler.4.04.2 | pinned(file:///home/travis/build/mirleft/ocaml-asn1-combinators)
# path        ~/.opam/ocaml-base-compiler.4.04.2/.opam-switch/build/asn1-combinators.0.2.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p asn1-combinators -j 1
# exit-code   1
# env-file    ~/.opam/log/asn1-combinators-25030-ffb3fd.env
# output-file ~/.opam/log/asn1-combinators-25030-ffb3fd.out
### output ###
#       ocamlc src/.asn1_combinators.objs/byte/asn_combinators.{cmi,cmo,cmt} (exit 2)
# (cd _build/default && /home/travis/.opam/ocaml-base-compiler.4.04.2/bin/ocamlc.opt -w -40 -g -bin-annot -I src/.asn1_combinators.objs/byte -I src/.asn1_combinators.objs/public_cmi -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/bigarray-compat -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/cstruct -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/ptime -I /home/travis/.opam/ocam[...]
# File "src/asn_combinators.ml", line 94, characters 16-34:
# Error: Unbound value M2.max_binding_opt

@TheLortex
Copy link
Contributor Author

It fails the same way on master, this patch is unrelated

@XVilka
Copy link

XVilka commented Jun 17, 2019

Then there is no reason not to merge.

@TheLortex
Copy link
Contributor Author

Why that ? It still fixes #28

@XVilka
Copy link

XVilka commented Jun 17, 2019

@TheLortex sorry, I used double negation, might be unclear.

@TheLortex
Copy link
Contributor Author

Oh right, my bad ! We just need to wait for @pqwy's approval then.

@XVilka
Copy link

XVilka commented Jun 28, 2019

@pqwy @hannesm could you check this one please?

@XVilka
Copy link

XVilka commented Jul 1, 2019

Are there any updates?

@XVilka XVilka mentioned this pull request Jul 1, 2019
@hannesm hannesm merged commit dd1c121 into mirleft:master Jan 28, 2020
hannesm added a commit to hannesm/opam-repository that referenced this pull request Jan 28, 2020
CHANGES:

* disallow various constructs as suggested by ITU-T Rec X.690 (by @pqwy)
  * redundant OID component forms (X.690 8.20.2)
  * redundant integer forms (X.690 8.3.2)
  * empty integer (X.690 8.3.1, reported in mirleft/ocaml-asn1-combinators#23 by @emillon)
  * constructed strings in DER
* deeper implict -> explicit over choice (follow-up to v0.2.0 entry, by @pqwy)
* handle long-form length overflow (reported in mirleft/ocaml-asn1-combinators#24 by @emillon, fixed by @pqwy)
* disallow primitive with indefinite length (introduced in the bugfix above,
  reported by @emillon, fixed in mirleft/ocaml-asn1-combinators#32 by @hannesm)
* disallow nonsensical bitstring unused values (X690 8.6.2, reported in mirleft/ocaml-asn1-combinators#26
  by @NathanReb, fixed by @pqwy)
* fix non-continuous bit_string_flags (X680 22.6, reported in mirleft/ocaml-asn1-combinators#25 by @wiml,
  fixed by @pqwy)
* use Alcotest instead of oUnit for unit tests (by @pqwy)
* use dune as build system (by @pqwy, superseeds mirleft/ocaml-asn1-combinators#22)
* use bigarray-compat (mirleft/ocaml-asn1-combinators#27 by @TheLortex) and stdlib-shims (mirleft/ocaml-asn1-combinators#29 by @XVilka)
* raise lower bound to OCaml 4.05.0 (mirleft/ocaml-asn1-combinators#31 by @hannesm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants