Skip to content

fix(emit): escape string literals built from runtime values centrally#13

Open
jakobjung10 wants to merge 1 commit into
zalanlevai:mainfrom
jakobjung10:fix/literal-escaping
Open

fix(emit): escape string literals built from runtime values centrally#13
jakobjung10 wants to merge 1 commit into
zalanlevai:mainfrom
jakobjung10:fix/literal-escaping

Conversation

@jakobjung10

Copy link
Copy Markdown

expr_str interned its argument as a literal symbol, which rustc later unescapes. Runtime strings containing backslashes (e.g. Windows paths in mutation diagnostics) formed invalid escape sequences and failed to recompile.

Escape inside expr_str so every caller is covered, and drop the redundant ad-hoc escaping at the bake_mutation call sites.

`expr_str` interned its argument as a literal symbol, which rustc later
unescapes. Runtime strings containing backslashes (e.g. Windows paths in
mutation diagnostics) formed invalid escape sequences and failed to recompile.

Escape inside `expr_str` so every caller is covered, and drop the redundant
ad-hoc escaping at the `bake_mutation` call sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant