-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add version detection warnings for hot reload #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,6 +86,7 @@ The implementation plan should specify after each phase that you should: | |||||
| - [ ] Use `git diff` to verify the changes that have been made, and create a suitable commit message for any changes, following any guidelines you have about commit messages. Be sure to properly escape dollar signs and backticks, and present the change message to the user for approval. | ||||||
| - [ ] Wait for approval. Don't commit the changes or move on to the next phase of implementation until the user approves the commit. | ||||||
| - [ ] After commiting the change, if the app is running, use the hot_reload tool to reload it. | ||||||
| - **Note**: Hot reload does not work reliably on Flutter stable ≤ 3.37.0. If hot_reload fails, inform the user and suggest either switching to Flutter main channel or manually restarting the app. | ||||||
gspencergoog marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| In the last phase of the plan, include steps to: | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -34,6 +34,13 @@ Next, collect additional information required for debugging. Ask the user one qu | |||||
| Before diving into the code, let's verify the project's dependencies and environment. | ||||||
|
|
||||||
| - [ ] Run `flutter doctor` to get the Flutter and Dart SDK versions and check for any issues reported. | ||||||
| - [ ] Check the Flutter version output and determine if hot reload is supported: | ||||||
| - **IMPORTANT**: Hot reload through the Dart MCP server does not work reliably on Flutter stable ≤ 3.37.0 (see [issue #15](https://github.com/gemini-cli-extensions/flutter/issues/15)) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
No need to reference the bug. |
||||||
| - If the user is on Flutter stable ≤ 3.37.0, warn them that hot reload may fail during this debugging session | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd just delete this item in favor of the suggestion I had for line 38. |
||||||
| - Suggest they either: | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can remove this entire item if you use the suggestion from line 38 above. |
||||||
| 1. Switch to Flutter main/master channel for full hot reload support, OR | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use "main". |
||||||
| 2. Manually restart the app after making code changes instead of using hot_reload | ||||||
| - If they choose to proceed with stable, acknowledge their choice and remind them about the limitation when using hot_reload later | ||||||
| - [ ] Use the `pub` tool with the `outdated` command to look for outdated packages or dependency conflicts in `pubspec.yaml` and `pubspec.lock`. | ||||||
| - Run the command `pub` tool with `upgrade` to upgrade to latest versions. | ||||||
| - If that isn't sufficient, sometimes upgrading the package version to a new major version can help. The `pub` tool can't do this, so run the command `dart pub upgrade --major-versions` to do this. | ||||||
|
|
@@ -62,7 +69,9 @@ The debugging strategy should be chosen to yield the best results and may involv | |||||
|
|
||||||
| - **Logging and Tracing:** | ||||||
| - Add strategic logging statements to the code to trace execution flow. Prefer `debugPrint()` over `print()` for cleaner, non-interfering output. | ||||||
| - Use `hot_reload` to apply logging changes quickly while preserving the app's state. If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. | ||||||
| - Use `hot_reload` to apply logging changes quickly while preserving the app's state. | ||||||
| - **Note**: If the user is on Flutter stable ≤ 3.37.0 and hot_reload fails, suggest they manually restart the app or switch to Flutter main channel | ||||||
gspencergoog marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. | ||||||
|
|
||||||
| - **Flutter DevTools & UI Inspection:** | ||||||
| - **For UI and layout bugs:** Use the `get_widget_tree` tool to inspect the widget hierarchy and properties. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -73,6 +73,7 @@ The implementation plan should specify after each phase that you should: | |||||
| - [ ] Use `git diff` to verify the changes that have been made, and create a suitable commit message for any changes, following any guidelines you have about commit messages. Be sure to properly escape dollar signs and backticks, and present the change message to the user for approval. | ||||||
| - [ ] Wait for approval. Don't commit the changes or move on to the next phase of implementation until the user approves the commit. | ||||||
| - [ ] After commiting the change, if an app is running, use the hot_reload tool to reload it. | ||||||
| - **Note**: Hot reload does not work reliably on Flutter stable ≤ 3.37.0. If hot_reload fails, inform the user and suggest either switching to Flutter main channel or manually restarting the app. | ||||||
gspencergoog marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| In the last phase of the plan, include steps to: | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.