Skip to content

Change internal representation of strings to support arbitrary values - #282

Merged
jeparlefrancais merged 5 commits into
mainfrom
refactor-lua-strings
Jul 3, 2025
Merged

jeparlefrancais merged 5 commits into
mainfrom
refactor-lua-strings

Conversation

@jeparlefrancais

@jeparlefrancais jeparlefrancais commented Jul 2, 2025 •

Copy link
Copy Markdown
Contributor

Closes #250

The internal representation used to be a String, which implied that the value was a valid utf8 string. Instead, it's been changed to an arbitrary array of bytes to fix re-encoding issues that surfaced often with the dense or readable code generator.

  • add entry to the changelog

The internal representation used to be a String, which implied that the
value was a valid utf8 string. Instead, it's been changed to an
arbitrary array of bytes to fix re-encoding issues that surfaced often
with the dense or readable code generator.
@github-actions

github-actions Bot commented Jul 2, 2025

Copy link
Copy Markdown

Coverage after merging refactor-lua-strings into main will be

87.01%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/generator
   token_based.rs91.94%100%94.68%91.69%1016–1017, 1031–1033, 1056–1057, 1066–1068, 1087–1088, 1097–1099, 1150–1154, 130, 1309, 131, 1379, 1416–1424, 147–148, 1500–1509, 1534–1536, 1568–1577, 160–161, 1621, 1679, 182–183, 203–205, 2076, 2135–2136, 2162–2166, 2195–2199, 2419, 2423, 2436, 245, 297–301, 371–372, 378, 390, 450–451, 473–474, 490–491, 533, 621–622, 655–656, 724–725, 763–767, 80, 808–812, 830–831, 853–855, 919–920, 929–930, 937, 952, 957–961, 980–981, 994–995
   utils.rs90.99%100%93.33%90.76%139, 33, 337, 34–35, 351–352, 37, 373–377, 39, 413–421, 63, 73, 83
src/nodes/expressions
   interpolated_string.rs86.73%100%87.80%86.47%181–184, 186, 214–216, 320–325, 56–58, 67–69
   string.rs95.18%100%91.94%95.93%121–123, 126–128, 215–217
   string_utils.rs94.41%100%100%93.98%100–101, 178, 206, 92–95, 98–99
src/nodes/types
   string_type.rs49.15%100%50%48.89%16–20, 55–57, 61–63, 67–69, 73–75, 79–81, 85–87
src/process
   expression_serializer.rs84.90%100%86.21%84.68%114, 135–140, 143–145, 163–168, 171–173, 218–220, 28, 283–288, 29, 296–298, 30–33, 35–40, 44–46, 50–52, 54, 56
src/process/evaluator
   lua_value.rs90.73%100%88.89%91.13%122–124, 150–152, 162–164, 53, 67
   mod.rs88.01%100%98.18%86.80%102–103, 164, 176, 187, 198, 207–209, 217, 219–221, 223–224, 227, 239–241, 253–257, 261–262, 264–266, 306, 327, 341, 365, 368, 401, 407–408, 413, 427, 430, 448, 552, 556, 58–60, 71, 827, 88–89
src/rules
   convert_index_to_field.rs100%100%100%100%
   inject_value.rs86.73%100%93.55%86.04%180, 188, 194–205, 207–216, 218, 221–227, 233, 239–241, 74, 78–79
   remove_interpolated_string.rs95.45%100%100%95.03%214–221
src/rules/bundle
   rename_type_declaration.rs96.84%100%100%96.39%169–170, 92, 95–97
src/rules/require
   match_require.rs94.12%100%75%96.67%

@jeparlefrancais
jeparlefrancais merged commit 16621a2 into main Jul 3, 2025
@jeparlefrancais
jeparlefrancais deleted the refactor-lua-strings branch July 3, 2025 14:42
@MontereyLARS

Copy link
Copy Markdown

Nice! Thank you for fixing this.

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.

Escape string conversion is incorrect

2 participants