feat: magic:install --with-devtools wires the debug trio in one step#100
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a --with-devtools flag to the magic:install artisan command to optionally wire Magic’s debug tooling trio (Dusk + Telescope + magic_devtools integrations) during initial project scaffolding, and updates tests + docs/changelog/skill references accordingly.
Changes:
- Extend
magic:installwith--with-devtools, injectingkDebugMode-gated runtime wiring intolib/main.dartand adding the trio packages todependencies. - Add unit + real-filesystem integration tests covering signature, wiring shape, dependency insertion, and idempotency.
- Sync docs/skill/changelog to document the new flag and recommended workflow.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
lib/src/cli/commands/magic_install_command.dart |
Adds flag parsing, dependency insertion, and buildDevtoolsWiring() main.dart transform. |
test/cli/commands/magic_install_command_test.dart |
Adds tests for signature + pure transform + real-FS end-to-end install behavior and idempotency. |
doc/packages/magic-cli.md |
Documents one-step debug tooling installation via --with-devtools. |
skills/magic-framework/SKILL.md |
Bumps skill version and adds example invocation for --with-devtools. |
skills/magic-framework/references/cli-commands.md |
Adds --with-devtools option reference and explanation. |
CHANGELOG.md |
Adds an Unreleased entry describing the new flag and behavior. |
anilcancakir
added a commit
that referenced
this pull request
Jun 25, 2026
…rdering-clean buildDevtoolsWiring injected the debug-trio package imports immediately before `void main(`, landing them after the relative `config/...` imports the install stub emits. That violates directives_ordering (package imports must precede relative imports, and foundation must precede material), so a freshly installed --with-devtools app surfaced analyzer warnings. Anchor each injected package import against the existing package import it must sit beside: foundation before flutter/material, fluttersdk_* before magic, magic_devtools/* after magic and before the first relative import (falling back to the void main( anchor when no relative import is present). The kDebugMode block injection is unchanged and the transform stays idempotent. Verified the generated import block is directives_ordering-clean via the analyzer. Addresses Copilot review comment on PR #100.
… step Wires magic_devtools, fluttersdk_dusk, and fluttersdk_telescope (deps plus kDebugMode main.dart integration) in a single install step instead of the manual multi-step setup. The wiring is idempotent and the no-flag install path is unchanged (#10).
…rdering-clean buildDevtoolsWiring injected the debug-trio package imports immediately before `void main(`, landing them after the relative `config/...` imports the install stub emits. That violates directives_ordering (package imports must precede relative imports, and foundation must precede material), so a freshly installed --with-devtools app surfaced analyzer warnings. Anchor each injected package import against the existing package import it must sit beside: foundation before flutter/material, fluttersdk_* before magic, magic_devtools/* after magic and before the first relative import (falling back to the void main( anchor when no relative import is present). The kDebugMode block injection is unchanged and the transform stays idempotent. Verified the generated import block is directives_ordering-clean via the analyzer. Addresses Copilot review comment on PR #100.
a6cb0d3 to
225244e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes REPORT friction item #10.
Adds a
--with-devtoolsflag tomagic:installthat wires magic_devtools + fluttersdk_dusk + fluttersdk_telescope in one step: adds the three regulardependenciesand injects the kDebugModemain.dartintegration exactly as dusk:install / telescope:install do (DuskPlugin/TelescopePlugin install + watchers before Magic.init; MagicDuskIntegration/MagicTelescopeIntegration after). Idempotent; the no-flag install path is unchanged.TDD. analyze 0, format 0-diff,
flutter test test/cli/108 pass (new buildDevtoolsWiring + real-FS install groups),dart pub publish --dry-runclean. Doc + skill + CHANGELOG synced.