Document nested modules and calling parent functions
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- shell
調査の方向性
この issue ではドキュメントファイルもテストも特定されていません。まず、ネストされた foo1/foo2/foo3 モジュールの例と、既存の Nushell モジュールドキュメントを確認してください。ネストされたモジュールが親モジュールの関数をどのように解決するのか、示されている親修飾呼び出しがサポートされているかどうか、またユーザーがどのような動作を期待すべきかを文書化してください。
索引モデルが issue の本文から書いたものです。
説明
I can't find any documentation for nested modules and calling parent module functions within a child module.
There seems to be no way to call the outermost parent module's baz function from within a child module. It will always prefer the next parent's baz function.
It is impossible to make the following code print baz in foo1. In my use case the function baz is actually called path, so it not only overwrites the second definition of path in foo1 but also makes the global nushell path module unusable within the bim() function in foo3.
Example code:
export module foo1 {
export def baz [] { print "baz foo1" }
export module foo2 {
export def baz [] { print "baz in foo2" }
export module foo3 {
export def bim [] {
print "bim in foo3"
# this will succeed and call "baz in foo2"
baz
# this will fail with `external foo1 not found`
# foo1 foo2 baz
# this will also fail with `external foo1 not found`
# foo1 baz
}
}
}
}
use foo1
foo1 foo2 foo3 bim # this will print "baz in foo2"
- 主要言語
- TypeScript
- スター
- 258
- フォーク
- 561
- 平均マージ
- 3時間 20分
- マージ済み PR(30日)
- 15
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nushell/nushell.github.io のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
nushell/nushell.github.io#2081 · コメント 3 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
nushell/nushell.github.io#767 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
nushell/nushell.github.io#2232 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
nushell/nushell.github.io#2209 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
nushell/nushell.github.io#2194 ·
nushell/nushell.github.io の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vercel/react-tweet#225 ·