From 06b47a73f6ba900c5f167bf1e6ddb230e71c5f90 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Fri, 4 Aug 2017 09:24:02 +0100 Subject: [PATCH] Do not accept per_file anymore It was renamed per_module and it is planned to reuse per_file for another purpose. --- CHANGES.md | 4 ++++ doc/jbuild.rst | 6 ------ src/jbuild.ml | 7 +------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 431c5814..5479b745 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,10 @@ builds and executes a custom `utop` toplevel with all libraries defined in the current directory (#183, Rudi Grinberg) +- Do not accept `per_file` anymore in `preprocess` field. `per_file` + was renamed `per_module` and it is planned to reuse `per_file` for + another purpose + 1.0+beta11 (21/07/2017) ----------------------- diff --git a/doc/jbuild.rst b/doc/jbuild.rst index ccb6290a..b0e3f1b8 100644 --- a/doc/jbuild.rst +++ b/doc/jbuild.rst @@ -793,12 +793,6 @@ For instance: (((action (run ./pp.sh X=1 ${<})) (foo bar))) (((action (run ./pp.sh X=2 ${<})) (baz))))) -Note the beta versions of Jbuilder used ``per_file`` instead of -``per_module``, which was obviously the wrong name. ``per_file`` is -still accepted for backward compatibility but deprecated. It will be -re-purposed in the future to allow to distinguish between .ml and .mli -files. - Dependency specification ------------------------ diff --git a/src/jbuild.ml b/src/jbuild.ml index ce914388..8b3e0f37 100644 --- a/src/jbuild.ml +++ b/src/jbuild.ml @@ -260,12 +260,7 @@ module Per_module = struct let t a sexp = match sexp with - | List (_, Atom (loc, ("per_module" | "per_file" as kwd)) :: rest) -> begin - if kwd = "per_file" then - Loc.warn loc - "'per_file' was renamed 'per_module'. 'per_file' will be re-purposed \ - in a future version and will take a list of file names rather \ - than module names."; + | List (_, Atom (_, "per_module") :: rest) -> begin List.concat_map rest ~f:(fun sexp -> let pp, names = pair a module_names sexp in List.map (String_set.elements names) ~f:(fun name -> (name, pp)))