-
Notifications
You must be signed in to change notification settings - Fork 17
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
Open
meylis1998
wants to merge
4
commits into
gemini-cli-extensions:main
Choose a base branch
from
meylis1998:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c2df610
feat: Add version detection warnings for hot reload
meylis1998 df893f2
Merge branch 'main' into main
meylis1998 6198949
Address review feedback for hot reload version warnings
meylis1998 9258fa4
Add guidance for running apps when launch_app unavailable
meylis1998 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| 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)) | ||||||
meylis1998 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - If the user is on Flutter stable ≤ 3.37.0, warn them that hot reload may fail during this debugging session | ||||||
meylis1998 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - Suggest they either: | ||||||
meylis1998 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| 1. Switch to Flutter main/master channel for full hot reload support, OR | ||||||
meylis1998 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| 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.
Outdated
Show resolved
Hide resolved
meylis1998 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. | ||||||
|
Contributor
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
|
||||||
|
|
||||||
| - **Flutter DevTools & UI Inspection:** | ||||||
| - **For UI and layout bugs:** Use the `get_widget_tree` tool to inspect the widget hierarchy and properties. | ||||||
|
|
||||||
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
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.
Uh oh!
There was an error while loading. Please reload this page.