Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz authored and Simn committed Oct 20, 2023
1 parent 255d5dd commit af534b9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/compiler/args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,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
1 change: 0 additions & 1 deletion src/compiler/compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,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;
Expand Down
1 change: 0 additions & 1 deletion src/filters/filters.ml
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,6 @@ let run tctx main =
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.
Expand Down
4 changes: 1 addition & 3 deletions std/eval/_std/sys/thread/EventLoop.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**/
Expand Down
71 changes: 35 additions & 36 deletions tests/server/src/cases/ServerTests.hx
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,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"));
Expand All @@ -154,29 +154,28 @@ class ServerTests extends TestCase {
assertSkipping("HelloWorld", Tainted("server/invalidate"));
runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
runHaxe(args);
// Note: reusing from successful compilation above
assertReuse("HelloWorld");
}

// function testDiagnosticsRecache2() {
// vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
// var args = ["--main", "HelloWorld", "--interp"];
// runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
// 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")});
// runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
// runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
// assertReuse("HelloWorld");
// }
function testDiagnosticsRecache2() {
vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
var args = ["--main", "HelloWorld", "--interp"];
runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
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")});
runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
assertReuse("HelloWorld");
}

function testSyntaxCache() {
vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
Expand Down

0 comments on commit af534b9

Please sign in to comment.