Skip to content

Commit

Permalink
Disable Javy.JSON by default (#671)
Browse files Browse the repository at this point in the history
Prior to this commit this option was true by default in order to profit
of the performance benefits of SIMD JSON. Unfortunately this introduced
issues with GC which need to be investigated further. In the meantime
we're setting as off by default.
  • Loading branch information
saulecabrera authored Jun 18, 2024
1 parent 0fa9b05 commit 6119bca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions crates/cli/tests/dynamic_linking_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ fn test_producers_section_present() -> Result<()> {
}

#[test]
// Temporarily ignore given that Javy.JSON is disabled by default.
#[ignore]
fn javy_json_identity() -> Result<()> {
let src = r#"
console.log(Javy.JSON.toStdout(Javy.JSON.fromStdin()));
Expand Down
9 changes: 5 additions & 4 deletions crates/core/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ pub(crate) fn new(shared_config: SharedConfig) -> Result<Runtime> {
.text_encoding(shared_config.contains(SharedConfig::TEXT_ENCODING))
.redirect_stdout_to_stderr(shared_config.contains(SharedConfig::REDIRECT_STDOUT_TO_STDERR))
.javy_stream_io(shared_config.contains(SharedConfig::JAVY_STREAM_IO))
.override_json_parse_and_stringify(
shared_config.contains(SharedConfig::OVERRIDE_JSON_PARSE_AND_STRINGIFY),
)
.javy_json(shared_config.contains(SharedConfig::JAVY_JSON));
// Due to an issue with our custom serializer and property accesses
// we're disabling this temporarily. It will be enabled once we have a
// fix forward.
.override_json_parse_and_stringify(false)
.javy_json(false);

Runtime::new(std::mem::take(config))
}

0 comments on commit 6119bca

Please sign in to comment.