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] cstruct-async, ppx_cstruct, cstruct, cstruct-unix, cstruct-sexp and cstruct-lwt (4.0.0) #13748

Merged
merged 5 commits into from
Mar 27, 2019

Conversation

avsm
Copy link
Member

@avsm avsm commented Mar 25, 2019

Access C-like structures directly from OCaml

CHANGES:
  • Sexplib is now an optional library for the base Cstruct module.
    A new Cstruct_sexp module has been introduced with the serialiser
    functions, contained within the cstruct-sexp opam package.

    To convert old code, simply use Cstruct_sexp.t instead of
    Cstruct.t in a record type for which you are using [@@deriving sexp].
    This is a type alias to Cstruct.t but also has the right
    sexp-conversion functions in scope. There is an example of this
    in the ppx_test/with-sexp directory in the source repo.

    When you have converted and released your library, add an
    opam constraint of cstruct {>="4.0.0"} to your own opam
    packages to ensure that they pick up this version of the library.
    (fixes sexplib dependency mirage/ocaml-cstruct#222, @avsm)

  • JavaScript stubs are now installed using the jsoo mechanism
    rather than a manual specification (Javascript packaging fixes mirage/ocaml-cstruct#241 @jonludlam)

  • Use computed versions in opam files to ensure that dependent
    opam packages such as cstruct-async get the same base version
    of cstruct to avoid mismatches. (@avsm)

  • Add a ppx test suite to checks that all error paths in ppx
    handling are reachable and have meaningful location info (Test ppx errors mirage/ocaml-cstruct#238 @emillon)

…uct-sexp and cstruct-lwt (4.0.0)

CHANGES:

- Sexplib is now an optional library for the base `Cstruct` module.
  A new `Cstruct_sexp` module has been introduced with the serialiser
  functions, contained within the `cstruct-sexp` opam package.

  To convert old code, simply use `Cstruct_sexp.t` instead of
  `Cstruct.t` in a record type for which you are using `[@@deriving sexp]`.
  This is a type alias to `Cstruct.t` but also has the right
  sexp-conversion functions in scope.  There is an example of this
  in the `ppx_test/with-sexp` directory in the source repo.

  When you have converted and released your library, add an
  opam constraint of `cstruct {>="4.0.0"}` to your own opam
  packages to ensure that they pick up this version of the library.
  (fixes mirage/ocaml-cstruct#222, @avsm)

- JavaScript stubs are now installed using the jsoo mechanism
  rather than a manual specification (mirage/ocaml-cstruct#241 @jonludlam)

- Use computed versions in opam files to ensure that dependent
  opam packages such as cstruct-async get the same base version
  of cstruct to avoid mismatches. (@avsm)

- Add a ppx test suite to checks that all error paths in ppx
  handling are reachable and have meaningful location info (mirage/ocaml-cstruct#238 @emillon)
@camelus
Copy link
Contributor

camelus commented Mar 25, 2019

☀️ All lint checks passed 86ed182
  • These packages passed lint tests: cstruct-async.4.0.0, cstruct-lwt.4.0.0, cstruct-sexp.4.0.0, cstruct-unix.4.0.0, cstruct.4.0.0, ppx_cstruct.4.0.0

☀️ Installability check (10889 → 10895)
  • new installable packages (6): cstruct.4.0.0 cstruct-async.4.0.0 cstruct-lwt.4.0.0 cstruct-sexp.4.0.0 cstruct-unix.4.0.0 ppx_cstruct.4.0.0

@mseri
Copy link
Member

mseri commented Mar 26, 2019

4.03-4.05 are failing with:

===== Installing package ======
The following dependencies couldn't be met:
  - ppx_cstruct → cstruct-unix >= 4.0.0 → ocaml >= 4.06.0
      base of this switch (use `--unlock-base' to force)

Do you want to lower bound ocaml in ppx_cstruct opam file?

@mseri
Copy link
Member

mseri commented Mar 26, 2019

I know you are ludicrously busy, but please have also a look at ther revdeps: lots of things are failing due to the sexp split. It may be important to add upper bounds before merging this PR. It looks also like some packages were getting Sexplib as a transitive dependency from cstruct. I think the three packages that make everything else fail are:

  • charrua
  • nocrypto
  • protocol-9p

@avsm
Copy link
Member Author

avsm commented Mar 26, 2019

Thanks for the triage @mseri! I'll look the revdeps and fixes now

@avsm
Copy link
Member Author

avsm commented Mar 26, 2019

The ppx failure is a bit frustrating, since only cstruct-unix depends on ocaml>=4.06, but the CI failing since its trying to install all packages...

@avsm
Copy link
Member Author

avsm commented Mar 26, 2019

This nocrypto failure is concerning

# File "src/nocrypto.cmx", line 1:
# Error: The implementation (obtained by packing)
#        does not match the interface src/nocrypto.mli:
#        ...
#        In module Hash:
#        Values do not match:
#          val hash_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> hash
#        is not included in
#          val hash_of_sexp : Sexplib.Sexp.t -> hash
#        File "src/nocrypto.mli", line 217, characters 2-43:
#          Expected declaration
#        File "src/hash.ml", line 114, characters 0-86: Actual declaration

avsm added a commit to avsm/opam-repository that referenced this pull request Mar 26, 2019
@emillon
Copy link
Contributor

emillon commented Mar 26, 2019

Related issue: mirleft/ocaml-nocrypto#156

avsm added a commit to avsm/opam-repository that referenced this pull request Mar 26, 2019
avsm added a commit to avsm/opam-repository that referenced this pull request Mar 27, 2019
due to making sexp optional in cstruct, see ocaml#13748
avsm added a commit to avsm/opam-repository that referenced this pull request Mar 27, 2019
due to making sexp optional in cstruct, see ocaml#13748
@avsm avsm merged commit fe723de into ocaml:master Mar 27, 2019
@avsm avsm deleted the release-cstruct-4.0.0 branch March 27, 2019 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sexplib dependency
4 participants