Skip to content

Syntax errors in playground sometimes trigger ENOENT: /static/playground.res, no such file or directory error #7583

Open
@mediremi

Description

@mediremi

When using v12.0.0-alpha.14 on the playground, syntax errors sometimes trigger the error ENOENT: /static/playground.res, no such file or directory.

I haven't been able to reproduce this issue in v12.0.0-alpha.13 or earlier versions.

Image


By setting the --debug-info jsoo flag, I've narrowed it down to protect_refs from misc.ml:

let protect_refs =
let set_refs l = List.iter (fun (R (r, v)) -> r := v) l in
fun refs f ->
let backup = List.map (fun (R (r, _)) -> R (r, !r)) refs in
set_refs refs;
match f () with
| x ->
set_refs backup;
x
| exception e ->
set_refs backup;
raise e

Only two functions call protect_refs: Env.without_cmis and Warnings.without_warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions