Giter VIP home page Giter VIP logo

Comments (10)

timmaffett avatar timmaffett commented on May 24, 2024 2

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.

borjandev avatar borjandev commented on May 24, 2024 1

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.

borjandev avatar borjandev commented on May 24, 2024 1

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.

craiglabenz avatar craiglabenz commented on May 24, 2024 1

Great news - that would also mean #147709 should be our fix.

from flutter.

timmaffett avatar timmaffett commented on May 24, 2024 1

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.

craiglabenz avatar craiglabenz commented on May 24, 2024

To whomever first tries to look at this - I am available to pair up and investigate what is going on.

from flutter.

christopherfujino avatar christopherfujino commented on May 24, 2024

cc @andrewkolos

from flutter.

AbdeMohlbi avatar AbdeMohlbi commented on May 24, 2024

@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.

timmaffett avatar timmaffett commented on May 24, 2024

This may be related to #147643

from flutter.

craiglabenz avatar craiglabenz commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.