From da643f5b52d9259ba3e6325a035eab2fe72d20c6 Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Fri, 18 Aug 2017 10:50:43 +0800 Subject: [PATCH 1/2] [compiler] conditional remove cunit check --- vendor/ocaml/driver/compenv.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/ocaml/driver/compenv.ml b/vendor/ocaml/driver/compenv.ml index 048b66b0d7..b2cb566963 100644 --- a/vendor/ocaml/driver/compenv.ml +++ b/vendor/ocaml/driver/compenv.ml @@ -74,10 +74,13 @@ let is_unit_name name = ;; let check_unit_name ppf filename name = +#if undefined BS_NO_COMPILER_PATCH then + () +#else if not (is_unit_name name) then Location.print_warning (Location.in_file filename) ppf (Warnings.Bad_module_name name);; - +#end (* Compute name of module from output file name *) let module_of_filename ppf inputfile outputprefix = let basename = Filename.basename outputprefix in From e064f7c6f11b0178c8293e922673307bf382d963 Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Fri, 18 Aug 2017 10:53:44 +0800 Subject: [PATCH 2/2] no warning for xx-yy, delegate it to build system instead --- jscomp/bin/bsdep.ml | 5 ++--- jscomp/bin/whole_compiler.ml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/jscomp/bin/bsdep.ml b/jscomp/bin/bsdep.ml index f9f48c0af6..7221f65488 100644 --- a/jscomp/bin/bsdep.ml +++ b/jscomp/bin/bsdep.ml @@ -20550,9 +20550,8 @@ let is_unit_name name = ;; let check_unit_name ppf filename name = - if not (is_unit_name name) then - Location.print_warning (Location.in_file filename) ppf - (Warnings.Bad_module_name name);; + + () (* Compute name of module from output file name *) let module_of_filename ppf inputfile outputprefix = diff --git a/jscomp/bin/whole_compiler.ml b/jscomp/bin/whole_compiler.ml index bfea40a179..2c8e769849 100644 --- a/jscomp/bin/whole_compiler.ml +++ b/jscomp/bin/whole_compiler.ml @@ -20319,9 +20319,8 @@ let is_unit_name name = ;; let check_unit_name ppf filename name = - if not (is_unit_name name) then - Location.print_warning (Location.in_file filename) ppf - (Warnings.Bad_module_name name);; + + () (* Compute name of module from output file name *) let module_of_filename ppf inputfile outputprefix =