diff --git a/src/lib_rules.ml b/src/lib_rules.ml index 7deb093c..6f5abe3f 100644 --- a/src/lib_rules.ml +++ b/src/lib_rules.ml @@ -137,8 +137,8 @@ module Gen (P : Install_rules.Params) = struct let name = Module.Name.to_string name in let hidden_name = sprintf "%s__%s" lib_name name in let real_name = sprintf "%s.%s" lib_name name in - sprintf "include %s [@@deprecated \"%s. Use %s instead.\"]" - hidden_name transition_message real_name + sprintf {|[@@@deprecated "%s. Use %s instead."] include %s|} + transition_message real_name hidden_name in let source_path = Option.value_exn (Module.file m Impl) in Build.return contents diff --git a/test/blackbox-tests/test-cases/wrapped-transition/run.t b/test/blackbox-tests/test-cases/wrapped-transition/run.t index 2e9a5d3b..76b1fea0 100644 --- a/test/blackbox-tests/test-cases/wrapped-transition/run.t +++ b/test/blackbox-tests/test-cases/wrapped-transition/run.t @@ -1,6 +1,7 @@ - $ dune build - fooexe alias default - bar - foo - bar - foo + $ dune build 2>&1 | grep -v ocamlc + File "fooexe.ml", line 3, characters 0-7: + Error (warning 3): deprecated: module Bar + Will be removed past 2020-20-20. Use Mylib.Bar instead. + File "fooexe.ml", line 4, characters 0-7: + Error (warning 3): deprecated: module Foo + Will be removed past 2020-20-20. Use Mylib.Foo instead.