mirror of
https://github.com/zap-proto/ocaml.git
synced 2026-10-30 15:04:23 +00:00
The package previously declared a phantom `conf-zap` opam dep whose only
action was `zap --version`; with no `zap` binary on PATH that made
`opam install zap --with-test` and `dune build` fail outright, and there
was no CI.
- Drop the `conf-zap` virtual package and its dependency. The runtime
library, the `zap.unix` library and the `zapc-ocaml` codegen plugin all
build with no external tool; the `zap` schema compiler (from cpp-core)
is only needed to *generate* code, run the conformance tests and the
benchmarks. `opam install zap` / `dune build @install` are now hermetic.
- Gate the codegen + test + example + benchmark stanzas on a ZAP_COMPILER
env var (dune lang bumped 2.8 -> 3.15 for `%{env:..}` in `enabled_if`).
Unset -> build just the libraries + plugin; set (with `zap` on PATH) ->
run the full suite. The gate cannot fake-pass: with ZAP_COMPILER set and
no compiler, the build fails rather than silently skipping tests.
- Fix a warning-as-error in the plugin (`unused value syntax_error`).
- Add .github/workflows/ci.yml (push to main + PR + workflow_dispatch):
a hermetic `build` job (ocaml 5.1 and 4.08, ubuntu + macos,
`dune build @install`) and a `test` job that builds the `zap` compiler
from zap-proto/cpp-core, exports ZAP_COMPILER and runs `dune test`.
- README/Makefile document the single build (@install) and test
(ZAP_COMPILER=1 ... @runtest) paths. License stays BSD-2-Clause
(upstream capnp-ocaml); ignore the local _opam switch.
32 lines
1002 B
Plaintext
32 lines
1002 B
Plaintext
opam-version: "2.0"
|
|
name: "zap"
|
|
maintainer: "Paul Pelzl <[email protected]>"
|
|
authors: "Paul Pelzl <[email protected]>"
|
|
homepage: "https://github.com/zap-proto/ocaml"
|
|
bug-reports: "https://github.com/zap-proto/ocaml/issues"
|
|
license: "BSD-2-Clause"
|
|
depends: [
|
|
"ocaml" {>= "4.08.0"}
|
|
"dune" {>= "2.8"}
|
|
"result"
|
|
"base" {>= "v0.11"}
|
|
"stdio"
|
|
"base_quickcheck" {with-test}
|
|
"ocplib-endian" {>= "0.7"}
|
|
"res"
|
|
"stdint" {>= "0.5.1"}
|
|
"ounit2" {with-test}
|
|
]
|
|
build: [
|
|
["dune" "build" "-p" name "-j" jobs]
|
|
["dune" "build" "-p" name "-j" jobs "@runtest"] {with-test}
|
|
]
|
|
dev-repo: "git+https://github.com/zap-proto/ocaml.git"
|
|
synopsis:
|
|
"OCaml code generation plugin for the ZAP serialization framework"
|
|
description: """
|
|
ZAP is a multi-language code generation framework designed for
|
|
high performance through the use of lazy parsing and arena allocation.
|
|
This package provides a plugin for the ZAP compiler which enables
|
|
OCaml code generation, as well as corresponding runtime library support."""
|