@@ -393,7 +393,7 @@ class ['a] hxb_writer
chunk#write_byte 7;
chunk#write_uleb128 index;
with Not_found ->
- print_endline (Printf.sprintf "[%s] %s Unbound type parameter %s (%s)" (s_type_path current_module.m_path) todo_error (s_type_path c.cl_path) (snd c.cl_path));
+ (* print_endline (Printf.sprintf "[%s] %s Unbound type parameter %s (%s)" (s_type_path current_module.m_path) todo_error (s_type_path c.cl_path) (snd c.cl_path)); *)
(* DynArray.iter (fun ttp -> debug_msg (Printf.sprintf "FTP %s %s" ttp.ttp_name (s_type_kind ttp.ttp_type)) field_type_parameters#items); *)
(* DynArray.iter (fun ttp -> debug_msg (Printf.sprintf "TTP %s %s" ttp.ttp_name (s_type_kind ttp.ttp_type)) type_type_parameters#items); *)
(* print_stacktrace (); *)
@@ -59,9 +59,9 @@ let reset sctx =
let after_save sctx com has_error =
if not has_error && com.display.dms_full_typing && com.display.dms_populate_cache then begin
- (* let t = Timer.timer ["server";"cache context"] in *)
+ let t = Timer.timer ["server";"cache context"] in
CommonCache.cache_context sctx.cs com;
- (* t(); *)
+ t();
ServerMessage.cached_modules com "" (List.length com.modules);
end
@@ -838,6 +838,8 @@ let log com str =
if com.verbose then com.print (str ^ "\n")
let clone com is_macro_context =
+ (* trace (Printf.sprintf "Common.clone was_macro=%b is_macro=%b" com.is_macro_context is_macro_context); *)
+ (* trace_call_stack (); *)
let t = com.basic in
{ com with
cache = None;
@@ -171,7 +171,8 @@ let die ?p msg ml_loc =
in
let ver = s_version_full
and os_type = if Sys.unix then "unix" else "windows" in
- Printf.eprintf "%s\nHaxe: %s; OS type: %s;\n%s\n%s" msg ver os_type ml_loc backtrace;
+ (* Printf.eprintf "%s\nHaxe: %s; OS type: %s;\n%s\n%s" msg ver os_type ml_loc backtrace; *)
+ trace (Printf.sprintf "%s\nHaxe: %s; OS type: %s;\n%s\n%s" msg ver os_type ml_loc backtrace);
assert false
module MessageSeverity = struct
@@ -4153,7 +4153,8 @@ let generate com =
end else
let ctx = create_context com false dump in
- add_types ctx com.types;
+ (try add_types ctx com.types with Not_found -> trace (Printexc.get_backtrace ()); raise Not_found);
+
let code = build_code ctx com.types com.main in
Array.sort (fun (lib1,_,_,_) (lib2,_,_,_) -> lib1 - lib2) code.natives;
if dump then begin
@@ -2028,6 +2028,7 @@ and type_expr ?(mode=MGet) ctx (e,p) (with_type:WithType.t) =
(* TYPER INITIALIZATION *)
let create com macros =
+ (* trace (Printf.sprintf "Typer.create with_macro=%b" (Option.is_some macros)); *)
let ctx = {
com = com;
t = com.basic;
@@ -6,7 +6,7 @@
-lib utest
-lib haxeserver
-D analyzer-optimize
-# -D UTEST_PATTERN=9087
+# -D UTEST_PATTERN=9029
# or set UTEST_PATTERN environment variable
#Temporary. To find out what's wrong with random CI failures
@@ -7,9 +7,12 @@ class Issue9029 extends TestCase {
vfs.putContent("Screen.hx", getTemplate("issues/Issue9029/Screen.hx"));
var args = ["-main", "Main", "-D", "analyzer-optimize", "--interp"];
runHaxe(args);
+ debugErrorMessages();
+ assertSuccess();
vfs.putContent("Game.hx", getTemplate("issues/Issue9029/Game.hx.modified"));
runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Game.hx")});
assertSuccess();
}
-}
+}