Built-in plugin registration doesn't scale: binary size + startup cost grows unconditionally with every plugin
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- bun, typescript
- Área
- cli, performance
Línea de trabajo
Empieza por loadPlugins() de cli.ts y compara la ruta existente PluginLoader.load/loadFromNpm con la ruta de carga github: que actualmente solo tiene un stub. Mide el tamaño del binario y el tiempo de inicio de --help con los seis plugins integrados actuales y, después, evalúa un mecanismo que evite cargar o incrustar plugins no relacionados. Se considera terminado cuando haya un enfoque documentado y probado que aborde la carencia relativa a los plugins no publicados e incluya las mediciones de referencia.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 20
- Forks
- 11
- Merge medio
- 5 h 28 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de game-ci/cli
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 73/100
-
Forward Unity logs to consoleAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 32/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de game-ci/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AykutSarac/jsoncrack.com#616 ·
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtagPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nbd-wtf/nostr-tools#578 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
backnotprop/plannotator#3427 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/Power-CAT-Copilot-Studio-Kit#942 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AOSSIE-Org/DebateAI#801 · 1 comentario ·
Los mantenedores suelen responder en 1 día