Allow storing util.getCallSites without capturing a stack
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, nodejs, typescript
- 領域
- compilers
調査の方向性
The payload points to lower-inspect.ts, where the direct JavaScript no-argument lowering of the call-site helper emits placeholder frames, and to the Node util.getCallSites export that Pino reads at startup in lib/caller.js. Start by reproducing the SC2020 failure with the snippet from the issue, which only reads the export and should not capture a stack. Done means the export is a callable value with Node's name and length, and invoking it raises an explicit refusal instead of returning invented frames. Full stack capture is out of scope, so confirm with maintainers before extending it.
索引モデルが issue の本文から書いたものです。
説明
The unchanged Baileyrs example from oxidezap/baileyrs#176 builds with #2149 plus #2839, but --offline-smoke exits at startup with SC2020 in pino/lib/caller.js:7.
const util = require('node:util')
const capture = util.getCallSites ?? util.getCallSite
console.log(typeof capture)
Node prints function. Reading the export does not capture a stack. Pino imports this helper at startup and invokes it only when transport configuration needs caller resolution. An ordinary logger should not fail because a dormant function is imported.
Proposed bounded fix: materialize a stable callable value with Node's name and length, and defer an explicit SC2020 refusal until invocation. This does not implement stack capture, disable logging, or use Node islands. Capture must not silently return invented or empty frames.
Full capture is separate work. The existing direct JavaScript no-argument lowering in lower-inspect.ts emits three placeholder frames. Native source frames store function names and files, but not the current call's line and column. Correct capture needs actual caller locations, default/1–200 frame limits, source-map options, and contracts for optimized/inlined functions, fibers, workers, and unsupported targets. Instrumentation should remain gated to programs that observe stacks; a function import alone should not add per-call stack tracking.
References: Node v24.16 implementation, Pino caller helper, integration evidence.
Issue search for getCallSites returned no matches at triage.
- 主要言語
- 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 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
vercel-labs/scriptc#3358 ·
メンテナーはふだん 1 日以内に返信
-
Optional JSDoc rejects mandatory JavaScript setter parameters対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#3355 ·
メンテナーはふだん 1 日以内に返信
-
Correct JavaScript refusal descriptions for mutable bindings and missing properties対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 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時間 初心者へのやさしさ 70/100
backnotprop/plannotator#2914 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/vscode-containers#655 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · コメント 1 件 ·