Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix(create): workspace: true fails when the workspace root does not list the new package

Aperta
#1,781 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
cli

Direzione di ricerca

Start at the create command's workspace option and trace where it generates the package and runs pub get; inspect the validation and error classification paths. Reproduce with a root pubspec.yaml listing packages/a and a new packages/b, then check existing CLI tests for workspace creation. Done when the root is updated or a validation error names the required entry, with a regression test covering the case.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Description

create with workspace: true generates a package with resolution: workspace, then runs pub get. When the parent pubspec's workspace: list does not yet include the new package, pub get fails:

ProcessException … But it has resolution `workspace`. But found no workspace root including it in parent directories.

The files are already on disk at that point, so the user is left with a package that cannot resolve and an error that does not say which file to edit. The --workspace help text ("Whether the generated project should resolve its dependencies from a parent Pub workspace") does not mention that the root must be updated first.

Steps To Reproduce
  1. Create a pub workspace root whose pubspec.yaml has workspace: [packages/a].
  2. From the root, call the MCP create tool with workspace: true for a new package packages/b (or the CLI equivalent with --workspace).
  3. Observe the ProcessException above after generation.
Expected Behavior

One of:

  1. create adds the new package's path to the nearest workspace root's workspace: list before running pub get (preferred: this is what a user passing workspace: true intends).
  2. create checks for a workspace root that will include the output path before generating anything, and if there is none, fails with a message naming the root pubspec.yaml and the exact entry to add.

Either way the error should come back as validation rather than transient, so an agent edits the root pubspec instead of retrying.

Additional Context
  • 6 field create calls failed this way between 2026-10-04 and 2026-10-16.

  • very_good_cli 1.5.0, Dart 3.13.5, Flutter 3.47.6, macOS 26.5 arm64.

  • Tracking issue: VeryGoodOpenSource/vgv-ai-flutter-plugin#180

Lingua principale
Dart
Stelle
2.4k
Fork
244
Merge medio
1g 18h
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di VeryGoodOpenSource/very_good_cli

Tutte le issue di VeryGoodOpenSource/very_good_cli

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.