Browse Source

Revert some changes

Rudy Ges 1 year ago
parent
commit
cce7fac3a6

+ 1 - 1
src/compiler/args.ml

@@ -383,4 +383,4 @@ let parse_args com =
 	actx.raise_usage <- (fun () -> raise (Helper.HelpMessage (usage_string basic_args_spec usage)));
 	(* Handle CLI arguments *)
 	process com.args;
-	actx
+	actx

+ 0 - 1
src/compiler/compiler.ml

@@ -288,7 +288,6 @@ let do_type ctx mctx actx display_file_dot_path macro_cache_enabled =
 	MacroContext.macro_enable_cache := macro_cache_enabled;
 
 	let macros = match mctx with None -> None | Some mctx -> mctx.g.macros in
-	Printf.eprintf "=== Create typer context ===\n";
 	let tctx = Setup.create_typer_context ctx macros actx.native_libs in
 	let display_file_dot_path = DisplayProcessing.maybe_load_display_file_before_typing tctx display_file_dot_path in
 	check_defines ctx.com;

+ 0 - 1
src/filters/filters.ml

@@ -938,7 +938,6 @@ let run tctx main before_destruction =
 		end;
 		not cached
 	) com.types in
-	Printf.eprintf "%d new types\n" (List.length new_types);
 	(* IMPORTANT:
 	    There may be types in new_types which have already been post-processed, but then had their m_processed flag unset
 		because they received an additional dependency. This could happen in cases such as @:generic methods in #10635.

+ 1 - 3
std/eval/_std/sys/thread/EventLoop.hx

@@ -2,11 +2,9 @@ package sys.thread;
 
 import eval.luv.Loop;
 import eval.luv.Async;
-// import eval.luv.Timer as LuvTimer;
+import eval.luv.Timer as LuvTimer;
 import haxe.MainLoop;
 
-typedef LuvTimer = eval.luv.Timer;
-
 /**
 	When an event loop has an available event to execute.
 **/

+ 39 - 40
tests/server/src/cases/ServerTests.hx

@@ -112,26 +112,26 @@ class ServerTests extends TestCase {
 		assertSuccess();
 	}
 
-	// function testDisplayModuleRecache() {
-	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-	// 	var args = ["--main", "HelloWorld", "--interp"];
-	// 	runHaxe(args);
-	// 	runHaxe(args);
-	// 	assertReuse("HelloWorld");
+	function testDisplayModuleRecache() {
+		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+		var args = ["--main", "HelloWorld", "--interp"];
+		runHaxe(args);
+		runHaxe(args);
+		assertReuse("HelloWorld");
 
-	// 	var args2 = ["--main", "HelloWorld", "--interp", "--display", "HelloWorld.hx@64@type"];
-	// 	runHaxe(args2);
+		var args2 = ["--main", "HelloWorld", "--interp", "--display", "HelloWorld.hx@64@type"];
+		runHaxe(args2);
 
-	// 	runHaxe(args);
-	// 	assertReuse("HelloWorld");
+		runHaxe(args);
+		assertReuse("HelloWorld");
 
-	// 	// make sure we still invalidate if the file does change
-	// 	runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
-	// 	runHaxe(args2);
+		// make sure we still invalidate if the file does change
+		runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
+		runHaxe(args2);
 
-	// 	runHaxe(args);
-	// 	assertSkipping("HelloWorld", Tainted("check_display_file"));
-	// }
+		runHaxe(args);
+		assertSkipping("HelloWorld", Tainted("check_display_file"));
+	}
 
 	function testMutuallyDependent() {
 		vfs.putContent("MutuallyDependent1.hx", getTemplate("MutuallyDependent1.hx"));
@@ -233,33 +233,32 @@ class ServerTests extends TestCase {
 			Assert.equals(0, res.length);
 		});
 		runHaxe(args);
-		// Note: reusing from successful compilation above
 		assertReuse("HelloWorld");
 	}
 
-	// function testDiagnosticsRecache2() {
-	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-	// 	var args = ["--main", "HelloWorld", "--interp"];
-	// 	runHaxeJsonCb(args, DisplayMethods.Diagnostics, {file: new FsPath("HelloWorld.hx")}, res -> {
-	// 		Assert.equals(0, res.length);
-	// 	});
-	// 	runHaxe(args);
-	// 	assertReuse("HelloWorld");
-	// }
-
-	// function testDiagnosticsRecache3() {
-	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-	// 	var args = ["--main", "HelloWorld", "--interp"];
-	// 	runHaxe(args);
-	// 	runHaxe(args);
-	// 	assertReuse("HelloWorld");
-	// 	runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
-	// 	runHaxeJsonCb(args, DisplayMethods.Diagnostics, {file: new FsPath("HelloWorld.hx")}, res -> {
-	// 		Assert.equals(0, res.length);
-	// 	});
-	// 	runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
-	// 	assertReuse("HelloWorld");
-	// }
+	function testDiagnosticsRecache2() {
+		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+		var args = ["--main", "HelloWorld", "--interp"];
+		runHaxeJsonCb(args, DisplayMethods.Diagnostics, {file: new FsPath("HelloWorld.hx")}, res -> {
+			Assert.equals(0, res.length);
+		});
+		runHaxe(args);
+		assertReuse("HelloWorld");
+	}
+
+	function testDiagnosticsRecache3() {
+		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+		var args = ["--main", "HelloWorld", "--interp"];
+		runHaxe(args);
+		runHaxe(args);
+		assertReuse("HelloWorld");
+		runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
+		runHaxeJsonCb(args, DisplayMethods.Diagnostics, {file: new FsPath("HelloWorld.hx")}, res -> {
+			Assert.equals(0, res.length);
+		});
+		runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
+		assertReuse("HelloWorld");
+	}
 
 	function testSyntaxCache() {
 		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));