Skip to content

Conversation

WojciechMazur
Copy link
Contributor

Fixes #21858 by setting up special escapes for characters that might corrupt the output JSON file produced by -Yprofile-trace

Copy link
Contributor

@prolativ prolativ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

// Based on NameTransformer but dedicated for JSON encoding rules
object JsonNameTransformer {
private val nops = 128
private val ncodes = 26 * 26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

Copy link
Member

@mbovel mbovel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a bit crazy to me that we need to rewrite a JSON escape function in 2024, but I guess this goes with the "no-dependency" policy of Dotty, and the fact that neither the Java nor the Scala standard libraries contain such function.

Otherwise looks okay to me!

Co-authored-by: Matt Bovel <matthieu@bovel.net>
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.

-Yprofile-trace doesn't correctly escape output
3 participants