Compiler 0.3.1 silently changes "\n" to "n" in string literals
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- compilers
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 127
- フォーク
- 7
- 平均マージ
- 15時間 42分
- マージ済み PR(30日)
- 63
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/reactivescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
solidjs/reactivescript#96 ·
メンテナーはふだん 1 日以内に返信
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixed対応中かも @cgaaf が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
solidjs/reactivescript#84 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
solidjs/reactivescript#77 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solidjs/reactivescript#74 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
solidjs/reactivescript#97 ·
メンテナーはふだん 1 日以内に返信
solidjs/reactivescript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
GetStream/stream-chat-react#3467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vercel-labs/ui#1139 ·
メンテナーはふだん 1 日以内に返信
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bot:ai-assisted component:platform-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
midnightntwrk/platform-js#93 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100