From ad77ba0f7b40760e04b79d9789da16d7c49010b8 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Thu, 23 Mar 2023 16:00:46 -0600 Subject: fix(core): panic at build time if extension code contains anything other than 7-bit ASCII (#18372) This will improve diagnostics and catch any non-ASCII extension code early. This will use `debug_assert!` rather than `assert!` to avoid runtime costs, and ensures (in debug_assert mode only) that all extension source files are ASCII as we load them. --- runtime/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/build.rs b/runtime/build.rs index 5d0ba0cc7..df20c5427 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -34,7 +34,7 @@ mod startup_snapshot { file_source.specifier ), }; - let code = file_source.code.load()?; + let code = file_source.load()?; if !should_transpile { return Ok(code); -- cgit v1.2.3