Built-in plugin registration doesn't scale: binary size + startup cost grows unconditionally with every plugin
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- bun, typescript
- 領域
- cli, performance
調査の方向性
cli.ts の loadPlugins() から始め、既存の PluginLoader.load/loadFromNpm 経路と、stub 化された github: の読み込み経路を比較します。現在の 6 つの組み込みプラグインでバイナリサイズと --help の起動時間を測定し、その後、無関係なプラグインの読み込みや埋め込みを回避する仕組みを評価します。未公開プラグインの問題に対処し、ベースライン測定を含む、文書化されテストされたアプローチがあれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Context
game-ci/cli#230 registered @game-ci/bevy as a built-in plugin (a literal import() in cli.ts's loadPlugins(), traced and embedded directly into the compiled binary) because it isn't published to npm and --plugin @game-ci/<name> (which resolves via loadFromNpm) can't reach it at runtime. A follow-up does the same for five more functional-but-unpublished plugins: github-release-deploy, itch-deploy, pseudo-localization, code-signing, steam-workshop.
This pattern has a real cost that will keep growing as more plugins are added this way:
- Binary size: every built-in plugin's code is unconditionally bundled into the single compiled
game-cibinary via Bun's--compile, whether or not a given invocation ever touches it. This is unlike the genuinely-opt-in--plugin <name>path (PluginLoader.load's string-parameter/loadFromNpmroute), which is a dynamic import Bun's bundler can't trace - confirmed earlier this repo's own workspace plugins impose zero bundle cost on unrelated invocations when loaded that way. Built-in registration gives up that property. - Startup cost:
loadPlugins()callsPluginLoader.loadModule()(and therefore each plugin'sonLoad(), if it defines one) unconditionally on every CLI invocation -game-ci --help,game-ci build ./unity-project, anything - regardless of whether that plugin is relevant. Today's built-ins are presumably cheap (synchronous command-factory registration, no I/O), but nothing enforces that, and the list will only grow.
Six built-ins (soon) is probably still fine. But there's no mechanism today to keep this bounded, and "not published to npm" is currently the only trigger for going down the built-in path - which will keep happening as new plugins ship, since none of the newer ones are on npm either yet.
Ask
Investigate a real fix for the underlying gap instead of continuing to grow the built-in list:
- Publish these plugins to npm (npm) so
--plugin <name>actually works for them via the existingloadFromNpmpath - the original, genuinely-opt-in mechanism this was designed around - OR - Implement
PluginLoader'sgithub:loading path (currently a stub that throws "not yet implemented") so a plugin can be fetched/loaded from this repo without needing either npm or unconditional binary embedding, OR - Some other mechanism that keeps unrelated
game-ciinvocations from paying for plugins they don't use, as the plugin count grows.
Whichever direction, it'd help to also measure the actual current cost (binary size delta, --help startup time) with today's 6 built-ins as a baseline, so future additions have a concrete number to weigh against.
- 主要言語
- TypeScript
- スター
- 20
- フォーク
- 11
- 平均マージ
- 5時間 28分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
game-ci/cli のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AykutSarac/jsoncrack.com#616 ·
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtag対応中かも @bardrop が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nbd-wtf/nostr-tools#578 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
backnotprop/plannotator#3427 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/Power-CAT-Copilot-Studio-Kit#942 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/DebateAI#801 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信