Comments (10)
Hot reload/restart definitely is affected also - it no longer works in all cases either - it may seem to work in some cases, but it often no longer works. It does not matter if the debugger is being used or not.
The only way to develop with the current master channel is to ALWAYS flutter clean
after ANY change - it is no longer possible to due any hotreloading - you simply can no longer depend on it.
This bug should be of the highest priority - the build environment is essentially totally broken in all cases.
from flutter.
Reproducible on master
[✓] Flutter (Channel master, 3.22.0-23.0.pre.21, on macOS 14.3 23D56 darwin-arm64, locale en-US)
• Flutter version 3.22.0-23.0.pre.21 on channel master at /Users/m3/fvm/versions/764121cd06
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 764121cd06 (6 hours ago), 2024-05-03 05:58:28 -0400
• Engine revision 1f9edbeece
• Dart version 3.5.0 (build 3.5.0-129.0.dev)
• DevTools version 2.35.0
Hot Restart seems to push the updated code
flutter clean
+ recompile seemingly updates the state of the code to the point when flutter clean
was run.
Changing code and recompiling will now build that state instead rather than the latest state.
This issue is very disruptive as it can easily mislead the developer.
This is especially bad if the developer is trying to fix a difficult bug as it can make him think that his new code is not fixing the bug in question.
from flutter.
It just happened to me in production!
With fvm flutter build apk
[✓] Flutter (Channel master, 3.22.0-23.0.pre.27, on macOS 14.3 23D56 darwin-arm64, locale en-MK)
• Flutter version 3.22.0-23.0.pre.27 on channel master at /Users/m2/fvm/versions/master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c1cafcce12 (10 hours ago), 2024-05-03 22:04:11 +0530
• Engine revision 837914f378
• Dart version 3.5.0 (build 3.5.0-130.0.dev)
• DevTools version 2.35.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/m2/Library/Android/sdk
• Platform android-34, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
Build took shorter time and installing the release with
adb install build/app/outputs/flutter-apk/app-release.apk
Resulted in an old version being installed on the device.
This is now much more serious @christopherfujino @andrewkolos
Running flutter clean
and re-running adb install build/app/outputs/flutter-apk/app-release.apk
lead to the correct version being installed.
Same with iOS releases it actually deployed a wrong build!
from flutter.
Great news - that would also mean #147709 should be our fix.
from flutter.
I can confirm that #147709 does fix this issue for me. I have been testing it for the last few hours on several projects and changes I make are being correctly incorporated into builds and hot reloads.
(I applied the changes to my packages/flutter_tools/lib/src/build_system/targets/common.dart
file (also adding a debug print statement to the build()
method around line 167 so I could verify each build was using the changes))
(Once your common.dart
is patched you need to delete the bin/cache
directory so that it forces rebuilds of the tools (or running flutter doctor
))
Here's to hoping that #147709 gets merged into the master channel ASAP (for others sake - my environment works now 😄 )
This bug was and will continue to be a real time waster for developers on the master channel until it is fixed. It is confusing as heck when changes you are making are not being incorporated into builds!
from flutter.
To whomever first tries to look at this - I am available to pair up and investigate what is going on.
from flutter.
cc @andrewkolos
from flutter.
@craiglabenz
I've observed this behavior myself, when dealing with large trees of nested widgets and complex conditions. Sometimes, even after triggering a hot reload, the changes aren't accurately reflected, especially in deeper parts of the tree. This issue became more noticeable for me around version 3.16.
from flutter.
This may be related to #147643
from flutter.
Update: #147709 does seem to fix this broken behavior for me. For anyone on the master
channel who wants this know, if you build Flutter from a clone of the repo, checking out this and running flutter doctor
will get you this patch immediately.
from flutter.
Related Issues (20)
- weird behaviour from the Text widget or from the dart anlysis not sure HOT 7
- flutter-devicelab-mac-14 is quarantined: No device is available HOT 3
- [Impeller] fix remaining slow frames in flutter gallery application.
- win-12 is low disk space on Temp directory. HOT 1
- [et] Forward `--verbose` to `ninja` HOT 3
- win-1 is dead. HOT 1
- mac-2 is dead. HOT 1
- [et] Allow disabling the "cute" output mode, so folks can `grep` the logs HOT 7
- SceneBuilder.pushImageFilter does not apply itself to the mutator for platform views
- [url_launcher] The windows demo is breaking `build_runner` builds because of `pigeon` HOT 3
- Different results on html/canvaskit when rendering image created by decodeImageFromPixels() function HOT 1
- [tool_crash] Flutter ChromeWebdriver SessionNotCreatedException HOT 1
- [tool_crash] FileSystemException: Failed to decode data using encoding 'utf-8', null HOT 1
- Initialize Controller without passing the link HOT 1
- Flutter
- PopScope returns a black screen when using Navigator.pop method HOT 3
- onTap GestureDetector on Flutter web makes the browser's previous arrow enabled HOT 1
- Google Maps Flutter does not work with textfield HOT 2
- mac-7 & mac-25 lost external connection phone device. HOT 1
- [Impeller] AHB "present ready" fence is not tracked till the completion of the command buffer. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.