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

[new release] base64 (3.0.0) #13297

Merged
merged 3 commits into from
Jan 22, 2019
Merged

Conversation

dinosaure
Copy link
Contributor

Base64 encoding for OCaml

CHANGES:
  • check isomorphism
  • check bijection
  • check if decode does not raise any exception

CHANGES:

* Implemenation of Base64 according to RFC 2045 (available on base64.rfc2045)
* New implementation of Base64 according to RFC 4648 from nocrypto's implementation
* Fix bad access with `String.iter` on the old implementation of Base64 (@dinosaure, mirage/ocaml-base64#23)
* Check isomorphism between `encode` & `decode` function (@hannesm, @dinosaure, mirage/ocaml-base64#20)
* Add tests from RFC 3548 and from PHP impl. (@hannesm, @dinosaure, mirage/ocaml-base64#24)
* Add fuzzer on both implementations
 - check isomorphism
 - check bijection
 - check if `decode` does not raise any exception
* __break-api__, `B64` was renamed to `Base64` (@copy, @avsm, @dinosaure, mirage/ocaml-base64#17)
* __break-api__, `Base64.decode` and `Base64.encode` returns a result type instead to raise an exception (@hannesm, @dinosaure, mirage/ocaml-base64#21)
* __break-api__, Add `sub` type to avoid allocation to the end-user (@avsm, @dinosaure, mirage/ocaml-base64#24)
* __break-api__, Add `pad` argument on `decode` function to check if input is well-padded or not (@hannesm, @dinosaure, mirage/ocaml-base64#24)
* __break-api__, Add `off` and `len` optional arguments on `encode` & `decode` functions to compute a part of input (@cfcs, @dinosaure, mirage/ocaml-base64#24)
* Better performance (see mirage/ocaml-base64#24) (@dinosaure)
* Review of code by @cfcs (see mirage/ocaml-base64#24)
@dinosaure
Copy link
Contributor Author

REVDEPS failure was expected, so we need to do a pass over dependencies now ...

@avsm
Copy link
Member

avsm commented Jan 21, 2019

@dinosaure you can do opam admin add-constraint "base64<3.0.0" in your opam-repository since this will break pretty much everything. Also a quick discuss.ocaml.org post with tag mirageos would be helpful to let people know.

@dinosaure
Copy link
Contributor Author

I'm currently write an article about release of ocaml-base64 👍 !

@camelus
Copy link
Contributor

camelus commented Jan 21, 2019

🌤️ opam-lint warnings 120c118
  • capnp-rpc-lwt.0.2 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • capnp-rpc-lwt.0.3.1 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • capnp-rpc-lwt.0.3 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • frenetic.3.3.0 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
  • frenetic.3.4.0 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
  • frenetic.3.4.1 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
  • irmin-indexeddb.0.1 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • irmin-indexeddb.0.2 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • irmin-indexeddb.0.3 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • jwt.0.1 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • links.0.6.1 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • links.0.6 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • links.0.7.1 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • links.0.7 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • ojs-base.0.3.0 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • ojs-base.0.4.0 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • ojs-base.0.5.0 has some warnings:

    • warning 47: Synopsis should start with a capital and not end with a dot
  • piqilib.0.6.12 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
  • These packages passed lint tests: aws-s3.4.0.0, aws-s3.4.0.1, aws-s3.4.1.0, aws-s3.4.2.0, base64.3.0.0, biocaml.0.8.0, biocaml.0.9.0, bulletml.0.1.0, bulletml.0.2.0, coclobas.0.0.0, coclobas.0.0.1, coclobas.0.0.2, cohttp.0.15.0, cohttp.0.15.1, cohttp.0.15.2, cohttp.0.16.0, cohttp.0.16.1, cohttp.0.17.0, cohttp.0.17.1, cohttp.0.17.2, cohttp.0.18.0, cohttp.0.18.1, cohttp.0.18.2, cohttp.0.18.3, cohttp.0.19.0, cohttp.0.19.1, cohttp.0.19.2, cohttp.0.19.3, cohttp.0.20.0, cohttp.0.20.1, cohttp.0.20.2, cohttp.0.21.0, cohttp.0.21.1, cohttp.0.22.0, cohttp.0.99.0, cohttp.1.0.0, cohttp.1.0.2, cohttp.1.1.0, cohttp.1.1.1, cohttp.1.2.0, dns.0.12.0, dns.0.13.0, dns.0.14.0, dns.0.14.1, dns.0.15.0, dns.0.15.1, dns.0.15.2, dns.0.15.3, dns.0.16.0, dns.0.17.0, dns.0.18.0, dns.0.18.1, dns.0.19.0, dns.0.19.1, dns.0.20.0, dns.0.20.1, dns.1.0.0, dns.1.0.1, dns.1.1.0, elf2json.1.0.0, frenetic.5.0.0, frenetic.5.0.2, frenetic.5.0.3, imap.1.0, imap.1.1.0, imap.1.1.1, js_of_ocaml.2.6, js_of_ocaml.2.7, js_of_ocaml.2.8.1, js_of_ocaml.2.8.2, js_of_ocaml.2.8.3, js_of_ocaml.2.8.4, js_of_ocaml.2.8, jupyter.0.0.0, jupyter.0.1.0, jupyter.1.0.0, jupyter.1.0.1, jupyter.1.0.2, jupyter.1.1.0, jupyter.2.0.0, jupyter.2.1.0, jupyter.2.2.0, jupyter.2.2.1, jupyter.2.2.2, jupyter.2.3.0, jupyter.2.3.1, jupyter.2.3.2, jupyter.2.3.3, jupyter.2.3.4, jupyter.2.3.5, jupyter.2.4.0, jwto.0.1.4, links.0.7.2, links.0.7.3, links.0.8, macaroons.0.1.0, macaroons.0.1.1, ocamltter.4.1.0, ocamltter.4.1.1, opium.0.12.0, opium.0.13.0, opium.0.13.1, opium.0.13.2, opium.0.13.3, opium.0.14.0, opium.0.15.0, opium.0.15.1, opium_kernel.0.16.0, opium_kernel.0.17.0, pgx.0.1, pgx_async.0.1, pgx_lwt.0.1, pgx_unix.0.1, piqilib.0.6.13, piqilib.0.6.14, plotkicadsch.0.1.4, plotkicadsch.0.2.0, plotkicadsch.0.3.0, plotkicadsch.0.4.0, ppx_relit.0.1, ppx_relit.0.2.0, relit_helper.0.1, relit_helper.0.2.0, websocket.2.10, websocket.2.12, ws.0.1


☀️ Installability check (10248 → 10249)
  • new installable packages (1): base64.3.0.0

@dinosaure
Copy link
Contributor Author

Hmmhmm, what is wrong now?

Copy link
Member

@avsm avsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to merge; just unrelated breakage.

@dinosaure do you want to prepare the discuss post before merge? When merged, this will break a lot of --dev packages until the upstreams add constraints too.

@kit-ty-kate
Copy link
Member

This needs a constraint on the OCaml compiler:

#=== ERROR while compiling base64.3.0.0 =======================================#
# context     2.0.0 | linux/x86_64 | ocaml-base-compiler.4.02.3 | file:///home/travis/build/ocaml/opam-repository
# path        ~/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/base64.3.0.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p base64 -j 1
# exit-code   1
# env-file    ~/.opam/log/base64-14029-b57730.env
# output-file ~/.opam/log/base64-14029-b57730.out
### output ###
#       ocamlc src/.base64.objs/base64.{cmi,cmti} (exit 2)
# (cd _build/default && /home/travis/.opam/ocaml-base-compiler.4.02.3/bin/ocamlc.opt -w -40 -g -bin-annot -I src/.base64.objs -I src/.base64.objs/.private -I /home/travis/.opam/ocaml-base-compiler.4.02.3/lib/bytes -no-alias-deps -o src/.base64.objs/base64.cmi -c -intf src/base64.mli)
# File "src/base64.mli", line 65, characters 86-118:
# Error: Unbound type constructor result

@dinosaure
Copy link
Contributor Author

About article, I will try to do something but consider to merge before.

@kit-ty-kate
Copy link
Member

Thanks

@kit-ty-kate kit-ty-kate merged commit 717295b into ocaml:master Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants