mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 13:30:38 +00:00
Remove debugging
This commit is contained in:
parent
3ab15e63e8
commit
a8db74d40d
2 changed files with 0 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue