Prevent parent scope symbols leaking into module's scope
まだ誰も着手していません。
評価
調査の方向性
まずスコープスタックのシンボル検索と create_default_context() を追跡し、次に FrameType と NU_LIB_DIRS などの定数がどのように表現されているかを調べます。Barrier フレームと Prelude フレームがモジュール分離、デフォルトコマンド、nupm オーバーレイとどのように相互作用すべきかを決定します。完了の条件は、親シンボル、Prelude コマンド、モジュールインポートを対象とするカバレッジを含め、検索ルールと NU_LIB_DIRS の動作が仕様化され、実装されていることです。
索引モデルが issue の本文から書いたものです。
説明
Leaking user-defined symbols from a parent scope to a module's scope can lead to subtle bugs. The module's scope should be as isolated from the parent scope as possible, but not completely (e.g., we still need basic Nushell commands like ls to be visible).
Could be partially addressed by introducing two new FrameTypes:
Barrier: Stops symbol lookup when traversing the scope stack. This prevents the symbol lookup from searching the parent scopes.Prelude: With only Barrier, we'd lose “default” commands that we want to be visible (likels). Perhaps we could have a Prelude frame type which would get initialized first duringcreate_default_context()with these default commands.
The question is what to do with constants like NU_LIB_DIRS, e.g.,:
const NU_LIB_DIRS = $NU_LIB_DIRS | append '/home/spam/foo`
module {
use bar.nu # should it look for 'bar.nu' in '/home/spam/foo'?
}
We might want to decide on this based on the envisioned functionality of how nupm is supposed to use overlays as “virtual environments”, relying on modifying the NU_LIB_DIRS constant.
- 主要言語
- Rust
- スター
- 36
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nushell/new-nu-parser のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nushell/new-nu-parser#64 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nushell/new-nu-parser#60 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
nushell/new-nu-parser#59 ·
-
bug typechecker
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
nushell/new-nu-parser#53 · コメント 11 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nushell/new-nu-parser#47 · コメント 3 件 ·
nushell/new-nu-parser の issue をすべて見る
似ている issue
-
good first issue help wanted r-docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
servo/rust-smallvec#824 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
priority middle
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
KATO-Hiro/AtCoderClans#12940 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hurttlocker/o8#5112 ·