Valid legacy regex fragments are rejected before native compilation
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js, typescript
- 領域
- compilers, testing-qa
調査の方向性
Start by saving the reduced example as fragment.mjs and comparing scriptc's diagnostic with Node 24.22.1. Trace the regex literal diagnostic path and the TypeScript diagnostic boundary mentioned in the issue; cover fragment composition, legacy escapes, capture references, replacements, and invalid Unicode patterns. Compare native output with Node, including sanitized execution; done means valid legacy fragments compile while invalid u and v patterns still reject. An open linked pull request (#3041) is already addressing this issue.
索引モデルが issue の本文から書いたものです。
説明
We are compiling the full Sentry CLI with scriptc, including its existing dependencies. highlight.js builds a Perl grammar by taking the source of a legacy regular-expression fragment and inserting it into a larger pattern. The fragment is valid JavaScript, but the build stops with SC0001 before it reaches the native regex runtime.
A reduced example is:
console.log(new RegExp("(a)" + /\1/.source).test("aa"));
Save this as fragment.mjs. Node 24.22.1 prints true. Building it with scriptc built from current main reports that the backreference refers to a group that does not exist (TypeScript TS1534). The related literal /(a)\2/ reaches TS1533 instead.
These non-Unicode literals have defined legacy semantics. Their source can also be reused in a pattern with enough capture groups, as in the example. The standalone literal and the final constructed pattern are different expressions and should each keep their JavaScript behavior.
Expected behavior is to compile valid legacy fragments and match Node. Regexes with u or v must still reject invalid backreferences. This should not be fixed by discarding all regex grammar diagnostics or changing the fragment's source text.
Regression coverage should include fragment composition, standalone octal and identity escapes, real capture references and replacement, invalid Unicode patterns, and the existing TypeScript diagnostic boundary. Native output needs to be compared with Node, including sanitized execution.
This removes one observed blocker from the CLI bundle; it does not establish that the whole CLI compiles. I rechecked open issues and PRs before filing this. The RegExp call handling in #2928 addresses a different lowering path, rather than these literal diagnostics.
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 212
- 平均マージ
- 13時間 2分
- マージ済み PR(30日)
- 798
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
Discarded negation of a void call rejects valid JavaScript対応中かも @MathurAditya724 が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
vercel-labs/scriptc#3358 ·
メンテナーはふだん 1 日以内に返信
-
Optional JSDoc rejects mandatory JavaScript setter parameters対応中かも @MathurAditya724 が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#3355 ·
メンテナーはふだん 1 日以内に返信
-
Correct JavaScript refusal descriptions for mutable bindings and missing properties対応中かも @MathurAditya724 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
vercel-labs/scriptc#3354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vercel-labs/scriptc#3330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
vercel-labs/scriptc#3210 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
earendil-works/pi-claude-code#36 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Resources: New work of jabodetabek対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
railmapgen/rmp-gallery#4167 ·
メンテナーはふだん 2 日以内に返信
-
documentation p1
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
microsoft/monaco-editor#5577 ·
メンテナーはふだん 1 日以内に返信