From 134ce546dcd36e420286b0bf1b78e8134c809c0f Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 9 May 2023 10:39:46 +0100 Subject: [PATCH] Remove all `inlined` attributes These cause confusing compiler warnings for users, which can't be disabled automatically, and the inlining isn't being used anyway since https://github.com/capnproto/capnp-ocaml/pull/83. --- src/benchmark/dune | 1 - src/compiler/dune | 1 - src/compiler/generate.ml | 2 +- src/examples/1/dune | 5 +---- src/examples/2/dune | 3 +-- src/runtime/dune | 3 +-- src/runtime/message.ml | 2 +- src/tests/dune | 3 +-- src/unix/dune | 3 +-- 9 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/benchmark/dune b/src/benchmark/dune index 27725bd..0319f19 100644 --- a/src/benchmark/dune +++ b/src/benchmark/dune @@ -2,7 +2,6 @@ (name main) (enabled_if (= %{architecture} amd64)) (libraries capnp capnp_unix fast_rand base) - (flags :standard -w -55) (ocamlopt_flags :standard -O3 -inline 2000)) (rule diff --git a/src/compiler/dune b/src/compiler/dune index ebd94a6..ad631c1 100644 --- a/src/compiler/dune +++ b/src/compiler/dune @@ -1,5 +1,4 @@ (executable (name main) (public_name capnpc-ocaml) - (flags :standard -w -55) (libraries capnp capnp_unix)) diff --git a/src/compiler/generate.ml b/src/compiler/generate.ml index ea48f04..fafca16 100644 --- a/src/compiler/generate.ml +++ b/src/compiler/generate.ml @@ -171,7 +171,7 @@ let mod_functor_footer = [ " module MessageWrapper = MessageWrapper"; "end"; ""; - "module Make(M:Capnp.MessageSig.S) = MakeRPC[@inlined](Capnp.RPC.None(M)) [@@inline]"; + "module Make(M:Capnp.MessageSig.S) = MakeRPC(Capnp.RPC.None(M))"; ] diff --git a/src/examples/1/dune b/src/examples/1/dune index 26572cb..e880f28 100644 --- a/src/examples/1/dune +++ b/src/examples/1/dune @@ -1,9 +1,6 @@ (executable (name example1) - (libraries capnp) - ; We disable warning 55 as this relates to inlining certain functions. For inlining please see the README.md - ; and the benchmarks for examples. - (flags :standard -w -55)) + (libraries capnp)) ; This rule tells dune how to generate foo.ml and foo.mli by compiling foo.capnp against the CAP'N PROTO compiler ; PLEASE NOTE that capnpc must exist on your computer for this to work (https://capnproto.org/install.html) diff --git a/src/examples/2/dune b/src/examples/2/dune index ae9d210..caf630d 100644 --- a/src/examples/2/dune +++ b/src/examples/2/dune @@ -1,7 +1,6 @@ (executable (name example2) - (libraries capnp) - (flags :standard -w -55)) + (libraries capnp)) (rule (targets shape.ml shape.mli) diff --git a/src/runtime/dune b/src/runtime/dune index 49686ff..e4ec337 100644 --- a/src/runtime/dune +++ b/src/runtime/dune @@ -2,5 +2,4 @@ (name capnp) (public_name capnp) (synopsis "Runtime support library for capnp-ocaml") - (libraries result stdint ocplib-endian res) - (flags :standard -w -55)) + (libraries result stdint ocplib-endian res)) diff --git a/src/runtime/message.ml b/src/runtime/message.ml index 931a6d3..b5104ba 100644 --- a/src/runtime/message.ml +++ b/src/runtime/message.ml @@ -415,7 +415,7 @@ module Make (Storage : MessageStorage.S) = struct end [@@inline] -module BytesMessage = Make[@inlined](BytesStorage) +module BytesMessage = Make(BytesStorage) exception Invalid_message of string diff --git a/src/tests/dune b/src/tests/dune index c4f1a8d..1d486bf 100644 --- a/src/tests/dune +++ b/src/tests/dune @@ -1,7 +1,6 @@ (test (name run_tests) - (libraries capnp ounit2 base_quickcheck) - (flags :standard -w -55)) + (libraries capnp ounit2 base_quickcheck)) (rule (targets diff --git a/src/unix/dune b/src/unix/dune index 769e076..7116425 100644 --- a/src/unix/dune +++ b/src/unix/dune @@ -2,5 +2,4 @@ (name capnp_unix) (public_name capnp.unix) (synopsis "Runtime support library for capnp-ocaml (Unix)") - (libraries capnp unix base stdio) - (flags :standard -w -55)) + (libraries capnp unix base stdio))