Skip to content

Commit

Permalink
Only install modules for 4.14+
Browse files Browse the repository at this point in the history
Use the Standard Library modules for OCaml 4.x, but override 4.14's to
eliminate the deprecation warning.
  • Loading branch information
dra27 committed Jun 10, 2022
1 parent 3e845ac commit 709a49f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

- Update licensing metadata.
- Update dune files to 2.7 to autogenerate opam files correctly (#2)
- Lower OCaml version to 4.02.3
- Lower OCaml version to 4.02.3 (#3)
- Install empty library for OCaml < 4.14 (#5)

# Release 5.0 (2021-06-29)

Expand Down
12 changes: 11 additions & 1 deletion src/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
(* -*- tuareg -*- *)

open Jbuild_plugin.V1

let modules =
let version = Scanf.sscanf ocaml_version "%u.%u" (fun a b -> (a, b)) in
if version >= (4, 14) then ":standard" else ""

let () = Printf.ksprintf send {|
(library
(name camlp_streams)
(public_name camlp-streams)
(modules %s)
(wrapped false)
(flags :standard -w -9))
(flags :standard -w -9))|} modules

0 comments on commit 709a49f

Please sign in to comment.