Skip to content

Commit

Permalink
Clean up compiler interface and configure Jint for compilation scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Jan 15, 2024
1 parent fc04b37 commit a4cbf4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion implement/elm-time/ElmInteractive/ElmInteractive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ closestBase is not null
new CompileElmInteractiveEnvironmentRequest(
modulesTexts: elmModulesTexts,
environmentBefore: environmentBefore),
options: new System.Text.Json.JsonSerializerOptions { MaxDepth = 1000 });
options: new System.Text.Json.JsonSerializerOptions
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
MaxDepth = 1000
});

var responseJson =
evalElmPreparedJavaScriptEngine.CallFunction("compileInteractiveEnvironment", argumentsJson).ToString()!;
Expand Down
2 changes: 1 addition & 1 deletion implement/elm-time/JavaScript/JavaScriptEngineJint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public record FunctionDelegateIntoHost(
Func<Engine, JsValue, JsValue[], JsValue> hostFunc,
int parameterCount);

private readonly Engine engine = new();
private readonly Engine engine = new(new Options { Json = new JsonOptions { MaxParseDepth = 1_000 } });

private readonly IReadOnlyList<FunctionDelegateIntoHost> functionDelegatesIntoHost;

Expand Down

0 comments on commit a4cbf4d

Please sign in to comment.