Compiler 0.3.1 silently changes "\n" to "n" in string literals
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- compilers
Línea de trabajo
Start by locating the string literal parsing and code generation entry points in the compiler, then reproduce with the provided repro.rx and compile.mjs example using @reactivescript/[email protected]. Check how the \n escape is represented through compilation; done means the generated separator evaluates to U+000A and the issue's reproduction no longer changes the split result.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With @reactivescript/[email protected], compiling a newline separator changes its meaning without reporting a diagnostic.
Reproduction
Install the compiler in a Node.js project:
npm install --save-exact @reactivescript/[email protected]
Create repro.rx:
source text := ""
export default component Probe() {
lines = text.split("\n")
<pre>{lines.length}</pre>
}
Create compile.mjs and run node compile.mjs:
import { app } from "@reactivescript/compiler";
import { resolve } from "node:path";
const result = JSON.parse(app(resolve("repro.rx"), "dom"));
if (!result.modules) {
throw new Error(JSON.stringify(result));
}
for (const module of Object.values(result.modules)) {
console.log(module.code);
}
Actual output
The generated computation contains:
const v$lines = __rt.memo("lines", (__prev) => v$text()?.split("n"), undefined);
The separator is the letter n (U+006E), rather than a newline (U+000A). Compilation succeeds without reporting a diagnostic.
Expected behavior
The generated separator should evaluate to U+000A, preserving the semantics of .split("\n").
For example, given the JavaScript string "first\nsecond":
// Expected
["first", "second"]
// Actual with the generated separator
["first\nseco", "d"]
Impact
This caused incorrect rendering of single-line error summaries in an application. Diagnosing it required inspecting the generated JavaScript. Moving the string processing into an imported TypeScript helper worked around the issue.
Environment
@reactivescript/compiler:0.3.1- Target:
dom - Node.js:
v24.14.1 - Platform: macOS, arm64
Reproduced again on November 15, 2026. Confirmed for \n; other escape sequences have not been tested.
- Lenguaje dominante
- TypeScript
- Estrellas
- 127
- Forks
- 7
- Merge medio
- 15 h 42 min
- PR fusionados (30 d)
- 63
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de solidjs/reactivescript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
solidjs/reactivescript#96 ·
Los mantenedores suelen responder en 1 día
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixedPosiblemente ocupada @cgaaf la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
solidjs/reactivescript#84 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
solidjs/reactivescript#77 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
solidjs/reactivescript#74 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
solidjs/reactivescript#97 ·
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/reactivescript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
GetStream/stream-chat-react#3467 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vercel-labs/ui#1139 ·
Los mantenedores suelen responder en 1 día
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Posiblemente ocupada @goranai la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeAbiertobot:ai-assisted component:platform-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
midnightntwrk/platform-js#93 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100