File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ type error =
28
28
| Bs_cyclic_depends of string list
29
29
| Bs_duplicated_module of string * string
30
30
| Bs_package_not_found of string
31
+ | Bs_main_not_exist of string
32
+
31
33
exception Error of error
32
34
33
35
let error err = raise (Error err)
@@ -44,6 +46,10 @@ let report_error ppf = function
44
46
| Bs_duplicated_module (a,b)
45
47
->
46
48
Format. fprintf ppf " The build system does not support two files with same names yet %s, %s" a b
49
+ | Bs_main_not_exist main
50
+ ->
51
+ Format. fprintf ppf " File %s not found " main
52
+
47
53
| Bs_package_not_found package
48
54
->
49
55
Format. fprintf ppf " Pacage %s not found or %s/lib/ocaml does not exist"
Original file line number Diff line number Diff line change @@ -27,4 +27,6 @@ type error =
27
27
| Bs_cyclic_depends of string list
28
28
| Bs_duplicated_module of string * string
29
29
| Bs_package_not_found of string
30
+ | Bs_main_not_exist of string
31
+
30
32
val error : error -> 'a
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ let batch_compile ppf files main_file =
67
67
Ocaml_parse. lazy_parse_implementation
68
68
Ocaml_parse. lazy_parse_interface
69
69
main_file in
70
+ if Queue. is_empty result then
71
+ Bs_exception. error (Bs_main_not_exist main_file)
72
+ ;
70
73
process_result ppf main_file ast_table result
71
74
else 0
72
75
Original file line number Diff line number Diff line change 32
32
BS_FLAGS = $(BS_COMMON_FLAGS ) -bs-package-output lib/js
33
33
endif
34
34
35
- COMPFLAGS += $(BS_FLAGS ) -I ../stdlib -nostdlib -nopervasives -open Pervasives -unsafe -w -40
35
+ COMPFLAGS += $(BS_FLAGS ) -I ../stdlib -nostdlib -nopervasives -open Pervasives -unsafe -w -40-49
36
36
37
37
38
38
You can’t perform that action at this time.
0 commit comments