From a8db74d40d149e83f85dae7971ec59730fe8a3dc Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sun, 20 Aug 2023 14:02:48 -0500 Subject: [PATCH] Remove debugging --- src/lune/globals/require/path.rs | 7 ------- src/lune/scheduler/impl_runner.rs | 4 ---- 2 files changed, 11 deletions(-) diff --git a/src/lune/globals/require/path.rs b/src/lune/globals/require/path.rs index 7a7635f..92546e3 100644 --- a/src/lune/globals/require/path.rs +++ b/src/lune/globals/require/path.rs @@ -15,13 +15,11 @@ where let (abs_path, rel_path) = ctx.resolve_paths(source, path)?; // 1. Try to require the exact path - println!("1. REQUIRE: Exact"); if let Ok(res) = require_inner(ctx, &abs_path, &rel_path).await { return Ok(res); } // 2. Try to require the path with an added "luau" extension - println!("2. REQUIRE: Luau extension"); let (luau_abs_path, luau_rel_path) = ( append_extension(&abs_path, "luau"), append_extension(&rel_path, "luau"), @@ -31,7 +29,6 @@ where } // 2. Try to require the path with an added "lua" extension - println!("3. REQUIRE: Lua extension"); let (lua_abs_path, lua_rel_path) = ( append_extension(&abs_path, "lua"), append_extension(&rel_path, "lua"), @@ -41,7 +38,6 @@ where } // Nothing left to try, throw an error - println!("4. REQUIRE: Error"); Err(LuaError::runtime(format!( "No file exist at the path '{}'", rel_path.display() @@ -60,13 +56,10 @@ where let rel_path = rel_path.as_ref(); if ctx.is_cached(abs_path)? { - println!("Found cached, fetching from cache"); ctx.get_from_cache(abs_path) } else if ctx.is_pending(abs_path)? { - println!("Found pending, waiting for cache"); ctx.wait_for_cache(&abs_path).await } else { - println!("No cached, loading new"); ctx.load_with_caching(&abs_path, &rel_path).await } } diff --git a/src/lune/scheduler/impl_runner.rs b/src/lune/scheduler/impl_runner.rs index f3b2f29..f6d5511 100644 --- a/src/lune/scheduler/impl_runner.rs +++ b/src/lune/scheduler/impl_runner.rs @@ -130,9 +130,7 @@ where loop { // 1. Run lua threads until exit or there are none left, // if any thread was resumed it may have spawned futures - println!("Resuming lua"); let resumed_lua = self.run_lua_threads(); - println!("Resumed lua"); // 2. If we got a manual exit code from lua we should // not try to wait for any pending futures to complete @@ -142,9 +140,7 @@ where // 3. Keep resuming futures until we get a new lua thread to // resume, or until we don't have any futures left to wait for - println!("Resuming futures"); let resumed_fut = self.run_futures().await; - println!("Resumed futures"); // 4. If we did not resume any lua threads, and we have no futures // remaining either, we have now run the scheduler until completion